Regression Analysis Predictive Statistics Data Science 32 min read August 3, 2026
BY: Statistics Fundamentals Team
Reviewed By: Minsa A (Senior Statistics Editor)

Simple Linear Regression: Real-Life Examples

A real estate firm predicts house prices from square footage. A school analyzes whether study time improves exam scores. An advertiser forecasts sales from ad spending. All three are running a simple linear regression — finding the straight line that best describes how one variable predicts another.

This page covers eight fully solved examples from real-world domains — education, business, healthcare, economics, and more. Each example includes the original dataset, step-by-step calculations of slope (b₁) and intercept (b₀), the full regression equation, R² interpretation, residual analysis, and a prediction. The interactive calculator at the bottom lets you enter your own data and compute results instantly.

What You'll Learn
  • ✓ The regression equation ŷ = b₀ + b₁x and how every term works
  • ✓ How to calculate slope and intercept manually from a dataset
  • ✓ Eight worked examples — study hours, advertising, house size, salary, and more
  • ✓ How to read and interpret a scatter plot and regression line
  • ✓ What R² tells you — and what it does not
  • ✓ The four assumptions of simple linear regression
  • ✓ Common mistakes and how to avoid them
  • ✓ An interactive calculator with scatter plot for your own data

What Is Simple Linear Regression?

Definition — Simple Linear Regression
Simple linear regression is a statistical method that models the linear relationship between one independent variable (x) and one dependent variable (y). It fits a straight line through a scatter plot of data points in a way that minimizes the total squared vertical distance from each point to the line. The result is a predictive equation used to estimate y for any given value of x.
ŷ = b₀ + b₁x

The word "simple" distinguishes this from multiple linear regression, which uses two or more predictors. "Linear" means the relationship between x and y is modeled as a straight line — not curved, not stepped.

The equation ŷ = b₀ + b₁x has two parts. The slope b₁ tells you how much y changes, on average, for each one-unit increase in x. The intercept b₀ is the predicted value of y when x equals zero. Together they define the regression line — also called the line of best fit.

The method dates to Francis Galton, who coined the term "regression" in 1886 when studying the heights of parents and their children. Karl Pearson later formalized the mathematics. Today, simple linear regression is the entry point for predictive modeling in statistics, economics, machine learning, and data science. A full treatment of the underlying theory is available at Statistics Fundamentals.

⚡ Quick Reference — Simple Linear Regression Key Facts
  • Equation: ŷ = b₀ + b₁x (b₀ = intercept, b₁ = slope)
  • Slope (b₁): Change in ŷ for every 1-unit increase in x — the most important number in the output
  • Intercept (b₀): Predicted ŷ when x = 0 (may not be meaningful if x = 0 is outside the data range)
  • Residual (e): Actual y minus predicted ŷ — measures how far each point falls from the line
  • R² (R-squared): Proportion of variance in y explained by x; ranges 0–1
  • Pearson r: Strength and direction of the linear relationship; r² = R²
  • OLS: Ordinary Least Squares — the method that computes b₁ and b₀ by minimizing Σ(y − ŷ)²

The Regression Formula and How to Calculate It

The slope and intercept are calculated from your data using ordinary least squares (OLS). These two formulas are all you need when working by hand:

Slope Formula
b₁ = [n·Σ(xy) − Σx·Σy] / [n·Σx² − (Σx)²]
n = number of data points Σxy = sum of each x times y Σx = sum of all x values Σy = sum of all y values Σx² = sum of each x squared
Intercept Formula
b₀ = ȳ − b₁·x̄
ȳ = mean of y values = mean of x values b₁ = slope (calculated first)

Once you have b₀ and b₁, write the equation, then use it to predict y for any x value. The coefficient of determination R² is calculated as:

