~/ learn/ afm-113/ cards/ The model assumptions and the residual standard error
1 of 7

From the fitted Northfield line and the eight data points, compute SSE from the residuals, the degrees of freedom n − 2, and the residual standard error s.

From the fitted Northfield line and the eight data points, compute SSE from the residuals, the degrees of freedom n − 2, and the residual standard error s.

Answer

import math income = [35, 48, 52, 61, 70, 84, 95, 110] score = [610, 645, 640, 680, 700, 720, 745, 760] b0, b1 = 544.1766652875465, 2.0659219418011308 n = len(income) sse = sum((y - (b0 + b1 * x)) ** 2 for x, y in zip(income, score)) df = n - 2 s = math.sqrt(sse / df) print(f"SSE={sse:.1f} s={s:.3f} df={df}")

IS1 §12.4 and §12.6 (the model, s), CC BY 4.0; IBS1 §13.4 (n − k — the contrast); H-W3 (assumption list, R’s “on 6 degrees of freedom”); original dataset

space flip · ← → navigate · esc to exit
NORMAL ~/memra/library/11e1cb30-555c-4b7b-9e01-3bd5dfb1a737/flashcard utf-8 LF