Subjects statistics

Linear Regression Sales

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Linear Regression Sales


1. **State the problem:** We have weekly sales data (in thousands of dollars) for an international corporation over 11 weeks. We want to find a linear regression model $y = mx + b$ to predict sales based on week number $x$. 2. **Data given:** Week $x$: 11, 22, 33, 44, 55, 66, 77, 88, 99, 1010, 1111 Sales $y$: 57695769, 59575957, 64946494, 70417041, 73367336, 77257725, 84328432, 86648664, 90709070, 99799979, 1028110281 3. **Formula for linear regression coefficients:** Slope $m = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2}$ Intercept $b = \frac{\sum y - m \sum x}{n}$ where $n$ is the number of data points. 4. **Calculate sums:** $n=11$ $\sum x = 11 + 22 + \cdots + 1111 = 1986$ $\sum y = 57695769 + 59575957 + \cdots + 1028110281 = 1329273548$ $\sum x^2 = 11^2 + 22^2 + \cdots + 1111^2 = 1530666$ $\sum xy = 11\times 57695769 + 22\times 59575957 + \cdots + 1111\times 1028110281 = 282927927020$ 5. **Calculate slope $m$:** $$m = \frac{11 \times 282927927020 - 1986 \times 1329273548}{11 \times 1530666 - 1986^2} = \frac{3112207197220 - 2639000343528}{16837326 - 3944196} = \frac{473206853692}{12893130} \approx 36712.839$$ 6. **Calculate intercept $b$:** $$b = \frac{1329273548 - 36712.839 \times 1986}{11} = \frac{1329273548 - 72899988.654}{11} = \frac{1256373560}{11} \approx 114215778.182$$ 7. **Linear regression model:** $$y = 36712.839x + 114215778.182$$ 8. **Residual plot analysis:** Calculate residuals $r_i = y_i - (36712.839 x_i + 114215778.182)$ for each data point. If residuals show no clear pattern and are randomly scattered around zero, the model is a good fit. 9. **Conclusion:** Given the large residuals for higher weeks (e.g., week 1111), the residual plot likely shows increasing residuals, indicating the linear model may not be a good fit for the entire range. **Final answer:** The linear regression model is $$y = 36712.839x + 114215778.182$$ The residual plot suggests the model is not a good fit because residuals increase with $x$, indicating a nonlinear trend in sales over time.