R-Squared Formula
R² = 1 − [Σ(y − ŷ)²] / [Σ(y − ȳ)²]
Σ(y−ŷ)² = sum of squared residuals (SSR) Σ(y−ȳ)² = total sum of squares (SST) ranges from 0 to 1
💡
Note on R² Interpretation

R² = 0.80 does not mean regression is "80% accurate." It means the x variable accounts for 80% of the observed variation in y. The remaining 20% comes from other factors not in the model. See the full R-squared guide for details.

Four Assumptions of Simple Linear Regression

The OLS estimates b₀ and b₁ have desirable properties only when these four conditions are met. Checking them — ideally with a residual plot — is part of responsible regression analysis.

1

Linearity

The relationship between x and y must be linear — a straight line, not a curve. Check by plotting the data in a scatter plot. If the pattern curves upward or downward, a transformation of x or y (such as log x) may be needed before fitting a regression.

2

Independence of Residuals

Each observation's residual must be independent of the others. This is most often violated in time-series data, where residuals from one period are correlated with the next. A Durbin-Watson test or residual time plot can reveal autocorrelation.

3

Homoscedasticity (Constant Variance)

The spread of residuals should be roughly constant across all values of x. When residuals fan out as x increases (heteroscedasticity), standard errors are biased. A residual-versus-fitted plot is the standard diagnostic. See the regression assumptions guide for correction methods.

4

Normality of Residuals

For inference (p-values, confidence intervals) to be valid, residuals should be approximately normally distributed. A Q-Q plot or Shapiro-Wilk test can check this. With large samples (n > 30), the Central Limit Theorem makes regression inference fairly robust to minor departures from normality.

Simple Linear Regression Examples — 8 Fully Solved

Each example below uses a small, realistic dataset so every arithmetic step is visible. All formulas follow the notation standard used by the NIST Engineering Statistics Handbook.

Example 1 — Study Hours vs. Exam Score (Education)

Worked Example 1 — Education

A professor records study hours and exam scores for 6 students. Is there a linear relationship, and how well can study time predict exam performance?

StudentStudy Hours (x)Exam Score (y)xy
1152521
22581164
33651959
457839025
568450436
679163749
Σ244281,894124
1

Calculate the means:
x̄ = 24 / 6 = 4.00  |  ȳ = 428 / 6 = 71.33

2

Calculate the slope:
b₁ = [6(1894) − (24)(428)] / [6(124) − (24)²]
   = [11364 − 10272] / [744 − 576]
   = 1092 / 168 = 6.50

3

Calculate the intercept:
b₀ = ȳ − b₁·x̄ = 71.33 − 6.50(4.00) = 71.33 − 26.00 = 45.33

4

Write the regression equation:
ŷ = 45.33 + 6.50x

5

Make a prediction:
If a student studies 4.5 hours: ŷ = 45.33 + 6.50(4.5) = 45.33 + 29.25 = 74.58 ≈ 75

Scatter Plot: Study Hours vs. Exam Score

0 1 2 3 4 5 6 7 Study Hours (x) 50 60 70 80 90 100 Exam Score (y) ŷ = 45.33 + 6.50x

✅ Equation: ŷ = 45.33 + 6.50x — Each additional study hour adds 6.50 points. A student who studies 4.5 hours is predicted to score about 75. The slope and intercept can be verified with the regression calculator.

R² for this example:

R² = 0.9797% of score variation explained by study hours
Dataset is original. Formula methodology follows: James, G., Witten, D., Hastie, T., & Tibshirani, R. (2021). An Introduction to Statistical Learning, 2nd ed. Springer. statlearning.com

Example 2 — Advertising Spend vs. Sales Revenue (Business)

Worked Example 2 — Business

A retailer tracks weekly advertising spend (in $000s) and weekly sales (in $000s) over 5 weeks. What does a $1,000 increase in ad spend predict for sales?

WeekAd Spend x ($k)Sales y ($k)xy
1214284
2319579
34239216
452713525
563118636
Σ2011449890
1

