The same split you saw in ANOVA, with a line in place of the group means.
Twenty students report hours studied and their exam score. The line has a slope of 3 points per hour, and the points scatter around it with SD = 8.
Q1. Suppose the scatter doubles to SD = 16 but the slope stays at 3. Predict what happens to the slope, to R², and to F. Explain why.
Move the slope to change how much the line explains. Move the noise to change how far the points scatter around the line. The dots are a constructed dataset: the fitted slope and the scatter come out exactly at the slider values, so the same settings always give the same numbers.
Every student's score is some distance from the mean of all scores (the gray dashed line). The fitted line splits that distance into two pieces. Use the buttons to see each one.
For every student, the explained piece plus the leftover piece add up to the total distance. (When a score sits between the line and the mean, the leftover piece points back and takes some away.) Try No relationship: the line sits on the mean, so the explained lines vanish and total = leftover.
Use the named presets. Record values to two decimals, except R² to three and p to three (or < .001).
For one preset, check Chapter 22's rules in the readout: SS explained + SS residual = SS total, MS explained ÷ MS residual = F, and SS explained ÷ SS total = R².
| Preset | Slope | R² | F | p |
|---|---|---|---|---|
| Moderate | ||||
| Same slope, more noise | ||||
| Steep but noisy | ||||
| Gentle but tight |
Q2. In the ANOVA table, the two rows were between and within. Which regression row plays each part? Use the two book sections to say what each row measures in this study.
Q3. Compare Steep but noisy and Gentle but tight. Which has the bigger slope? Which has the bigger R²? What does R² actually measure?
Q4. Square the slope's t and compare it to F. In one sentence, why do they match?
This block rebuilds the Moderate preset. The wobble numbers are a fixed set of offsets; the next two lines strip out any trend and rescale them so the fitted slope is exactly 3 and the scatter is exactly 8.
hours <- seq(0.5, 10, by = 0.5)
wobble <- c(.6, -1.1, .3, 1.4, -.8, -.2, 1.0, -1.5, .4, .9,
-.6, 1.3, -1.2, .1, .7, -1.0, 1.6, -.4, -.9, .5)
e <- residuals(lm(wobble ~ hours))
e <- e * sqrt(18 / sum(e^2))
d <- data.frame(hours, score = 34 + 3 * hours + 8 * e)
model <- lm(score ~ hours, data = d)
summary(model)
anova(model)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 34.0000 3.7163 9.149 3.45e-08 ***
hours 3.0000 0.6205 4.835 0.000133 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 8 on 18 degrees of freedom
Multiple R-squared: 0.565, Adjusted R-squared: 0.5408
F-statistic: 23.38 on 1 and 18 DF, p-value: 0.0001328
Analysis of Variance Table
Response: score
Df Sum Sq Mean Sq F value Pr(>F)
hours 1 1496.2 1496.2 23.379 0.0001328 ***
Residuals 18 1152.0 64.0
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Q5. Find the simulator's Moderate numbers in this output: SS explained, SS residual, MS residual, R², F, and the slope's t. Which ones does summary() show, and which do you only get from anova()?
Grading: Credit/no-credit. Credit requires a genuine attempt and complete written reasoning, not perfect predictions.
regression-signal-noise_lastname1_lastname2.pdf.