1. **Problem Statement:**
Calculate the linear regression equation of maintenance cost $y$ on building age $x$ using the least squares method, estimate the maintenance cost for a building aged 16 years, and find the Pearson correlation coefficient and coefficient of determination.
2. **Given Data:**
\begin{align*}
\text{Age } x &: 5, 12, 8, 15, 20, 18, 10, 7, 22 \\
\text{Maintenance Cost } y &: 3.2, 5.8, 4.1, 7.2, 9.5, 8.3, 4.9, 3.8, 10.1
\end{align*}
3. **Step 1: Calculate means**
$$\bar{x} = \frac{5+12+8+15+20+18+10+7+22}{9} = \frac{117}{9} = 13$$
$$\bar{y} = \frac{3.2+5.8+4.1+7.2+9.5+8.3+4.9+3.8+10.1}{9} = \frac{56.9}{9} \approx 6.322$$
4. **Step 2: Calculate sums for slope $b$ and intercept $a$**
Calculate $\sum (x_i - \bar{x})(y_i - \bar{y})$ and $\sum (x_i - \bar{x})^2$:
\begin{align*}
\sum (x_i - \bar{x})(y_i - \bar{y}) &= (5-13)(3.2-6.322) + (12-13)(5.8-6.322) + \cdots + (22-13)(10.1-6.322) \\
&= (-8)(-3.122) + (-1)(-0.522) + (-5)(-2.222) + (2)(0.878) + (7)(3.178) + (5)(1.978) + (-3)(-1.422) + (-6)(-2.522) + (9)(3.778) \\
&= 24.976 + 0.522 + 11.11 + 1.756 + 22.246 + 9.89 + 4.266 + 15.132 + 34.002 = 123.9
\end{align*}
\begin{align*}
\sum (x_i - \bar{x})^2 &= (-8)^2 + (-1)^2 + (-5)^2 + 2^2 + 7^2 + 5^2 + (-3)^2 + (-6)^2 + 9^2 \\
&= 64 + 1 + 25 + 4 + 49 + 25 + 9 + 36 + 81 = 294
\end{align*}
5. **Step 3: Calculate slope $b$ and intercept $a$**
$$b = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sum (x_i - \bar{x})^2} = \frac{123.9}{294} \approx 0.4214$$
$$a = \bar{y} - b\bar{x} = 6.322 - 0.4214 \times 13 = 6.322 - 5.478 = 0.844$$
6. **Linear regression equation:**
$$y = 0.844 + 0.4214x$$
7. **Step 4: Estimate maintenance cost for $x=16$ years**
$$y = 0.844 + 0.4214 \times 16 = 0.844 + 6.742 = 7.586$$
8. **Step 5: Calculate Pearson correlation coefficient $r$**
Calculate $\sum (y_i - \bar{y})^2$:
\begin{align*}
\sum (y_i - \bar{y})^2 &= (-3.122)^2 + (-0.522)^2 + (-2.222)^2 + 0.878^2 + 3.178^2 + 1.978^2 + (-1.422)^2 + (-2.522)^2 + 3.778^2 \\
&= 9.746 + 0.272 + 4.937 + 0.771 + 10.099 + 3.913 + 2.022 + 6.361 + 14.273 = 52.394
\end{align*}
Pearson $r$:
$$r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}} = \frac{123.9}{\sqrt{294 \times 52.394}} = \frac{123.9}{\sqrt{15400.836}} = \frac{123.9}{124.12} \approx 0.998$$
9. **Step 6: Coefficient of determination $r^2$**
$$r^2 = (0.998)^2 = 0.996$$
10. **Interpretation:**
The correlation coefficient $r \approx 0.998$ indicates a very strong positive linear relationship between building age and maintenance cost. The coefficient of determination $r^2 = 0.996$ means 99.6% of the variation in maintenance cost is explained by the building age.
**Final answers:**
- Linear regression equation: $$y = 0.844 + 0.4214x$$
- Estimated maintenance cost for 16 years: $$7.586$$
- Pearson correlation coefficient: $$0.998$$
- Coefficient of determination: $$0.996$$
Linear Regression Ae3520
Step-by-step solutions with LaTeX - clean, fast, and student-friendly.