For the billing-system data (n₁ = 12, x̄₁ = 31.2, s₁ = 9.5; n₂ = 10, x̄₂ = 24.1, s₂ = 6.8), compute the Welch SE and t, the hand df = min(n₁ − 1, n₂ − 1), the decision against the given t(0.05; 9) = 1.833, and then the Satterthwaite df R would use.
For the billing-system data (n₁ = 12, x̄₁ = 31.2, s₁ = 9.5; n₂ = 10, x̄₂ = 24.1, s₂ = 6.8), compute the Welch SE and t, the hand df = min(n₁ − 1, n₂ − 1), the decision against the given t(0.05; 9) = 1.833, and then the Satterthwaite df R would use.
Answer
import math n1, xbar1, s1 = 12, 31.2, 9.5 n2, xbar2, s2 = 10, 24.1, 6.8 v1, v2 = s1**2 / n1, s2**2 / n2 se = math.sqrt(v1 + v2) t = (xbar1 - xbar2) / se df = min(n1 - 1, n2 - 1) critical = 1.833 decision = "reject H0" if t > critical else "do not reject H0" print(f"SE={se:.4f} t={t:.3f} df={df} critical={critical} decision={decision}") sat = (v1 + v2) ** 2 / (v1**2 / (n1 - 1) + v2**2 / (n2 - 1)) print(f"Satterthwaite df={sat:.2f}")
IBS1 §10.1 (Welch statistic; Satterthwaite df, rounded — the contrast), IS1 §10.1, CC BY 4.0; H-W9 (Case 1, the min rule) — shape only; original dataset