Means: x̄ = 20/5 = 4.00  |  ȳ = 114/5 = 22.80

2

Slope:
b₁ = [5(498) − (20)(114)] / [5(90) − (20)²]
   = [2490 − 2280] / [450 − 400]
   = 210 / 50 = 4.20

3

Intercept: b₀ = 22.80 − 4.20(4.00) = 22.80 − 16.80 = 6.00

4

Regression equation: ŷ = 6.00 + 4.20x

5

Prediction at x = 7 ($7,000 ad spend): ŷ = 6.00 + 4.20(7) = 6.00 + 29.40 = $35,400 in sales

✅ Equation: ŷ = 6.00 + 4.20x — Each extra $1,000 spent on advertising adds $4,200 in sales. At $7,000 spend, predicted sales = $35,400. R² for this dataset is approximately 0.998 — a near-perfect linear fit.

Data structure follows Freedman, D., Pisani, R., & Purves, R. (2007). Statistics, 4th ed. W.W. Norton. Sales forecasting applications discussed in detail at statisticsfundamentals.com/blog/business/sales-forecasting-regression.

Example 3 — House Size vs. Sale Price (Real Estate)

Worked Example 3 — Real Estate

A property analyst records house sizes (sq ft) and sale prices ($000s) for 6 homes. What price would a 1,800 sq ft house command?

HomeSize x (sq ft)Price y ($k)xy
1900145130,500810,000
21,100175192,5001,210,000
31,300198257,4001,690,000
41,500220330,0002,250,000
51,800265477,0003,240,000
62,100305640,5004,410,000
Σ8,7001,3082,027,90013,610,000
1

Means: x̄ = 8,700/6 = 1,450  |  ȳ = 1,308/6 = 218.00

2

Slope:
b₁ = [6(2,027,900) − (8,700)(1,308)] / [6(13,610,000) − (8,700)²]
   = [12,167,400 − 11,379,600] / [81,660,000 − 75,690,000]
   = 787,800 / 5,970,000 = 0.132

3

Intercept: b₀ = 218.00 − 0.132(1,450) = 218.00 − 191.40 = 26.60

4

Equation: ŷ = 26.60 + 0.132x

5

Prediction at x = 1,800 sq ft: ŷ = 26.60 + 0.132(1,800) = 26.60 + 237.60 = $264,200

✅ Equation: ŷ = 26.60 + 0.132x — Each additional square foot adds approximately $132 to the predicted price. A 1,800 sq ft home is predicted to sell for $264,200. R² ≈ 0.997.

Example 4 — Work Experience vs. Salary (Economics)

Worked Example 4 — Economics / HR

An HR analyst records years of experience and annual salary ($000s) for 5 employees. What salary would an 8-year employee typically earn?

EmployeeExperience x (yrs)Salary y ($k)xy
1138381
23451359
355427025
476344149
597264881
Σ252721,532165
1

Means: x̄ = 25/5 = 5.00  |  ȳ = 272/5 = 54.40

2

Slope:
b₁ = [5(1532) − (25)(272)] / [5(165) − (25)²]
   = [7660 − 6800] / [825 − 625]
   = 860 / 200 = 4.30

3

Intercept: b₀ = 54.40 − 4.30(5.00) = 54.40 − 21.50 = 32.90

4

Equation: ŷ = 32.90 + 4.30x

5

Prediction at x = 8 years: ŷ = 32.90 + 4.30(8) = 32.90 + 34.40 = $67,300

✅ Equation: ŷ = 32.90 + 4.30x — Each year of experience adds approximately $4,300 to predicted salary. An employee with 8 years of experience would earn an estimated $67,300. R² ≈ 0.995.

Example 5 — Temperature vs. Electricity Usage (Environment)

Worked Example 5 — Energy / Environment

A utility company records daily high temperature (°F) and household electricity usage (kWh) on 6 summer days. How much electricity is predicted when the high is 95°F?

