In: Math
A real estate agent wants to study the relationship between the size of an apartment and its monthly rent price. The table below presents the size in square feet and the monthly rent in dollars, for a sample of apartments in a suburban neighborhood.
Rent ($) | 720 | 595 | 915 | 760 | 1000 | 790 | 880 | 845 | 650 | 748 | 685 | 755 | 815 | 745 | 715 | 885 |
Size (Square Feet) | 1000 | 900 | 1200 | 810 | 1210 | 860 | 1135 | 960 | 800 | 960 | 650 | 970 | 1000 | 1000 | 1000 | 1180 |
Calculate the correlation between these two variables.
If a linear regression model were fit, what is the value of the slope and the value of the y-intercept?
In a test for the slope of the regression line being equal to zero versus the two-sided alternate, what is the value of the test statistic and the p-value?
Size X | Rent ($) Y | X * Y | X2 | Y2 | |
1000 | 720 | 720000 | 1000000 | 518400 | |
900 | 595 | 535500 | 810000 | 354025 | |
1200 | 915 | 1098000 | 1440000 | 837225 | |
810 | 760 | 615600 | 656100 | 577600 | |
1210 | 1000 | 1210000 | 1464100 | 1000000 | |
860 | 790 | 679400 | 739600 | 624100 | |
1135 | 880 | 998800 | 1288225 | 774400 | |
960 | 845 | 811200 | 921600 | 714025 | |
800 | 650 | 520000 | 640000 | 422500 | |
960 | 748 | 718080 | 921600 | 559504 | |
650 | 685 | 445250 | 422500 | 469225 | |
970 | 755 | 732350 | 940900 | 570025 | |
1000 | 815 | 815000 | 1000000 | 664225 | |
1000 | 745 | 745000 | 1000000 | 555025 | |
1000 | 715 | 715000 | 1000000 | 511225 | |
1180 | 885 | 1044300 | 1392400 | 783225 | |
Total | 15635 | 12503 | 12403480 | 15637025 | 9934729 |
r = 0.7647
Equation of regression line is Ŷ = a + bX
b = ( n Σ(XY) - (ΣX* ΣY) ) / ( n Σ X2 - (ΣX)2
)
b = ( 16 * 12403480 - 15635 * 12503 ) / ( 16 * 15637025 - ( 15635
)2)
b = 0.5177
a =( ΣY - ( b * ΣX ) ) / n
a =( 12503 - ( 0.5177 * 15635 ) ) / 16
a = 275.5298
Equation of regression line becomes Ŷ = 275.5298 + 0.5177
X
To Test :-
Sxx =Σ (Xi - X̅ ) | Syy = Σ( Yi - Y̅ ) | Sxy = Σ (Xi - X̅ ) * (Yi - Y̅) |
520.4102 | 3774.566 | -1401.54 |
5957.91 | 34758.94 | 14390.64 |
49645.41 | 17838.94 | 29759.39 |
27951.66 | 459.5664 | 3584.082 |
54201.66 | 47769.57 | 50884.08 |
13732.91 | 73.31641 | -1003.42 |
24904.79 | 9714.566 | 15554.39 |
295.4102 | 4040.191 | -1092.48 |
31395.41 | 17275.82 | 23289.08 |
295.4102 | 1118.066 | 574.707 |
107051.7 | 9300.191 | 31553.14 |
51.66016 | 698.9414 | 190.0195 |
520.4102 | 1126.441 | 765.6445 |
520.4102 | 1327.691 | -831.23 |
520.4102 | 4413.941 | -1515.61 |
41132.91 | 10725.19 | 21003.77 |
358698.4 | 164415.9 | 185704.7 |
X̅ = Σ (Xi / n ) = 15635/16 = 977.1875
Y̅ = Σ (Yi / n ) = 12503/16 = 781.4375
H1 :-
H0 :-
Test Statistic :-
S2 = ( 164415.9375 - 0.5177 * 185704.6875 ) / 16 -
2
S2 = 4876.9015
S = 69.8348
t = 4.4399
P - value = P ( t > 4.4399 ) = 0.0006