
William W. answered 11/21/20
Math and science made easy - learn from a retired engineer
First of all, we will assume this is a SAMPLE of the total population. (we use the "n - 1" formula)
Using a TI-84 this is easy. Just plug the data into a list and push the button.
Manually, create a table with "n" in the first column and P(n) in the second column:
n P(n)
1.00 11.00
1.00 11.00
2.00 9.00
3.00 10.00
3.00 8.00
4.00 7.00
4.00 7.00
5.00 4.00
Calculate the mean (average of each)
mean of the x's (aks x-bar) = 2.88
mean of the y's (aks y-bar) = 8.38
Create a third column by subtracting x and x-bar. Then create a fourth column by subtracting y and y-bar.
n P(n) x-(x-bar) y-(y-bar)
1.00 11.00 -1.88 2.63
1.00 11.00 -1.88 2.63
2.00 9.00 -0.88 0.63
3.00 10.00 0.13 1.63
3.00 8.00 0.13 -0.38
4.00 7.00 1.13 -1.38
4.00 7.00 1.13 -1.38
5.00 4.00 2.13 -4.38
Then create a 5th column (x-(x-bar))•(y-(y-bar)) or column 3 times column 4 and sum the 5th column:
n P(n) x-(x-bar) y-(y-bar) (col 4)•(col 5)
1.00 11.00 -1.88 2.63 -4.92
1.00 11.00 -1.88 2.63 -4.92
2.00 9.00 -0.88 0.63 -0.55
3.00 10.00 0.13 1.63 0.20
3.00 8.00 0.13 -0.38 -0.05
4.00 7.00 1.13 -1.38 -1.55
4.00 7.00 1.13 -1.38 -1.55
5.00 4.00 2.13 -4.38 -9.30
Sum: -22.63
Then create a 6th column which is the square of the 3rd column (x - x-bar)2 and a 7th column which is the 4th column squared (y - y-bar)2 and sum those columns:
n P(n) x-(x-bar) y-(y-bar) (col 4)•(col 5) (col 3)2 (col 4)2
1.00 11.00 -1.88 2.63 -4.92 3.52 6.89
1.00 11.00 -1.88 2.63 -4.92 3.52 6.89
2.00 9.00 -0.88 0.63 -0.55 0.77 0.39
3.00 10.00 0.13 1.63 0.20 0.02 2.64
3.00 8.00 0.13 -0.38 -0.05 0.02 0.14
4.00 7.00 1.13 -1.38 -1.55 1.27 1.89
4.00 7.00 1.13 -1.38 -1.55 1.27 1.89
5.00 4.00 2.13 -4.38 -9.30 4.52 19.14
Sum: -22.63 14.88 39.88
r = (sum of column 5)/squareroot(sum of column 6 times the sum of column 7)
r = (-22.63)/√(14.88•39.88)
r = -0.92899
Sx = squareroot(sum of column 6/(n - 1))
Sx = √14.88/(8 - 1) = 1.457738
Sy = squareroot(sum of column 7/(n - 1))
Sx = √39.88/(8 - 1) = 2.386719
The slope of the line (m) = r•Sy/Sx = (-0.92899)•(2.386719)/(1.457738) = -1.52101
The y-intercept of the line = y-bar - slope•x-bar = 8.38 - (-1.52101)(2.88) = 12.7479
So P(n) = -1.52n + 12.75
The slope represent the change in the number of people complaining to the number of cups of coffee he drank.
P(9) = -1.52(9) + 12.75 = -0.93 (not reasonable because the fewest that could complain is zero)
To find the number of cups resulting in zero people complaining, make P(n) = 0
0 = -1.52n + 12.75
1.52n = 12.75
n = 12.75/1.52 = 8.4 cups of coffee