DayTemperature x (°F)Usage y (kWh)xy
172282,0165,184
276332,5085,776
382393,1986,724
486443,7847,396
590504,5008,100
696565,3769,216
Σ50225021,38242,396
1

Means: x̄ = 502/6 = 83.67  |  ȳ = 250/6 = 41.67

2

Slope:
b₁ = [6(21382) − (502)(250)] / [6(42396) − (502)²]
   = [128292 − 125500] / [254376 − 252004]
   = 2792 / 2372 = 1.177

3

Intercept: b₀ = 41.67 − 1.177(83.67) = 41.67 − 98.48 = −56.81

4

Equation: ŷ = −56.81 + 1.177x (negative intercept is expected — 0°F would produce no meaningful usage)

5

Prediction at 95°F: ŷ = −56.81 + 1.177(95) = −56.81 + 111.82 = 55.0 kWh

✅ Equation: ŷ = −56.81 + 1.177x — Each 1°F rise in temperature adds approximately 1.18 kWh to predicted electricity use. At 95°F, usage is estimated at 55 kWh. R² ≈ 0.993.

Example 6 — Exercise vs. Weight Loss (Healthcare)

Worked Example 6 — Healthcare

A nutritionist records weekly exercise hours and monthly weight loss (lbs) for 5 participants. What weight loss does 6 hours of weekly exercise predict?

ParticipantExercise x (hrs/wk)Weight Loss y (lbs)xy
110.80.81
221.53.04
332.26.69
453.618.025
574.934.349
Σ1813.062.788
1

Means: x̄ = 18/5 = 3.60  |  ȳ = 13.0/5 = 2.60

2

Slope:
b₁ = [5(62.7) − (18)(13.0)] / [5(88) − (18)²]
   = [313.5 − 234.0] / [440 − 324]
   = 79.5 / 116 = 0.686

3

Intercept: b₀ = 2.60 − 0.686(3.60) = 2.60 − 2.47 = 0.13

4

Equation: ŷ = 0.13 + 0.686x

5

Prediction at 6 hrs/week: ŷ = 0.13 + 0.686(6) = 0.13 + 4.12 = 4.25 lbs/month

✅ Equation: ŷ = 0.13 + 0.686x — Each additional hour of weekly exercise predicts 0.686 lbs of extra weight loss per month. At 6 hours per week, predicted monthly weight loss is 4.25 lbs. R² ≈ 0.996.

Example 7 — Website Traffic vs. Conversions (Marketing)

Worked Example 7 — Digital Marketing

A digital analyst records weekly website visitors (000s) and purchases made for 5 weeks. How many conversions does 12,000 visitors predict?

WeekVisitors x (k)Purchases yxy
13421269
256834025
379566549
491211,08981
5111481,628121
Σ354743,848285
1

Means: x̄ = 35/5 = 7.00  |  ȳ = 474/5 = 94.80

2

Slope:
b₁ = [5(3848) − (35)(474)] / [5(285) − (35)²]
   = [19240 − 16590] / [1425 − 1225]
   = 2650 / 200 = 13.25

3

Intercept: b₀ = 94.80 − 13.25(7.00) = 94.80 − 92.75 = 2.05

4

Equation: ŷ = 2.05 + 13.25x

5

Prediction at x = 12 (12,000 visitors): ŷ = 2.05 + 13.25(12) = 2.05 + 159.00 = 161 purchases

✅ Equation: ŷ = 2.05 + 13.25x — Each 1,000 additional visitors predicts approximately 13 more purchases. At 12,000 weekly visitors, the model predicts 161 conversions. R² ≈ 0.9997.

Example 8 — Rainfall vs. Crop Yield (Agriculture)

Worked Example 8 — Agriculture

An agronomist records seasonal rainfall (mm) and wheat yield (tons/acre) for 6 growing seasons. What yield does 450mm of rainfall predict?

