Question


Find the equation for the least squares regression line of the data described below.
Lola wants to determine how much bottled water she should stock in her store on any given day. She believes that sales of bottled water are much higher on hotter days. To test this hypothesis, Lola tracked her water bottle sales over several days.
She recorded the high temperature (in Celsius), x, and the number of bottles sold, y, each day.
Temperature (in Celsius) Bottles
31.21 157
33.50 153
35.12 178
35.88 173
37.70 185
Round your answers to the nearest thousandth.
y=
x+

Answers

GPT-4o mini
To find the least squares regression line for the given data, we can use the formula for the slope \(m\) and the intercept \(b\) of the regression line:

1. **Calculate the necessary sums:**
- \( n \): number of data points
- \( \sum x \): sum of x-values (temperatures)
- \( \sum y \): sum of y-values (bottles sold)
- \( \sum xy \): sum of the product of each pair \((x, y)\)
- \( \sum x^2 \): sum of the squares of the x-values

2. **Formulas for slope \(m\) and intercept \(b\)**:
- Slope \(m\) is calculated as:
\[
m = \frac{n \sum (xy) - \sum x \sum y}{n \sum (x^2) - (\sum x)^2}
\]
- Intercept \(b\) is calculated as:
\[
b = \frac{\sum y - m \sum x}{n}
\]

### Given Data
\[
\begin{align*}
x: & \ 31.21, \ 33.50, \ 35.12, \ 35.88, \ 37.70 \\
y: & \ 157, \ 153, \ 178, \ 173, \ 185 \\
\end{align*}
\]

### Steps
1. Calculate sums:
- \( n = 5 \)
- \( \sum x = 31.21 + 33.50 + 35.12 + 35.88 + 37.70 = 173.41 \)
- \( \sum y = 157 + 153 + 178 + 173 + 185 = 846 \)
- \( \sum xy = (31.21 \cdot 157) + (33.50 \cdot 153) + (35.12 \cdot 178) + (35.88 \cdot 173) + (37.70 \cdot 185) = 4901.57 + 5135.5 + 6245.16 + 6219.64 + 6969.5 = 29971.37 \)
- \( \sum x^2 = (31.21^2) + (33.50^2) + (35.12^2) + (35.88^2) + (37.70^2) = 975.0641 + 1122.25 + 1236.0544 + 1285.0544 + 1421.29 = 5039.6489 \)

### Calculate \( m \) and \( b \):
\[
\begin{align*}
m & = \frac{5(29971.37) - (173.41)(846)}{5(5039.6489) - (173.41)^2} \\
& = \frac{149856.85 - 146403.86}{25198.2445 - 30070.4681} \\
& = \frac{3452.99}{25198.2445 - 30070.4681} \\
& = \frac{3452.99}{-4872.2236} \\
& \approx -0.708 \\
\end{align*}
\]

Then calculate \(b\):
\[
\begin{align*}
b & = \frac{846 - (-0.708)(173.41)}{5} \\
& = \frac{846 + 122.79348}{5} \\
& = \frac{968.79348}{5} \\
& \approx 193.758696 \\
& \approx 193.759 \\
\end{align*}
\]

### Final Equation
The least squares regression line can thus be represented as:
\[
y = -0.708x + 193.759
\]

Rounded to the nearest thousandth, the answer is:
\[
\boxed{y = -0.708x + 193.759}
\]