12/17
Part 6 of 7 · The worked exampleLearn

Compute the t statistic

Here's a statistics round question, worked out loud.

16 users in a test watched 52 minutes on average, with a standard deviation of 12. The usual average is 45. Is that a real change?

1. Name the test: one sample, spread estimated, so t with 15 degrees of freedom.

2. Compute: standard error 12 / √16 = 3, so t = 7 / 3 = 2.33.

t = (52 - 45) / (12 / math.sqrt(16))
print(f"t = {t:.2f} with 15 degrees of freedom, p = {t_two_sided_p(t, 15):.3f}")
Predict

Is the jump from 45 to 52 minutes significant at 5%?

Pick one to see what it prints.
Pick an answer above to see the rest