Quiz 1:Regression Models (Data Science Specialization) Answers 2025 :
-
Question 1
Which value of μ minimizes ∑i=1nwi(xi−μ)2\sum_{i=1}^n w_i (x_i-\mu)^2?
✅ 0.1471
❌ 0.300
❌ 1.077
❌ 0.0025
Explanation: The weighted least-squares minimizer is the weighted mean: μ=∑wixi/∑wi=1.03/7≈0.1471.\mu = \sum w_i x_i / \sum w_i = 1.03/7 \approx 0.1471.
-
Question 2
Regression through the origin (slope = sum(x*y)/sum(x^2)) — give the slope.
✅ 0.8263
❌ -0.04462
❌ 0.59915
❌ -1.713
Explanation: For regression through origin slope = ∑xiyi/∑xi2≈2.9227/3.5373≈0.8263.\sum x_i y_i / \sum x_i^2 \approx 2.9227 / 3.5373 \approx 0.8263.
-
Question 3
Frommtcars, slope oflm(mpg ~ wt).
❌ 0.5591
❌ 30.2851
✅ -5.344
❌ -9.559
Explanation: The familiar result for mpg ~ wt is a negative slope ≈ −5.344 (mpg decreases ~5.344 per 1000 lb increase in wt).
-
Question 4
Predictor SD is half of outcome SD; correlation = 0.5. Slope of Y ~ X ?
❌ 3
❌ 0.25
✅ 1
❌ 4
Explanation: Slope = Corr(Y,X) * (sd_Y / sd_X) = 0.5 * (1 / 0.5) = 1.
-
Question 5
Two normalized tests (mean 0, sd 1), correlation 0.4. Expected Quiz2 score if Quiz1 = 1.5?
✅ 0.6
❌ 0.16
❌ 0.4
❌ 1.0
Explanation: Conditional expectation (linear prediction) = r * z1 = 0.4 * 1.5 = 0.6.
-
Question 6
Normalize x; value of first measurement (z-score)?
❌ 8.86
❌ 8.58
✅ -0.9719
❌ 9.31
Explanation: mean ≈ 9.31, sd ≈ 0.7511, z = (8.58−9.31)/0.7511 ≈ −0.9719.
-
Question 7
Intercept for regression of y on x (same x,y as Q2)?
❌ 2.105
❌ -1.713
✅ 1.567
❌ 1.252
Explanation: slope ≈ −1.713, means: mean_x ≈ 0.573, mean_y ≈ 0.586. Intercept = mean_y − slope*mean_x ≈ 0.586 − (−1.713)(0.573) ≈ 1.567.
-
Question 8
If predictor and response both have mean 0, what about intercept?
❌ It must be exactly one.
❌ Nothing can be said.
❌ It is undefined.
✅ It must be identically 0.
Explanation: With both sample means 0, intercept = mean_y − b * mean_x = 0 − b*0 = 0.
-
Question 9
What value minimizes sum of squared distances for given x vector?
✅ 0.573
❌ 0.36
❌ 0.44
❌ 0.8
Explanation: The value minimizing squared distances is the sample mean: sum(x)/n = 5.73/10 = 0.573.
-
Question 10
Let β₁ be slope of Y~X and γ₁ slope of X~Y. What is β₁/γ₁ always equal to?
❌ 1
❌ Cor(Y,X)
✅ Var(Y)/Var(X)
❌ 2 SD(Y)/SD(X)
Explanation: β₁ = ρ·(σ_Y/σ_X), γ₁ = ρ·(σ_X/σ_Y) ⇒ β₁/γ₁ = (σ_Y²)/(σ_X²) = Var(Y)/Var(X).
🧾 Summary Table
| Q# | ✅ Correct Answer | Key Concept |
|---|---|---|
| 1 | 0.1471 | Weighted mean minimizes weighted squared error |
| 2 | 0.8263 | Slope through origin = Σ(xy)/Σ(x²) |
| 3 | -5.344 | lm(mpg ~ wt) slope (mpg decreases with weight) |
| 4 | 1 | slope = corr · (sd_Y / sd_X) |
| 5 | 0.6 | Conditional expectation = r · z1 for standardized vars |
| 6 | -0.9719 | z-score = (x − mean)/sd |
| 7 | 1.567 | Intercept = mean_y − b·mean_x |
| 8 | 0 | If means are 0, intercept = 0 |
| 9 | 0.573 | Mean minimizes sum of squared deviations |
| 10 | Var(Y)/Var(X) | Ratio of slopes = variance ratio |