🎓 Statistics & Data • Correlation & Regression
100% Client-Side Privacy
Regression Calculator
Comprehensive bivariate regression model evaluator producing line parameters and forecast calculations.
Bivariate Linear Modeling Suite
Linear Regression, Correlation & Residuals
Fit ordinary least-squares regression lines, calculate Pearson and Spearman coefficients, examine residuals, and make predictions.
Independent Variable X (Explanatory)7 values
Dependent Variable Y (Response)7 values
Presets:
Ordinary Least Squares Regression Equation
ŷ = 2.225x - 0.4571
Correlation:Very Strong Positive(r = 0.9968)
Pearson r0.9968
R² Explained99.37%
Slope (m)2.225
Sample Covariance10.3833
Fitted Scatter Plot & Residual Errors
Observed Data Point (x_i, y_i) Regression Line ŷ = mx + b Residual (y - ŷ) Predicted Point (x_p, ŷ_p)
Interactive Linear PredictorEvaluate ŷ = 2.225 · (x) - 0.4571
⟹ŷ = 17.3429
Model Diagnostics & Sum of Squares Table
Spearman Rank (r_s)1
Residual Std Error (s_e)0.4194
Slope t-Statistic28.07 (df = 5)
Sum of Squared Errors (SSE)0.8796
Regression SS (SSR)138.6175
Total SS (SST)139.4971
Step-by-Step Mathematical Derivations
1. Dataset Summary Totals:
- N = 7, Mean X (x̄) = 4, Mean Y (ȳ) = 8.4429
- ΣX = 28, ΣY = 59.1, ΣX² = 140, ΣY² = 638.47, ΣXY = 298.7
2. Sum of Squares:
- SS_xx = ΣX² - (ΣX)² / N = 140 - (28)² / 7 = 28
- SS_yy = ΣY² - (ΣY)² / N = 638.47 - (59.1)² / 7 = 139.4971
- SS_xy = ΣXY - (ΣX · ΣY) / N = 298.7 - (28 · 59.1) / 7 = 62.3
3. Slope & Intercept Calculation:
- Slope m = SS_xy / SS_xx = 62.3 / 28 = 2.225
- Intercept b = ȳ - m · x̄ = 8.4429 - (2.225 · 4) = -0.4571
4. Pearson Correlation & R²:
- r = SS_xy / √(SS_xx · SS_yy) = 62.3 / √(28 · 139.4971) = 0.9968
- R² = r² = (0.9968)² = 0.9937 (99.37% of variance explained)
What is Regression Analysis?
Regression analysis estimates relationships among variables, modeling how dependent variable Y changes when independent variable X varies.
Formula & Step-by-Step Calculation
ŷ = β₀ + β₁x, β₁ = Cov(X, Y) / Var(X)
Least squares best-fit regression parameters.
Worked Step-by-Step Examples
Example 1
Regression for X: (1, 2, 3, 4) and Y: (2, 5, 8, 11)
Solution: ŷ = 3.00x - 1.00
• Slope = 3.00; Intercept = -1.00
Common Real-World & Academic Use Cases
- ✓ Sales demand forecasting
- ✓ Crop yield vs fertilizer optimization
- ✓ Carbon emissions trend modeling
How to Use the Regression Calculator
1
Input X & Y Data
Enter bivariate numbers.
2
Review Model
Inspect equation and regression parameters.
Frequently Asked Questions
Q: What does the intercept represent?
The predicted value of Y when X equals zero.