In: Statistics and Probability
A random selection of students at a school were chosen at random and how long they spent eating compared to how many calories they consumed was recorded as the following:
Time, minutes |
21.4 |
30.8 |
37.7 |
33.5 |
32.8 |
39.5 |
22.8 |
Calories |
472 |
498 |
465 |
456 |
423 |
437 |
508 |
Time, minutes |
34.1 |
33.9 |
43.8 |
42.4 |
43.1 |
29.2 |
31.3 |
Calories |
431 |
479 |
454 |
450 |
410 |
504 |
437 |
Time, minutes |
28.6 |
32.9 |
30.6 |
35.1 |
33.0 |
43.7 |
|
Calories |
489 |
436 |
480 |
439 |
444 |
408 |
1. Make a scatterplot for the data
2. Find the LSRL
3. Describe the slope and the y-intercept, do they make sense?
4. Create a Residual Plot for the data
5. Create a 95% confidence interval for the slope of the line
1)
2)
x | y | (x-x̅)² | (y-ȳ)² | (x-x̅)(y-ȳ) |
21.4 | 472 | 159.0121 | 256.0000 | -201.7600 |
30.8 | 498 | 10.3041 | 1764.0000 | -134.8200 |
37.7 | 465 | 13.6161 | 81.0000 | 33.2100 |
33.5 | 456 | 0.2601 | 0.0000 | 0.0000 |
32.8 | 423 | 1.4641 | 1089.0000 | 39.9300 |
39.5 | 437 | 30.1401 | 361.0000 | -104.3100 |
22.8 | 508 | 125.6641 | 2704.0000 | -582.9200 |
34.1 | 431 | 0.0081 | 625.0000 | -2.2500 |
33.9 | 479 | 0.0121 | 529.0000 | -2.5300 |
43.8 | 454 | 95.8441 | 4.0000 | -19.5800 |
42.4 | 450 | 70.39 | 36.00 | -50.34 |
43.1 | 410 | 82.63 | 2116.00 | -418.14 |
29.2 | 504 | 23.14 | 2304.00 | -230.88 |
31.3 | 437 | 7.34 | 361.00 | 51.49 |
28.6 | 489 | 29.27 | 1089.00 | -178.53 |
32.9 | 436 | 1.23 | 400.00 | 22.20 |
30.6 | 480 | 11.63 | 576.00 | -81.84 |
35.1 | 439 | 1.19 | 289.00 | -18.53 |
33 | 444 | 1.02 | 144.00 | 12.12 |
43.7 | 408 | 93.90 | 2304.00 | -465.12 |
ΣX | ΣY | Σ(x-x̅)² | Σ(y-ȳ)² | Σ(x-x̅)(y-ȳ) | |
total sum | 680.20 | 9120.00 | 758.06 | 17032.00 | -2332.60 |
mean | 34.01 | 456.00 | SSxx | SSyy | SSxy |
sample size , n = 20
here, x̅ = Σx / n= 34.010 ,
ȳ = Σy/n =
456.000
SSxx = Σ(x-x̅)² = 758.0580
SSxy= Σ(x-x̅)(y-ȳ) = -2332.6
estimated slope , ß1 = SSxy/SSxx = -2332.6
/ 758.058 = -3.07707
intercept, ß0 = y̅-ß1* x̄ =
560.65126
so, regression line is Ŷ =
560.651 + -3.077
*x
3) slope: for every minutes increase in time spent on eating, calorie consumed get decreased by 3.077
4)
5)
confidence interval for slope
α= 0.05
t critical value= t α/2 =
2.101 [excel function: =t.inv.2t(α/2,df) ]
estimated std error of slope = Se/√Sxx =
23.39803 /√ 758.06
= 0.850
margin of error ,E= t*std error = 2.101
* 0.850 = 1.785
estimated slope , ß^ = -3.0771
lower confidence limit = estimated slope - margin of error
= -3.0771 - 1.785
= -4.8625
upper confidence limit=estimated slope + margin of error
= -3.0771 + 1.785
= -1.2917