T-Test

Testing whether a mean differs from a reference value or whether two group means differ, using the t-distribution when sample sizes are small.

A t-test asks whether the observed mean is unusually far from the null
t=2.10-tcritical-3-2-10123
Result
p = 0.0808
Fail to reject H0 at alpha = 0.05
df = 14

The p-value is the tail area at least as extreme as the observed t-statistic, assuming H0 is true.

Definition

The t-test is a statistical test used to compare means when the population variance is unknown and the sample is small.

It uses the t-statistic:

t=xˉ−ξ0s/nt = \frac{\bar{x} - \mu_0}{s / \sqrt{n}}

where xˉ\bar{x} is the sample mean, ξ0\mu_0 is the hypothesized mean, ss is the sample standard deviation, and nn is the sample size.

The t-statistic follows a t-distribution with n−1n - 1 degrees of freedom under H0H_0.

One-sample t-test

A factory claims machines produce bolts with diameter 10 mm. You measure 9 bolts and get xˉ=10.3\bar{x} = 10.3 mm, s=0.4s = 0.4 mm.

t=10.3−100.4/9=0.30.133=2.25t = \frac{10.3 - 10}{0.4/\sqrt{9}} = \frac{0.3}{0.133} = 2.25

With 8 degrees of freedom, the two-tailed p-value ≈0.054\approx 0.054. At α=0.05\alpha = 0.05, just fail to reject H0H_0.

Try it

A diet claims to reduce weight by 5 kg. You weigh 16 people before and after. The mean reduction is 4.2 kg with s=3.2s = 3.2 kg. Test H0:Ξ=5H_0: \mu = 5 vs H1:Ξ<5H_1: \mu < 5 at ι=0.05\alpha = 0.05. (t0.05,15=1.753t_{0.05, 15} = 1.753)

Solution

t=4.2−53.2/16=−0.80.8=−1.0t = \frac{4.2 - 5}{3.2/\sqrt{16}} = \frac{-0.8}{0.8} = -1.0

Since âˆĢ−1.0âˆĢ<1.753|-1.0| < 1.753, fail to reject H0H_0. Insufficient evidence the diet falls short.

Related concepts