QUESTION IMAGE
Question
the data below represents an international corporations internal estimates of sales (in thousands of dollars) in the coming year over time (in weeks). use a linear regression to model the data. round all your coefficients to three decimal places. then use a residual plot to determine if your model is a good fit.
| week (x) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| sales (y) (in thousands of dollars) | 1275 | 2635 | 5616 | 11766 | 24698 | 51775 | 108790 | 228467 | 479768 | 1007477 | 2115650 |
Step1: Calculate means of x and y
Let \(x_i\) be the week - number and \(y_i\) be the sales.
\(\bar{x}=\frac{\sum_{i = 1}^{n}x_i}{n}\), where \(n = 11\), \(\sum_{i=1}^{11}x_i=1 + 2+\cdots+11=\frac{11\times(11 + 1)}{2}=66\), so \(\bar{x}=\frac{66}{11}=6\)
\(\bar{y}=\frac{\sum_{i = 1}^{n}y_i}{n}\), \(\sum_{i=1}^{11}y_i=1275+2635+\cdots+2115650\) (sum of all sales values) \(=3103354\), so \(\bar{y}=\frac{3103354}{11}\approx282123.091\)
Step2: Calculate slope \(b_1\)
\(b_1=\frac{\sum_{i = 1}^{n}(x_i-\bar{x})(y_i - \bar{y})}{\sum_{i = 1}^{n}(x_i-\bar{x})^2}\)
\(\sum_{i = 1}^{n}(x_i-\bar{x})^2=(1 - 6)^2+(2 - 6)^2+\cdots+(11 - 6)^2=(- 5)^2+(-4)^2+\cdots+5^2 = 110\)
\(\sum_{i = 1}^{n}(x_i-\bar{x})(y_i - \bar{y})=(1 - 6)(1275-282123.091)+(2 - 6)(2635 - 282123.091)+\cdots+(11 - 6)(2115650-282123.091)\) (calculate each product and sum them) \(=9979499.545\)
\(b_1=\frac{9979499.545}{110}\approx90722.723\)
Step3: Calculate intercept \(b_0\)
\(b_0=\bar{y}-b_1\bar{x}\)
\(b_0 = 282123.091-90722.723\times6=282123.091 - 544336.338=-262213.247\)
The linear regression equation is \(\hat{y}=b_0 + b_1x=-262213.247+90722.723x\)
Step4: Calculate residuals
Residual \(e_i=y_i-\hat{y}_i\) for \(i = 1,2,\cdots,11\). For example, when \(x = 1\), \(\hat{y}_1=-262213.247+90722.723\times1=-171490.524\), \(e_1=1275-(-171490.524)=172765.524\)
Plot the residuals against \(x\) values to check for randomness. If the points are randomly scattered around the horizontal axis, the model is a good fit.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
The linear regression equation is \(\hat{y}=-262213.247 + 90722.723x\). Analyze the residual plot to determine if the model is a good fit.