In: Statistics and Probability
1) A psychologist is investigating the relationship between drinking coffee and sleep. She chooses 20 participants and measures how many cups of coffee they had the previous day and how many hours of sleep they got the night before. The data is presented below:
Coffee |
Sleep |
0 |
9.5 |
1 |
9.5 |
4 |
7 |
5 |
6 |
2 |
8 |
3 |
8.5 |
1 |
8 |
1 |
6 |
4 |
6 |
3 |
7 |
6 |
7 |
6 |
7.5 |
2 |
8.5 |
0 |
9 |
1 |
9 |
2 |
7 |
4 |
5 |
3 |
6 |
5 |
7 |
7 |
6 |
For this data you will:
Correlation Matrix:
Coffee | Sleep | |
Coffee | 1 | |
Sleep | -0.62067 | 1 |
Thee value of r in this case (r = -0.62067) indicates that there is a negative, linear relationship of moderate strength between Coffee and Sleep.
Yes, there could be a confounding variable like Stress which is inducing more coffee intake and less sleep simultaneously.
Regression Output:
Regression Statistics | ||||||||
Multiple R | 0.620668258 | |||||||
R Square | 0.385229086 | |||||||
Adjusted R Square | 0.351075146 | |||||||
Standard Error | 1.068654461 | |||||||
Observations | 20 | |||||||
ANOVA | ||||||||
df | SS | MS | F | Significance F | ||||
Regression | 1 | 12.88109756 | 12.88109756 | 11.27919911 | 0.003498911 | |||
Residual | 18 | 20.55640244 | 1.142022358 | |||||
Total | 19 | 33.4375 | ||||||
Coefficients | Standard Error | t Stat | P-value | Lower 95% | Upper 95% | Lower 95.0% | Upper 95.0% | |
Intercept | 8.56402439 | 0.427135851 | 20.04988429 | 9.22673E-14 | 7.666645267 | 9.461403514 | 7.666645267 | 9.461403514 |
Coffee | -0.396341463 | 0.118013143 | -3.358451892 | 0.003498911 | -0.644277877 | -0.14840505 | -0.644277877 | -0.14840505 |
Regression Equation:
Sleep = 8.564 - 0.396*coffee
If coffee cups = 5
Sleep = 8.564 - 0.396*5
= 6.584 hrs
proportionate reduction in error = Coefficient of Determination = R2 = r2
= 0.385
i.e. moderate
Please upvote if you have liked my answer, would be of great help. Thank you.