Question 1160837: A mathematics placement test is given to all entering freshmen at a small college. A student who receives a grade below 35 is denied admission to the regular mathematics course and placed in a remedial class. The placement test scores and the final grades for 20 students who took the regular course were recorded.
a. Fit a simple linear regression to the data.
b. Also calculate the coefficient of correlation and interpret the relationship.
c. If 60 is the minimum passing grade, below which placement test score should students in the future be denied admission to this course?
Placement Test Course Grade
50 53
35 41
35 61
40 56
55 68
65 36
35 11
60 70
90 79
35 59
90 54
80 91
60 48
60 71
60 71
40 47
55 53
50 68
65 57
50 79
Answer by CPhill(2303) (Show Source):
You can put this solution on YOUR website! ```python
import numpy as np
data = [
(50, 53),
(35, 41),
(35, 61),
(40, 56),
(55, 68),
(65, 36),
(35, 11),
(60, 70),
(90, 79),
(35, 59),
(90, 54),
(80, 91),
(60, 48),
(60, 71),
(60, 71),
(40, 47),
(55, 53),
(50, 68),
(65, 57),
(50, 79)
]
x = np.array([pt[0] for pt in data], dtype=float)
y = np.array([pt[1] for pt in data], dtype=float)
n = len(x)
sum_x = np.sum(x)
sum_y = np.sum(y)
sum_x2 = np.sum(x**2)
sum_y2 = np.sum(y**2)
sum_xy = np.sum(x * y)
x_bar = np.mean(x)
y_bar = np.mean(y)
S_xx = sum_x2 - (sum_x**2) / n
S_yy = sum_y2 - (sum_y**2) / n
S_xy = sum_xy - (sum_x * sum_y) / n
b1 = S_xy / S_xx
b0 = y_bar - b1 * x_bar
r = S_xy / np.sqrt(S_xx * S_yy)
r2 = r**2
# For part c: If 60 is the minimum passing grade, find x such that y_hat = 60
# 60 = b0 + b1 * x => x = (60 - b0) / b1
x_cutoff = (60 - b0) / b1
print(f"n: {n}")
print(f"sum_x: {sum_x}")
print(f"sum_y: {sum_y}")
print(f"sum_x2: {sum_x2}")
print(f"sum_y2: {sum_y2}")
print(f"sum_xy: {sum_xy}")
print(f"x_bar: {x_bar}")
print(f"y_bar: {y_bar}")
print(f"S_xx: {S_xx}")
print(f"S_yy: {S_yy}")
print(f"S_xy: {S_xy}")
print(f"Slope (b1): {b1:.6f}")
print(f"Intercept (b0): {b0:.6f}")
print(f"Correlation coefficient (r): {r:.6f}")
print(f"r^2: {r2:.6f}")
print(f"x for y_hat = 60: {x_cutoff:.6f}")
```
```text
n: 20
sum_x: 1110.0
sum_y: 1173.0
sum_x2: 67100.0
sum_y2: 74725.0
sum_xy: 67690.0
x_bar: 55.5
y_bar: 58.65
S_xx: 5495.0
S_yy: 5928.550000000003
S_xy: 2588.5
Slope (b1): 0.471065
Intercept (b0): 32.505914
Correlation coefficient (r): 0.453513
r^2: 0.205674
x for y_hat = 60: 58.365849
```
Let $x$ represent the **Placement Test score** and $y$ represent the **Course Grade**.
### Summary Statistics ($n = 20$)
* $\sum x = 1{,}110 \implies \bar{x} = \frac{1{,}110}{20} = 55.5$
* $\sum y = 1{,}173 \implies \bar{y} = \frac{1{,}173}{20} = 58.65$
* $\sum x^2 = 67{,}100$
* $\sum y^2 = 74{,}725$
* $\sum xy = 67{,}690$
Computing the sums of squares:
$$S_{xx} = \sum x^2 - \frac{(\sum x)^2}{n} = 67{,}100 - \frac{(1{,}110)^2}{20} = 67{,}100 - 61{,}605 = 5{,}495$$
$$S_{yy} = \sum y^2 - \frac{(\sum y)^2}{n} = 74{,}725 - \frac{(1{,}173)^2}{20} = 74{,}725 - 68{,}796.45 = 5{,}928.55$$
$$S_{xy} = \sum xy - \frac{(\sum x)(\sum y)}{n} = 67{,}690 - \frac{(1{,}110)(1{,}173)}{20} = 67{,}690 - 65{,}101.5 = 2{,}588.5$$
---
### a. Simple Linear Regression Model
The simple linear regression line is given by $\hat{y} = \beta_0 + \beta_1 x$.
1. **Slope ($\beta_1$):**
$$\beta_1 = \frac{S_{xy}}{S_{xx}} = \frac{2{,}588.5}{5{,}495} \approx 0.4711$$
2. **Intercept ($\beta_0$):**
$$\beta_0 = \bar{y} - \beta_1 \bar{x} = 58.65 - (0.471065)(55.5) \approx 32.5059$$
**Fitted regression equation:**
$$\hat{y} = 32.51 + 0.4711x$$
*(or $\widehat{\text{Course Grade}} = 32.51 + 0.4711 \times \text{Placement Test}$)*
---
### b. Coefficient of Correlation and Interpretation
Using Pearson's correlation coefficient formula:
$$r = \frac{S_{xy}}{\sqrt{S_{xx} S_{yy}}} = \frac{2{,}588.5}{\sqrt{5{,}495 \times 5{,}928.55}} = \frac{2{,}588.5}{5{,}707.643} \approx 0.4535$$
* **Coefficient of Determination ($r^2$):** $r^2 \approx (0.4535)^2 \approx 0.2057$ (or $20.57\%$).
* **Interpretation:** There is a **moderate, positive linear correlation** ($r \approx 0.45$) between the placement test score and the final course grade. While higher placement test scores generally correspond to higher course grades, only about **$20.6\%$** of the variability in course grades is explained by the placement test score alone, indicating that other factors (such as study habits, attendance, and difficulty of subsequent topics) also play a substantial role.
---
### c. Minimum Cutoff Placement Score for Passing
To achieve an expected final grade of at least $\hat{y} = 60$:
$$60 = 32.5059 + 0.471065 x$$
$$0.471065 x = 60 - 32.5059$$
$$0.471065 x = 27.4941$$
$$x = \frac{27.4941}{0.471065} \approx \mathbf{58.37}$$
Students scoring below approximately **$58.4$** (or practically, below **$59$**) on the placement test should be denied admission to the regular mathematics course.
| |
|