In: Statistics and Probability
Calculate the Coefficient of Correlation and the Least Squares Equation for the following data, hours of study (x) and hours of sleep(y). Using your equation, if the hours of study is 5, what is the expected hours of sleep? For any credit, make sure you show your work and submit a PDF or picture of it via the test assignment in Week 5. Hours of Study Hours of Sleep 2 10 6 6 6 5 3 9 2 12
Hours of Study | Hours of Sleep | X * Y | X2 | Y2 | |
X | Y | ||||
2 | 10 | 20 (2*10) | 4 | 100 | |
6 | 6 | 36 (6*6) | 36 | 36 | |
6 | 5 | 30 (6*5) | 36 | 25 | |
3 | 9 | 27 (3*9) | 9 | 81 | |
2 | 12 | 24 (2*12) | 4 | 144 | |
Total | 19 | 42 | 137 | 89 | 386 |
Average | 3.8 | 8.4 |
Least Square equation is as follows
Y = mX + b
Where, X represents hours of study
Y represents hours of sleep
Where, m is slope of the line
b is Y intercept
To calculate m
m =
m =
m = - 1.345
To calculate b
b =
b =
b = 13.512
Putting this values in the equation
Y = mX + b
Y = -1.345 X + 13.512
If the hours of study is 5, what is the expected hours of sleep?
We have, hours of study X = 5, find Y
Y = -1.345 X + 13.512
Y = -1.345 *5 + 13.512
Y = 6.786 7
if the hours of study is 5, will require 7 hours of sleep.
Coefficient of Correlation
Hours of Study | Hours of Sleep | ||||||
X | Y | ||||||
2 | 10 | -1.8 | 1.6 | -2.88 | 3.24 | 2.56 | |
6 | 6 | 2.2 | -2.4 | -5.28 | 4.84 | 5.76 | |
6 | 5 | 2.2 | -3.4 | -7.48 | 4.84 | 11.56 | |
3 | 9 | -0.8 | 0.6 | -0.48 | 0.64 | 0.36 | |
2 | 12 | -1.8 | 3.6 | -6.48 | 3.24 | 12.96 | |
19 | 42 | 0 | 0 | -22.6 | 16.8 | 33.2 | |
3.8 | 8.4 |