Regression Line of Y on X 📉
The Regression Line of Y on X is the best fit line that estimates the average value of Y for a given value of X.
- Dependent Variable: Y (We want to predict this)
- Independent Variable: X (We know this)
The Equation 📐
The algebraic equation is:
Yc = a + bX
Where:
Yc= Computed/Estimated value of Ya= Y-interceptb= Slope of the line (b_yx)
Calculating 'a' and 'b' (Least Squares Method) 🧮
To find the values of 'a' and 'b', we solve the following Normal Equations:
∑ Y = Na + b ∑ X∑ XY = a ∑ X + b ∑ X²
Note: Since these are tedious to solve every time, we use a simpler formula based on deviations.
The Deviation Formula (Preferred Method) ✨
Instead of solving simultaneous equations, we use the regression coefficient b_yx and the means of X and Y.
The Formula:
(Y - Ȳ) = b_yx (X - X̄)
Where:
Ȳ= Mean of Y seriesX̄= Mean of X seriesb_yx= Regression Coefficient of Y on X
Calculating b_yx (Regression Coefficient)
There are multiple ways to calculate b_yx depending on the data:
1. Using Actual Means (X̄, Ȳ are integers):
b_yx = (∑ xy) / (∑ x²)
(Where x = X - X̄ and y = Y - Ȳ)
2. Using Assumed Mean (Shortcut Method):
b_yx = [N ∑ dx dy - (∑ dx)(∑ dy)] / [N ∑ dx² - (∑ dx)²]
3. Using Standard Deviation and Correlation:
b_yx = r * (σy / σx)
r= Correlation Coefficientσy= Standard Deviation of Yσx= Standard Deviation of X
Properties of b_yx 🧐
- It measures the change in Y for a unit change in X.
- If
b_yxis positive, Y increases as X increases. - Its value can be greater than 1 (unlike correlation
r). - It has the same sign as
randb_xy.
Example Calculation 📝
Data: X: 1, 2, 3, 4, 5 Y: 2, 5, 3, 8, 7
Step 1: Find Means
X̄ = 3, Ȳ = 5
Step 2: Calculate Deviations (x, y)
| X | Y | x (X-3) | y (Y-5) | x² | xy |
|---|---|---|---|---|---|
| 1 | 2 | -2 | -3 | 4 | 6 |
| 2 | 5 | -1 | 0 | 1 | 0 |
| 3 | 3 | 0 | -2 | 0 | 0 |
| 4 | 8 | 1 | 3 | 1 | 3 |
| 5 | 7 | 2 | 2 | 4 | 4 |
| Sum | 0 | 0 | 10 | 13 |
Step 3: Calculate b_yx
b_yx = (∑ xy) / (∑ x²) = 13 / 10 = 1.3
Step 4: Form the Equation
Y - 5 = 1.3(X - 3)
Y - 5 = 1.3X - 3.9
Y = 1.3X + 1.1
Now, if X = 6, then Y = 1.3(6) + 1.1 = 7.8 + 1.1 = 8.9.
Summary
To fit the line of Y on X:
- Calculate Means (
X̄,Ȳ). - Calculate
b_yx. - Substitute in
Y - Ȳ = b_yx(X - X̄).
Loading quiz…