Question: Find the linear function that is the best fit for the data.
x 1 3 5 7 9
y 7 12 17 22 27
What is the linear function of the data?
y = [ ]x + ( [ ] )
(Type integers or decimals.)
1. **State the problem:** We need to find the linear function $y = mx + b$ that best fits the given data points $(1,7), (3,12), (5,17), (7,22), (9,27)$.
2. **Formula for linear regression slope and intercept:**
$$m = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2}$$
$$b = \frac{\sum y - m \sum x}{n}$$
where $n$ is the number of points.
3. **Calculate sums:**
- $n = 5$
- $\sum x = 1 + 3 + 5 + 7 + 9 = 25$
- $\sum y = 7 + 12 + 17 + 22 + 27 = 85$
- $\sum xy = (1)(7) + (3)(12) + (5)(17) + (7)(22) + (9)(27) = 7 + 36 + 85 + 154 + 243 = 525$
- $\sum x^2 = 1^2 + 3^2 + 5^2 + 7^2 + 9^2 = 1 + 9 + 25 + 49 + 81 = 165$
4. **Calculate slope $m$:**
$$m = \frac{5 \times 525 - 25 \times 85}{5 \times 165 - 25^2} = \frac{2625 - 2125}{825 - 625} = \frac{500}{200} = 2.5$$
5. **Calculate intercept $b$:**
$$b = \frac{85 - 2.5 \times 25}{5} = \frac{85 - 62.5}{5} = \frac{22.5}{5} = 4.5$$
6. **Final linear function:**
$$y = 2.5x + 4.5$$
This function best fits the data points given.