SeasonRainfall x (mm)Yield y (t/acre)xy
12502.1525.062,500
23102.6806.096,100
33703.01,110.0136,900
44203.41,428.0176,400
54803.81,824.0230,400
65304.22,226.0280,900
Σ2,36019.17,919.0983,200
1

Means: x̄ = 2360/6 = 393.33  |  ȳ = 19.1/6 = 3.183

2

Slope:
b₁ = [6(7919) − (2360)(19.1)] / [6(983200) − (2360)²]
   = [47514 − 45076] / [5899200 − 5569600]
   = 2438 / 329600 = 0.0074

3

Intercept: b₀ = 3.183 − 0.0074(393.33) = 3.183 − 2.911 = 0.272

4

Equation: ŷ = 0.272 + 0.0074x

5

Prediction at 450mm: ŷ = 0.272 + 0.0074(450) = 0.272 + 3.330 = 3.60 tons/acre

✅ Equation: ŷ = 0.272 + 0.0074x — Each additional millimeter of rainfall predicts 0.0074 more tons per acre. At 450mm seasonal rainfall, predicted yield is 3.60 tons/acre. R² ≈ 0.996.

How to Interpret the Regression Output

Running a regression produces several numbers. Here is what each one actually means, using Example 1 (study hours vs. exam score) as the reference point.

Output ValueFrom Example 1Plain-English Meaning
Slope (b₁)6.50Each extra hour of study adds 6.50 points to the predicted score, on average
Intercept (b₀)45.33A student who studies zero hours is predicted to score 45.33 (caution: extrapolation)
0.9797% of the variation in exam scores is explained by study hours
Residual (e)e = y − ŷHow far the actual score was from the predicted score for each student
Pearson r≈ 0.985Strong positive linear relationship (r² = R² = 0.97)
Predicted ŷ75 (at x=4.5)Expected exam score for a student studying exactly 4.5 hours
⚠️
Extrapolation Warning

Predicting ŷ for x values far outside the range of your data is unreliable. In Example 3 (house size), the model should not be used for a 10,000 sq ft mansion — the linear relationship observed in the 900–2,100 sq ft range may not extend that far.

Regression vs. Correlation: Key Differences

Feature Pearson Correlation (r) Simple Linear Regression
PurposeMeasure strength and direction of a linear relationshipPredict y from x with a specific equation
OutputA single number between −1 and +1An equation: ŷ = b₀ + b₁x
Symmetric?Yes — corr(x,y) = corr(y,x)No — x predicts y, not the reverse
PredictionCannot produce predictionsDirectly predicts ŷ for any x
Connectionr² = R² (coefficient of determination)R² = r² from Pearson correlation
When to useYou want to describe association onlyYou have a predictor–outcome relationship

For a full treatment of the correlation side, see the Pearson correlation guide. The scatter plot patterns that indicate strong vs. weak correlation are covered in scatter plots and correlation.

Simple vs. Multiple Linear Regression

Feature Simple Linear Regression Multiple Linear Regression
PredictorsOne (x)Two or more (x₁, x₂, …)
Equationŷ = b₀ + b₁xŷ = b₀ + b₁x₁ + b₂x₂ + …
Visualization2D scatter plot with lineRequires 3D or partial regression plots
InterpretationSlope = change in y per unit of xEach slope = change in y, holding other variables constant
Best forOne clear predictor, learning regression fundamentalsReal-world data where multiple factors matter

When one predictor is not enough — for example, predicting salary from both experience and education — the logical next step is multiple linear regression.

When to Use Simple Linear Regression

Should You Use Simple Linear Regression?

Do you have exactly one numeric predictor (x) and one numeric outcome (y)?
Yes — simple linear regression may be appropriate
Does the scatter plot show a roughly straight-line relationship?
Yes — proceed with OLS regression
Does the scatter plot show a curved pattern?
Consider transforming x or y (e.g., log, square root) first
Is your y variable binary (0/1) — like pass/fail?
Use logistic regression instead — see logistic regression guide
Do you have two or more predictors?
Are all four assumptions satisfied (linearity, independence, homoscedasticity, normality)?
Yes — your inference (p-values, confidence intervals) is valid

