In: Other
Café Michigan's manager, Gary Stark, suspects that demand for mocha latte coffees depends on the price being charged. Based on historical observations, Gary has gathered the following data, which show the numbers of these coffees sold over six different price values:
Price Number Sold
$2.70 765
$3.60 510
$2.00 975
$4.10 245
$3.10 325
$4.05 475
Using these data, how many mocha latte coffees would be forecast to
be sold according to simple linear regression if the price per cup
were $1.80? round to one decimal
Solution:
Simple regression equation can be calculated as
Y = a + bX
Here Y is dependent variable which is Number sold
X is independent variable which is Price
a is intercept of regression line
b is the slope of regression line
Slope of line can be calculated as
Slope = (n*summation(XY) - Summation(X)*Summation(Y)) /
(n*Summation(X^2) - (Summation(X))^2)
Price(X) |
Number Sold(Y) |
X^2 |
Y^2 |
XY |
2.7 |
765 |
7.29 |
585225 |
2065.5 |
3.6 |
510 |
12.96 |
260100 |
1836 |
2 |
975 |
4 |
950625 |
1950 |
4.10 |
245 |
16.81 |
60025 |
1004.5 |
3.10 |
325 |
9.61 |
105625 |
1007.5 |
4.05 |
475 |
16.4025 |
225625 |
1923.75 |
19.55 |
3295 |
67.0725 |
2187225 |
9787.25 |
Slope = (6*9787.25 - 19.55*3295)/(10*67.0725 - 19.55*19.55) =
-281.4
Intercept can be calculated as = (Summation(Y) -
Slope*Summation(X))/6 = (3295+281.4*19.55)/6 = 1466.1
So regression line is
Y = 1466.1 - 281.4*X
given in the question X= 1.80 So from regression equation, we can
forecast to be sold mocha latte coffees
Y = 1466.1 - 281.4*1.80 = 959.56 or 959.6