In: Statistics and Probability
A psychologist noted that people have more difficulty sleeping in a bright room than in a dark room. She measured whether the intensity of the light could predict the time it took a sample of 4 participants to fall asleep. The data for this hypothetical study are listed in the following table.
Intensity
of Light (in watts) |
Time It
Took to Sleep (in minutes) |
---|---|
X | Y |
5 | 13 |
10 | 20 |
20 | 32 |
40 | 37 |
Compute an analysis of regression for this hypothetical study. (Round your answers to two decimal places.)
Source of Variation |
SS | df | MS | Fobt |
---|---|---|---|---|
Regression | 1 | |||
Residual (error) | ||||
Total |
First we have to construct below table using give data in order to compute regression equation
X | Y | X2 | Y2 | X*Y | |
5 | 13 | 25 | 169 | 65 | |
10 | 20 | 100 | 400 | 200 | |
20 | 32 | 400 | 1024 | 640 | |
40 | 37 | 1600 | 1369 | 1480 | |
Total | = 75 | = 102 | = 2125 | = 2962 | = 2385 |
We know that, the regression equation is
Where a is intercept and b is the slop and are calculated by using below formulae
Substitute these values in equation (i), we get
Now we have to construct below table using above equation (ii), we get
X | Y | X2 | Y2 | X*Y | (Y - )^2 | ( - )^2 | (Y - )^2 | ||
5 | 13 | 25 | 169 | 65 | 16.46087 | 11.97762 | 81.70587902 | 156.25 | |
10 | 20 | 100 | 400 | 200 | 19.74783 | 0.063592 | 33.08750473 | 30.25 | |
20 | 32 | 400 | 1024 | 640 | 26.32174 | 32.24265 | 0.675255198 | 42.25 | |
40 | 37 | 1600 | 1369 | 1480 | 39.46957 | 6.098752 | 195.1487524 | 132.25 | |
Total | 75 | 102 | 2125 | 2962 | 2385 | 102 | 50.38261 | 310.6173913 | 361 |
Now we can find sum of squared regression (SSR), sum of squared error (SSE) and sum of squared total (SST) using below formulae and above table values
Where is the mean of predicted values () which is 25.50
Where is the mean of Y values, which is 25.5
Calculation of degrees of freedom:
Now we have to find the degrees sum of square for regression (dfreg), degrees sum of square for error or residual (dfres) and degrees sum of square for total (dftot) using below formulae, we get
dfreg = number of degrees of freedom for the regression sum of squares which is equal to the number of coefficients in the equation - 1 = 2 - 1 = 1
dftot = total number of observations - 1 = 4 - 1 = 3
dfres = dftot - dfreg = 3 - 1 = 2
Calculation of Mean sum square:
Now we have to find mean sum square for regression (MSreg) and mean sum square for error or residual (MSres) using below formulae
MSreg = SSR / dfreg = 310.6174 / 1 = 310.6174
MSres = SSE / dfres = 50.3826 / 2 = 25.1913
Calculation of F value:
F value is calculated using below formula, we get
F = MSreg / MSres = 310.6174 / 25.1913 = 12.3303
From the above values, we can construct below table
Source of Variation | SS | DF | MS | F |
Regression | 310.62 | 1 | 310.62 | 12.33 |
Residual (Error) | 50.38 | 2 | 25.19 | |
Total | 361 | 3 |