Real-Life Applications of Simple Linear Regression

🎓

Education

Predicting exam performance from study time. Schools use regression to identify students who need extra support before exams.

🏠

Real Estate

Estimating property values from square footage. Automated valuation models start with a linear regression between size and price.

📣

Marketing

Forecasting sales from advertising spend. Helps marketers set budgets and estimate return on ad investment for a single channel.

🏥

Healthcare

Predicting blood pressure reduction from medication dose, or weight loss from exercise hours. Supports clinical decision-making.

💼

Economics / HR

Estimating salary from years of experience. Used in wage analysis, compensation benchmarking, and labor market research.

Energy

Forecasting electricity demand from temperature. Utility companies use regression to plan daily grid capacity in hot or cold weather.

🌾

Agriculture

Predicting crop yields from rainfall. Governments and farmers use regression-based forecasts to plan food supply chains.

💻

Web Analytics

Estimating purchases from website traffic. E-commerce teams use regression to set traffic acquisition targets linked to revenue goals.

Common Regression Mistakes and How to Avoid Them

MistakeWrong InterpretationCorrect Interpretation
Treating R² as accuracy "R² = 0.80, so the model is 80% accurate" "80% of the variation in y is explained by x"
Ignoring the intercept context "b₀ = 26.60 means a house with no size costs $26,600" "b₀ is mathematically necessary but may be meaningless if x = 0 is outside the data range"
Confusing correlation with regression "A high correlation means the regression is good at predicting" "High r means a strong linear relationship, but regression quality also depends on data spread and residual patterns"
Extrapolating beyond data Using a salary regression to predict income at 50 years experience when data only goes to 10 years "The model is only reliable within the observed range of x values"
Confusing causation with prediction "The regression shows that advertising causes sales" "The regression shows that ad spend predicts sales — causation requires controlled experimental design"
Not checking residuals Trusting output without looking at a residual plot Always inspect the residual plot to confirm assumptions before reporting results

Entity and Term Glossary

Term / SymbolDefinition
Simple Linear RegressionStatistical method modeling the linear relationship between one predictor (x) and one outcome (y)
ŷ (y-hat)Predicted value of the dependent variable from the regression equation
b₀ (Intercept)Predicted value of y when x equals zero; where the regression line crosses the y-axis
b₁ (Slope)Change in ŷ for each one-unit increase in x — the most informative regression coefficient
x (Independent Variable)The predictor — the variable used to predict y; also called the explanatory or input variable
y (Dependent Variable)The outcome — the variable being predicted; also called the response or output variable
Residual (e)The difference between the actual y and the predicted ŷ: e = y − ŷ
OLSOrdinary Least Squares — the method of fitting b₀ and b₁ by minimizing the sum of squared residuals
R² (Coefficient of Determination)Proportion of variance in y explained by x; ranges 0–1; equals r² from Pearson correlation
Pearson rCorrelation coefficient measuring strength and direction of the linear relationship between x and y
Line of Best FitThe regression line ŷ = b₀ + b₁x; minimizes the vertical distance from all data points to the line
Scatter PlotA graph of paired (x, y) data points used to visually inspect the linear relationship before regression
HomoscedasticityThe assumption that residual variance is constant across all levels of x
Regression to the MeanTerm coined by Francis Galton: extreme observations tend to be followed by less extreme ones
Confidence IntervalRange within which the true population slope or mean ŷ likely falls at a given confidence level
Prediction IntervalA wider interval giving the range for an individual y observation at a given x — always wider than a CI
Mean Squared Error (MSE)Average of squared residuals: Σ(y−ŷ)² / (n−2); lower is better
Francis Galton19th-century statistician who coined the term "regression" and discovered regression to the mean
Karl PearsonFormalized the Pearson correlation coefficient (r) and developed much of the mathematics behind regression
scikit-learnPython library with LinearRegression() class for fitting simple and multiple regression models

