Subjects statistics

Multiple Linear Regression

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

Search Solutions

Multiple Linear Regression


1. **Problem Statement:** We want to find the multiple linear regression equation that predicts Exam Score ($Y$) based on Hours Studied ($X_1$) and Hours of Sleep ($X_2$). 2. **Formula:** The multiple linear regression model is: $$Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \epsilon$$ where $\beta_0$ is the intercept, $\beta_1$ and $\beta_2$ are coefficients for $X_1$ and $X_2$, respectively. 3. **Data:** \begin{align*} X_1 &: 5, 8, 2, 10, 4 \\ X_2 &: 7, 6, 8, 5, 6 \\ Y &: 80, 90, 70, 95, 75 \end{align*} 4. **Step 1: Calculate means** $$\bar{X_1} = \frac{5+8+2+10+4}{5} = 5.8$$ $$\bar{X_2} = \frac{7+6+8+5+6}{5} = 6.4$$ $$\bar{Y} = \frac{80+90+70+95+75}{5} = 82$$ 5. **Step 2: Calculate sums of squares and cross-products** $$SS_{X_1} = \sum (X_1 - \bar{X_1})^2 = (5-5.8)^2 + (8-5.8)^2 + (2-5.8)^2 + (10-5.8)^2 + (4-5.8)^2 = 38.8$$ $$SS_{X_2} = \sum (X_2 - \bar{X_2})^2 = (7-6.4)^2 + (6-6.4)^2 + (8-6.4)^2 + (5-6.4)^2 + (6-6.4)^2 = 5.2$$ $$SS_{X_1X_2} = \sum (X_1 - \bar{X_1})(X_2 - \bar{X_2}) = (5-5.8)(7-6.4) + ... + (4-5.8)(6-6.4) = -8.0$$ $$SS_{X_1Y} = \sum (X_1 - \bar{X_1})(Y - \bar{Y}) = 98.0$$ $$SS_{X_2Y} = \sum (X_2 - \bar{X_2})(Y - \bar{Y}) = -13.0$$ 6. **Step 3: Calculate coefficients $\beta_1$ and $\beta_2$** Using matrix form or formulas: $$\beta_1 = \frac{SS_{X_1Y} SS_{X_2} - SS_{X_2Y} SS_{X_1X_2}}{SS_{X_1} SS_{X_2} - (SS_{X_1X_2})^2} = \frac{98 \times 5.2 - (-13) \times (-8)}{38.8 \times 5.2 - (-8)^2} = \frac{509.6 - 104}{201.76 - 64} = \frac{405.6}{137.76} \approx 2.94$$ $$\beta_2 = \frac{SS_{X_2Y} SS_{X_1} - SS_{X_1Y} SS_{X_1X_2}}{SS_{X_1} SS_{X_2} - (SS_{X_1X_2})^2} = \frac{-13 \times 38.8 - 98 \times (-8)}{201.76 - 64} = \frac{-504.4 + 784}{137.76} = \frac{279.6}{137.76} \approx 2.03$$ 7. **Step 4: Calculate intercept $\beta_0$** $$\beta_0 = \bar{Y} - \beta_1 \bar{X_1} - \beta_2 \bar{X_2} = 82 - 2.94 \times 5.8 - 2.03 \times 6.4 = 82 - 17.05 - 12.99 = 51.96$$ 8. **Final regression equation:** $$Y = 51.96 + 2.94 X_1 + 2.03 X_2$$ This means for each additional hour studied, the exam score increases by about 2.94 points, and for each additional hour of sleep, the exam score increases by about 2.03 points, holding the other variable constant.