Introduction to Linear Regression: Prediction and the Regression Equation
Introductionโ
Correlation tells us the strength and direction of a relationship between two variables. But what if we want to go further โ to actually predict the value of one variable from another?
Linear regression is the statistical method that transforms a correlation into a predictive equation. While correlation answers "How strongly are X and Y related?", regression answers "Given a specific value of X, what value of Y can I predict?"
Regression is the natural next step beyond correlation, and it serves as the conceptual bridge to multiple regression โ the most widely used statistical method in contemporary psychological research. Understanding simple linear regression is essential for interpreting research findings in journals, conducting your own research, and building toward more complex multivariate analyses.
Source PDFs:
- ๐ Block-2/Unit-3.pdf โ Pages 53โ56
- ๐ MPC-006 Statistics in Psychology, Block 2: Correlation and Regression
From Scatter Plot to Regression Lineโ
Recall from Unit 1 that a scatter diagram plots pairs of scores (X, Y) for each subject. In a positive correlation, higher X values tend to pair with higher Y values. In a negative correlation, the opposite.
We can draw a line through these scattered points โ but which line? The regression line (also called the best-fit line or line of least squares) is the one that comes as close as possible to all the data points simultaneously.
Formally, the regression line minimises the sum of squared residuals โ the differences between each observed Y value and the Y value predicted by the line. This criterion is called the method of least squares (OLS โ Ordinary Least Squares).
Guidelines for Using Regression Linesโ
- Use regression only when there is a significant correlation โ if X and Y aren't related, a regression line has no predictive meaning
- Do not extrapolate beyond the data range โ if data runs from X = 10 to X = 60, don't predict for X = 400; the linear relationship may not hold outside that range
- Don't apply one population's regression line to another โ a regression equation from urban Indian students may not apply to rural students
- Regression โ causation โ even a perfect regression equation doesn't establish that X causes Y
The Regression Equationโ
The equation for a simple linear regression (one predictor X, one outcome Y) is:
Or at the population level:
Where:
| Symbol | Name | Meaning |
|---|---|---|
| Predicted Y | The value of Y predicted from a given X | |
| Y | Observed Y | Actual score on the outcome variable |
| a | Y-intercept (sample) | Value of when X = 0; estimator of ฮฑ |
| b | Slope (sample) | Rate of change in Y per unit increase in X; estimator of ฮฒ |
| ฮฑ (alpha) | Population intercept | True population Y-intercept |
| ฮฒ (beta) | Population slope | True population regression coefficient |
| ฮต (epsilon) | Error / Residual | Difference between predicted and actual Y |
Terminology note:
- Y is the criterion variable (also called dependent variable or outcome)
- X is the predictor variable (also called independent variable)
- b is the regression coefficient (slope)
- a is the regression constant (intercept)
The Slope Formulaโ
The slope b can be calculated as:
This elegant formula shows that the regression slope is the correlation coefficient scaled by the ratio of standard deviations of Y to X. This connects regression directly to correlation.
Computing the Regression Equation: Raw Score Formulaโ
Using the sums of X, Y, Xยฒ, Yยฒ, and XY:
Slope (bโ):
Intercept (bโ):
Worked Exampleโ
Given data:
| X | Y |
|---|---|
| 1 | 4 |
| 3 | 2 |
| 4 | 1 |
| 5 | 0 |
| 8 | 0 |
Compute sums: ฮฃX = 21, ฮฃY = 7, ฮฃXยฒ = 115, ฮฃYยฒ = 21, ฮฃXY = 14, N = 5
Slope:
Intercept:
Regression equation:
Using it for prediction:
- If X = 2:
- If X = 6:
Interpreting the Regression Equationโ
The Slope (b)โ
The slope tells us: For every one-unit increase in X, Y is predicted to change by b units.
- Positive slope: As X increases, predicted Y increases
- Negative slope: As X increases, predicted Y decreases
- Magnitude: Larger |b| = steeper line = stronger rate of change
Example: b = โ0.575 means for every additional unit of X, Y is predicted to decrease by 0.575 units.
The Intercept (a)โ
The intercept is the predicted Y when X = 0. It anchors the regression line on the Y-axis.
Important caveat: If X = 0 is outside the range of observed data, the intercept has no meaningful real-world interpretation โ it's merely a mathematical anchor for the line.
The Residual (e)โ
The residual for each data point is:
- Positive residual: Actual Y is higher than predicted
- Negative residual: Actual Y is lower than predicted
- Sum of all residuals: Always equals zero (property of OLS)
- Sum of squared residuals: The quantity minimised by OLS
Regression and Partial Correlation: The Connectionโ
The regression framework also provides an alternative interpretation of partial correlation:
For the academic achievement (A), anxiety (B), intelligence (C) example:
Regression 1: Academic Achievement = aโ + bโ ร Intelligence + eโ
- eโ = residual of academic achievement after removing intelligence's linear contribution
Regression 2: Anxiety = aโ + bโ ร Intelligence + eโ
- eโ = residual of anxiety after removing intelligence's linear contribution
Partial correlation r_AB.C = Pearson's r between eโ and eโ
This shows that partial correlation literally compares the "leftover" variations in each variable once both have been purged of the confound's influence. The regression framework makes this conceptually concrete and computationally precise.
Similarly, semipartial correlation = Pearson's r between A (unchanged) and eโ (residual of B after regressing on C).
Standardised vs. Unstandardised Regressionโ
In psychology, two forms of the regression coefficient are reported:
| Type | Symbol | Scale | Use |
|---|---|---|---|
| Unstandardised | b | Original units of X and Y | Practical interpretation (e.g., for each hour of study, marks increase by 2.3 points) |
| Standardised | ฮฒ (beta weight) | Standard deviation units | Comparing predictors within a model (who predicts more?) |
The standardised regression coefficient ฮฒ is related to correlation:
In simple regression (one predictor), ฮฒ = r (the correlation coefficient). In multiple regression, each ฮฒ reflects the unique contribution of that predictor while holding others constant.
Practical Applications in Psychological Researchโ
Educational Psychologyโ
Admissions prediction: Universities use regression equations to predict student GPA (Y) from entrance exam scores (X). The regression coefficient tells admissions officers: "For each 10-point increase in entrance score, expected GPA increases by 0.15 points."
Clinical Psychologyโ
Treatment outcome prediction: Regression models predict post-treatment depression scores (Y) from baseline severity (X). Residuals represent how much a patient's outcome differs from what their baseline would predict โ a measure of "treatment response" above and beyond starting level.
Occupational Psychologyโ
Performance prediction: Job performance (Y) predicted from interview ratings, cognitive ability scores, and personality scores (Xโ, Xโ, Xโ) using multiple regression. The regression equation becomes an empirically-derived selection tool.
Indian Context ๐ฎ๐ณโ
- NEET and JEE prediction models: Educational consultancies in India build regression models predicting board exam performance from mock test scores, study hours, and coaching attendance
- NIMHANS outcome research: Predicting length of psychiatric hospitalisation from admission severity, family support, and treatment compliance
- Rural development research (ICSSR): Regression used to predict agricultural yield from rainfall, fertiliser use, and technology adoption in rural Indian samples
Memory Aids ๐ง โ
The Regression Equation: "ACE"โ
- A = a (intercept โ where line hits Y-axis)
- C = coefficient (b โ slope โ rate of change)
- E = error (ฮต or e โ residual โ prediction miss)
Slope vs. Intercept: "SLOPE goes Slanting, INTERCEPT is where it Intersects Y"โ
- Slope (b): How steeply the line goes up or down
- Intercept (a): Where the line crosses the Y-axis (X = 0)
Regression-Correlation Link: "b = r ร (Sy/Sx)"โ
The slope is the correlation scaled by the standard deviation ratio. When both variables are standardised (mean = 0, SD = 1), b = r exactly โ this is the standardised coefficient ฮฒ.
External Resources ๐โ
Wikipedia Articlesโ
- ๐ Simple Linear Regression โ Full mathematical derivation
- ๐ Ordinary Least Squares โ The minimisation principle
- ๐ Regression Analysis โ Overview and history
Educational Videosโ
- ๐ฅ Linear Regression โ CrashCourse Statistics #32 โ Accessible visual introduction
- ๐ฅ Regression Line Explained (Khan Academy) โ Residuals and least squares
Research Articlesโ
- ๐ Regression in Psychological Research (Field, 2013) โ Andy Field's comprehensive treatment
- ๐ Understanding Regression Output in Psychology (2021) โ Guide to interpreting regression tables
Online Toolsโ
- ๐ง Regression Calculator (SocSciStats) โ Simple regression with output
- ๐ง Desmos Regression Tool โ Visual regression line fitting
- ๐ง Regression Line Simulator (GeoGebra) โ Interactive slope and intercept exploration
Self-Assessment Questions โ โ
Recall Levelโ
- What is the regression equation for simple linear regression? Define each term.
- What is the "method of least squares" and why is it used?
- Write the formula linking the slope (b) to the correlation coefficient (r).
Understanding Levelโ
- A regression equation predicting exam marks (Y) from study hours (X) is: ลถ = 40 + 3.5X. Interpret (a) the slope and (b) the intercept. What predicted marks would a student who studies 5 hours receive?
- Why should we not use a regression line when the correlation between X and Y is not statistically significant?
- How do regression residuals connect to the concept of partial correlation?
Application Levelโ
- A researcher has: ฮฃX = 50, ฮฃY = 100, ฮฃXยฒ = 350, ฮฃXY = 580, N = 10. Compute the regression equation ลถ = a + bX. Use it to predict Y when X = 8.
- An Indian educational researcher finds that for Class 10 students, the regression of board marks (Y) on hours of self-study (X) gives: ลถ = 35 + 4.2X. (a) What does the slope mean in practical terms? (b) Predict marks for a student studying 8 hours. (c) Is it appropriate to predict marks for 20 hours of study? Why or why not?
Summaryโ
Simple linear regression extends correlation by creating a predictive equation: ลถ = a + bX. The slope (b) tells us how much Y changes for each unit increase in X; it equals r ร (S_Y/S_X). The intercept (a) is the predicted Y when X = 0. The method of least squares (OLS) determines the best-fit regression line by minimising the sum of squared residuals. Regression is only meaningful when the correlation is statistically significant, should not be extrapolated beyond the data range, and never implies causation. Regression residuals directly connect to partial and semipartial correlations, making regression the conceptual foundation for all multivariate methods in psychology.