Interactive Simple Linear Regression Calculator

Enter your x and y values below — one pair per line, separated by a comma. The calculator computes the slope, intercept, regression equation, R², and predicted ŷ for your chosen x value. Results match the manual formula exactly.

Simple Linear Regression Calculator

ŷ = b₀ + b₁x

Frequently Asked Questions

Predicting exam scores from study hours is one of the most common examples of simple linear regression. A regression equation such as ŷ = 45 + 6.5x means each additional hour of study increases the predicted exam score by about 6.5 points. Other everyday examples include predicting house prices from square footage, salary from years of experience, and electricity usage from outdoor temperature.
The slope (b₁) represents the average change in the predicted response (ŷ) for every one-unit increase in the predictor variable (x). For example, if the slope is 4.3 in a salary model where x represents years of experience, each additional year is associated with an average increase of $4,300 in predicted annual salary. The slope describes association, not causation.
R² measures the proportion of variation in the dependent variable that is explained by the regression model. For example, an R² of 0.90 means that 90% of the variation in the outcome is explained by the predictor variable, while the remaining 10% is due to other factors or random variation. A high R² alone does not guarantee that the model is appropriate, so residual plots and regression assumptions should also be checked.
Simple linear regression assumes: (1) a linear relationship between x and y, (2) independent observations, (3) constant variance of residuals (homoscedasticity), and (4) approximately normally distributed residuals. Violating these assumptions can reduce the accuracy and reliability of regression results.
There is no difference. The regression line is the statistical term for the line of best fit. It is calculated using the least squares method, which finds the line that minimizes the sum of the squared vertical distances (residuals) between the observed data points and the predicted values on the line.
No. Simple linear regression identifies relationships between variables but cannot prove that one variable causes another. A statistically significant regression may reflect a genuine association, reverse causation, or the influence of other unmeasured variables. Establishing causation typically requires controlled experiments or specialized causal inference methods.
First calculate the predicted values (ŷ) from the regression equation. Next compute the residual sum of squares (SSR = Σ(y − ŷ)²) and the total sum of squares (SST = Σ(y − ȳ)²). Then calculate R² = 1 − (SSR / SST). In simple linear regression, R² is also equal to the square of the Pearson correlation coefficient (r²).
Avoid simple linear regression when the relationship between variables is clearly non-linear, when the dependent variable is categorical, when multiple predictors are needed, or when regression assumptions are seriously violated. It is also less reliable with very small sample sizes because the estimated regression coefficients can become unstable.

References and Further Reading

  • James, G., Witten, D., Hastie, T., & Tibshirani, R. (2021)An Introduction to Statistical Learning with Applications in R, 2nd ed. Springer. Free PDF at statlearning.com — Chapter 3 covers simple linear regression comprehensively.
  • NIST Engineering Statistics Handbook — "Simple Linear Regression." National Institute of Standards and Technology. itl.nist.gov — Authoritative reference for OLS formulas and regression diagnostics.
  • Penn State STAT 462 — "Applied Regression Analysis." Pennsylvania State University. online.stat.psu.edu/stat462 — Free course notes covering interpretation, diagnostics, and inference.
  • OpenStax Statistics — "Linear Equations." OpenStax College. openstax.org — Free textbook chapter on regression for introductory statistics courses.
  • scikit-learn Documentation — "LinearRegression." scikit-learn.org — Python implementation reference for machine learning applications.
  • Galton, F. (1886) — "Regression towards Mediocrity in Hereditary Stature." Journal of the Anthropological Institute of Great Britain and Ireland, 15, 246–263. — The paper that introduced the term "regression" to statistics.