QUESTION IMAGE
Question
- the total number, y, of people in a grocery store x hours after it opens is shown in this table.
| hours | total people |
|---|---|
| 2 | 9 |
| 3 | 15 |
| 4 | 25 |
| 5 | 22 |
| 6 | 30 |
the data is modeled with a best - fit linear function. which total number of people was closest to the predicted value for that hour?
a. 5
b. 9
c. 22
d. 30
Step1: Calculate Mean of x and y
First, find the mean of \( x \) (hours) and \( y \) (total people).
\( x \)-values: \( 1, 2, 3, 4, 5, 6 \)
Mean of \( x \): \( \bar{x} = \frac{1 + 2 + 3 + 4 + 5 + 6}{6} = \frac{21}{6} = 3.5 \)
\( y \)-values: \( 5, 9, 15, 25, 22, 30 \)
Mean of \( y \): \( \bar{y} = \frac{5 + 9 + 15 + 25 + 22 + 30}{6} = \frac{106}{6} \approx 17.67 \)
Step2: Calculate Slope (m) of Best-Fit Line
Slope formula: \( m = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sum (x_i - \bar{x})^2} \)
Calculate \( (x_i - \bar{x})(y_i - \bar{y}) \) for each \( i \):
- \( (1 - 3.5)(5 - 17.67) = (-2.5)(-12.67) = 31.675 \)
- \( (2 - 3.5)(9 - 17.67) = (-1.5)(-8.67) = 13.005 \)
- \( (3 - 3.5)(15 - 17.67) = (-0.5)(-2.67) = 1.335 \)
- \( (4 - 3.5)(25 - 17.67) = (0.5)(7.33) = 3.665 \)
- \( (5 - 3.5)(22 - 17.67) = (1.5)(4.33) = 5.995 \)
- \( (6 - 3.5)(30 - 17.67) = (2.5)(12.33) = 30.825 \)
Sum of these: \( 31.675 + 13.005 + 1.335 + 3.665 + 5.995 + 30.825 = 86.5 \)
Calculate \( (x_i - \bar{x})^2 \) for each \( i \):
- \( (1 - 3.5)^2 = 6.25 \)
- \( (2 - 3.5)^2 = 2.25 \)
- \( (3 - 3.5)^2 = 0.25 \)
- \( (4 - 3.5)^2 = 0.25 \)
- \( (5 - 3.5)^2 = 2.25 \)
- \( (6 - 3.5)^2 = 6.25 \)
Sum of these: \( 6.25 + 2.25 + 0.25 + 0.25 + 2.25 + 6.25 = 17.5 \)
Slope \( m = \frac{86.5}{17.5} \approx 4.943 \)
Step3: Calculate Y-Intercept (b)
Using \( \bar{y} = m\bar{x} + b \):
\( 17.67 = 4.943(3.5) + b \)
\( 17.67 = 17.3005 + b \)
\( b \approx 17.67 - 17.3005 = 0.3695 \)
Best-fit line: \( y = 4.943x + 0.3695 \)
Step4: Predict y for Each x and Find Residuals
- For \( x = 1 \): \( y = 4.943(1) + 0.3695 \approx 5.31 \); Residual: \( |5 - 5.31| = 0.31 \)
- For \( x = 2 \): \( y = 4.943(2) + 0.3695 \approx 10.25 \); Residual: \( |9 - 10.25| = 1.25 \)
- For \( x = 5 \): \( y = 4.943(5) + 0.3695 \approx 25.08 \); Residual: \( |22 - 25.08| = 3.08 \)
- For \( x = 6 \): \( y = 4.943(6) + 0.3695 \approx 30.03 \); Residual: \( |30 - 30.03| = 0.03 \) Wait, but wait—wait, the options are A (5), B (9), C (22), D (30). Wait, maybe miscalculation? Wait, no—wait, the best-fit line is linear, but let's check the residual for each option:
Wait, actually, the residual is the absolute difference between actual \( y \) and predicted \( y \). Let's recalculate predictions:
For \( x=1 \): \( y = 4.943(1) + 0.37 \approx 5.31 \), residual \( |5 - 5.31| = 0.31 \)
For \( x=2 \): \( y = 4.943(2) + 0.37 \approx 10.26 \), residual \( |9 - 10.26| = 1.26 \)
For \( x=5 \): \( y = 4.943(5) + 0.37 \approx 25.09 \), residual \( |22 - 25.09| = 3.09 \)
For \( x=6 \): \( y = 4.943(6) + 0.37 \approx 30.03 \), residual \( |30 - 30.03| = 0.03 \). But wait, the option D is 30. But wait, maybe I made a mistake in slope? Wait, alternatively, maybe the best-fit line is calculated with two points (e.g., first and last). Let's try that: points (1,5) and (6,30). Slope \( m = \frac{30 - 5}{6 - 1} = 5 \). Then equation: \( y - 5 = 5(x - 1) \) → \( y = 5x \). Then predictions:
- \( x=1 \): \( y=5 \), residual 0
- \( x=2 \): \( y=10 \), residual 1
- \( x=3 \): \( y=15 \), residual 0 (wait, actual is 15, so residual 0)
- \( x=4 \): \( y=20 \), residual 5 (actual 25)
- \( x=5 \): \( y=25 \), residual 3 (actual 22)
- \( x=6 \): \( y=30 \), residual 0
But the problem says "best-fit linear function" (not necessarily through first and last). But the residual for \( x=6 \) (D:30) is very small (0.03 with the first calculation, 0 with the two-point line). But wait, the options are A (5), B (9), C (22), D (30). Wait, but when \( x=6 \), actual is 30, predicted is ~30.03, so residual ~0.03. For \( x=1 \), predi…
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
D. 30