Example
Determine the regression equation by finding the regression slope coefficient and the intercept value using the following data.
x 55 60 65 70 80
y 52 54 56 58 62beta1=0.4
so the regression equation is y=30+0.4x
Easy Method (Using Summations)
The regression equation is
where
and
This method only requires the columns , , , and .
Step 1: Prepare the Table
| x | y | x² | xy |
|---|
| 55 | 52 | 3025 | 2860 |
| 60 | 54 | 3600 | 3240 |
| 65 | 56 | 4225 | 3640 |
| 70 | 58 | 4900 | 4060 |
| 80 | 62 | 6400 | 4960 |
| | |
|
Σ 330 282 22150 18760Also,
-
-
-
-
-
Step 2: Calculate the Slope
Substitute the values:
Step 3: Calculate the Intercept
Substitute the values:
Step 4: Regression Equation
Example
The values of x and their corresponding values of y are shown in the table below. Find the least square regression lineEstimate the value of y when x=10x=0 1 2 3 4
y=2 3 5 4 6
Create Calculation Table
| | |
|
|---|
| 0 | 2 | 0 | 0 |
| 1 | 3 | 1 | 3 |
| 2 | 5 | 4 | 10 |
| 3 | 4 | 9 | 12 |
| 4 | 6 | 16 | 24 |
🔸 Compute Sums
🔹 Formula for (Slope)
🔸 Substitute values
🔹 Formula for(Intercept)
🔸 Substitute values
✅ Regression Line
✅ Estimate y when x=10
✅ Final Answer
-
Estimated value at :
Example
Use the following data to construct a linear regression model for the auto insurance premium as a function of driving experience.
DrivingExp |5 |2 |12|9 |15 |6 |25 |16
MonthlyPremium |64|87|50|71|44 |56 |42 |60
Construct Calculation Table
|
|
|
|
|---|
| 5 | 64 | 25 | 320 |
| 2 | 87 | 4 | 174 |
| 12 | 50 | 144 | 600 |
| 9 | 71 | 81 | 639 |
| 15 | 44 | 225 | 660 |
| 6 | 56 | 36 | 336 |
| 25 | 42 | 625 | 1050 |
| 16 | 60 | 256 | 960 |
Compute Sums
Compute Slope
Substitute:
Final:
Compute Intercept β0
Substitute:
✅ Regression Model
Example
Predict the price of a 1000 square feet house using the regression model generated from the following data.Square feet Price(Lakhs)
500 5
900 10
1200 13
1500 18
2000 25
2500 32
2700 35
Construct Table
|
|
|
|
|---|
| 500 | 5 | 250000 | 2500 |
| 900 | 10 | 810000 | 9000 |
| 1200 | 13 | 1440000 | 15600 |
| 1500 | 18 | 2250000 | 27000 |
| 2000 | 25 | 4000000 | 50000 |
| 2500 | 32 | 6250000 | 80000 |
| 2700 | 35 | 7290000 | 94500 |
Compute Sums
Compute Slopeβ1
Substitute:
Final:
Compute Intercept β0
Substitute:
✅ Regression Model
Predict Price for 1000 sq.ft
✅ Final Answer
-
Predicted price for 1000 sq.ft:
Comments
Post a Comment