1. Home
  2. Explore
  3. Mathematics
  4. Regression Analysis Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Regression Analysis Overview

  • 24Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Regression Fundamentals

What is regression analysis and what is its primary purpose?

24 questions

  1. 1

    What is regression analysis and what is its primary purpose?

    Model answer

    Regression analysis helps understand the relationship between two or more variables by creating a predictive model. Its purpose is to make better decisions, such as predicting sales or understanding inventory levels.

    Explanation

    Regression analysis creates a model that explains how a dependent variable changes with independent variables, enabling predictions.

  2. 2

    In regression, what are dependent and independent variables? Give an example from the content.

    Model answer

    The dependent variable is the outcome being predicted (e.g., GRE score), and the independent variable is the predictor (e.g., CGPA). Regression tries to understand how the dependent variable changes with respect to the independent variable.

    Explanation

    The example shows GRE score as dependent on CGPA as independent.

  3. 3

    What is the simplest category of regression and what condition must the dependent variable satisfy?

    Model answer

    The simplest category is linear regression, where the dependent variable must be a continuous numerical value.

    Explanation

    Linear regression models a linear relationship; continuous data is required for proper fitting.

  4. 4

    Write the equation of a straight line used in simple linear regression and identify the slope and intercept.

    Model answer

    The equation is y=mx+cy = mx + cy=mx+c, where mmm is the slope and ccc is the y-intercept.

    Explanation

    This line represents the relationship between the independent variable xxx and dependent variable yyy.

  5. 5

    What is a residual in linear regression?

    Model answer

    A residual is the difference between the observed value of the dependent variable and the value predicted by the regression line.

    Explanation

    Residuals measure prediction error; smaller residuals indicate a better fit.

  6. 6

    How is the best fit line determined in linear regression?

    Model answer

    The best fit line minimizes the residual sum of squares (RSS), which is the sum of squared residuals across all data points.

    Explanation

    The line with the smallest RSS is chosen as the best fit.

  7. 7

    What is the difference between simple linear regression and multiple linear regression?

    Model answer

    Simple linear regression has one independent variable, while multiple linear regression has two or more independent variables.

    Explanation

    Multiple regression uses multiple predictors to model the dependent variable.

  8. 8

    What does the correlation coefficient rrr measure? What is its range?

    Model answer

    The correlation coefficient rrr measures the strength and direction of a linear relationship between two variables. It ranges from -1 to +1.

    Explanation

    Values close to +1 or -1 indicate strong linear relationships; values near 0 indicate weak or no linear relationship.

  9. 9

    What does a correlation coefficient rrr close to zero imply?

    Model answer

    An rrr close to zero implies there is no linear relationship between the two variables. However, there may still be a non-linear relationship.

    Explanation

    Zero correlation does not mean no relationship; it only means no linear relationship.

  10. 10

    What is the coefficient of determination R2R^2R2 and what does it represent?

    Model answer

    R2R^2R2 is the proportion of variance in the dependent variable that is explained by the independent variables. It ranges from 0 to 1.

    Explanation

    A higher R2R^2R2 indicates that the model explains more of the variability in the target.

  11. 11

    Why is adjusted R2R^2R2 sometimes preferred over R2R^2R2?

    Model answer

    Adjusted R2R^2R2 penalizes the inclusion of useless variables, so it decreases when irrelevant predictors are added, whereas R2R^2R2 always increases. Adjusted R2R^2R2 gives a more honest measure of model quality.

    Explanation

    This prevents overfitting by discouraging the inclusion of variables that only add noise.

  12. 12

    What is the assumption of linearity in linear regression?

    Model answer

    It assumes that the relationship between the dependent variable and each independent variable is linear.

    Explanation

    If the true relationship is non-linear, a linear model may perform poorly.

  13. 13

    What is multicollinearity and why is it a problem in linear regression?

    Model answer

    Multicollinearity occurs when independent variables are highly correlated with each other. It can make coefficient estimates unstable and reduce the model's predictive power.

    Explanation

    The algorithm assumes independent variables are independent; multicollinearity violates this assumption.

  14. 14

    What is gradient descent and how is it used in linear regression?

    Model answer

    Gradient descent is an optimization algorithm that iteratively adjusts the coefficients (slope and intercept) to minimize the error function (e.g., RSS). It uses partial derivatives to find the direction of steepest descent and moves in that direction step by step until it reaches the global minimum.

    Explanation

    Gradient descent efficiently finds the best fit line without evaluating all possible lines.

  15. 15

    Why is the logistic regression algorithm considered a classification method despite its name?

    Model answer

    Logistic regression uses a linear model under the hood but applies the sigmoid function to output class probabilities (between 0 and 1), making it suitable for binary classification.

    Explanation

    The name 'regression' comes from its linear base, but the application is classification.

  16. 16

    Write the sigmoid function used in logistic regression and state its purpose.

    Model answer

    The sigmoid function is 11+e−(mx+c)\frac{1}{1 + e^{-(mx + c)}}1+e−(mx+c)1​. It maps any real-valued number to a probability between 0 and 1.

    Explanation

    This transformation ensures the output can be interpreted as a probability.

  17. 17

    What is the error function minimized in logistic regression?

    Model answer

    The error function is log loss (binary cross-entropy): Loss=−1N∑i=1N[yilog⁡(pi)+(1−yi)log⁡(1−pi)]\text{Loss} = -\frac{1}{N} \sum_{i=1}^N [y_i \log(p_i) + (1 - y_i) \log(1 - p_i)]Loss=−N1​∑i=1N​[yi​log(pi​)+(1−yi​)log(1−pi​)], where yiy_iyi​ is the true label and pip_ipi​ is the predicted probability.

    Explanation

    This function penalizes confident wrong predictions heavily.

  18. 18

    What is a confusion matrix and what information does it provide?

    Model answer

    A confusion matrix is a table that compares actual class labels with predicted labels. It shows true positives, true negatives, false positives, and false negatives, enabling calculation of metrics like accuracy, precision, and recall.

    Explanation

    It gives a detailed view of classification performance beyond simple accuracy.

  19. 19

    How is recall calculated for a given class?

    Model answer

    Recall for a class is TPTP+FN\frac{TP}{TP + FN}TP+FNTP​, where TP is true positives and FN is false negatives for that class.

    Explanation

    Recall measures the proportion of actual positive cases that were correctly identified.

  20. 20

    Why is it important to split data into training and testing sets?

    Model answer

    To evaluate how well the model generalizes to unseen data. Training on the entire dataset could lead to overfitting and poor performance on new data.

    Explanation

    Testing on a held-out set provides an unbiased estimate of model performance.

  21. 21

    What is a low variance filter and when might you apply it?

    Model answer

    A low variance filter removes columns that have very little variability (e.g., almost all values are the same). Such columns provide little to no information for prediction.

    Explanation

    Low variance columns are unlikely to help distinguish between different outcomes.

  22. 22

    How do you handle missing values in a numerical column? Give one common strategy.

    Model answer

    One common strategy is to replace missing values with the median or mean of that column. The median is preferred when outliers are present because it is less affected by extreme values.

    Explanation

    Imputation with central tendency preserves data size and avoids losing records.

  23. 23

    What is the purpose of a pair plot in data analysis?

    Model answer

    A pair plot visualizes the pairwise relationships between variables in a dataset, including scatter plots for each pair and histograms or density plots on the diagonal. It helps identify correlations, trends, outliers, and distributions.

    Explanation

    It is an essential exploratory tool for understanding the data before modeling.

  24. 24

    What does a p-value for a coefficient in linear regression indicate?

    Model answer

    A p-value indicates the probability of observing such an extreme coefficient if the true coefficient were zero (no relationship). A low p-value (typically <0.05) suggests the variable is statistically significant and likely has a real effect on the target.

    Explanation

    High p-values may indicate that the observed relationship could be due to random chance.

1 of 24
Question 1 of 24

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent