In: Statistics and Probability
The sales of a company (in million dollars) for each year are shown in the table below. Is there evidence of a linear relationship between the two variables, and are they positively correlated?
x (years since 2010) |
5 |
6 |
7 |
8 |
9 |
y (sales in millions) |
12 |
19 |
29 |
37 |
45 |
a. Assign variables and sketch the scatter gram
b. State the Null and Alternative Hypotheses as if a complete hypothesis test had been conducted.
c. Find the linear correlation coefficient.
d. At what level is there evidence of linear correlation?
e. State the least squares equation and sketch it on the scatter gram.
f. Estimate the income in the year 2021
X | Y | XY | X² | Y² |
5 | 12 | 60 | 25 | 144 |
6 | 19 | 114 | 36 | 361 |
7 | 29 | 203 | 49 | 841 |
8 | 37 | 296 | 64 | 1369 |
9 | 45 | 405 | 81 | 2025 |
Ʃx = | 35 |
Ʃy = | 142 |
Ʃxy = | 1078 |
Ʃx² = | 255 |
Ʃy² = | 4740 |
Sample size, n = | 5 |
x̅ = Ʃx/n = 35/5 = | 7 |
y̅ = Ʃy/n = 142/5 = | 28.4 |
SSxx = Ʃx² - (Ʃx)²/n = 255 - (35)²/5 = | 10 |
SSyy = Ʃy² - (Ʃy)²/n = 4740 - (142)²/5 = | 707.2 |
SSxy = Ʃxy - (Ʃx)(Ʃy)/n = 1078 - (35)(142)/5 = | 84 |
a)
b) Null and alternative hypothesis:
Ho: ρ = 0 ; Ha: ρ ≠ 0
c) Correlation coefficient, r = SSxy/√(SSxx*SSyy) = 84/√(10*707.2) = 0.9989
Test statistic :
t = r*√(n-2)/√(1-r²) = 0.9989 *√(5 - 2)/√(1 - 0.9989²) = 36.3731
df = n-2 = 3
p-value = T.DIST.2T(ABS(36.3731), 3) = 0.0000
Conclusion:
p-value < α Reject the null hypothesis. There is a correlation between x and y.
e) Slope, b = SSxy/SSxx = 84/10 = 8.4
y-intercept, a = y̅ -b* x̅ = 28.4 - (8.4)*7 = -30.4
Regression equation :
ŷ = -30.4 + (8.4) x
f) Predicted value of y at x = 16
ŷ = -30.4 + (8.4) * 16 = 104