Math · Introductory statistics · Worked example
Run a one-sided t-test from raw data
Do students in this group sleep less than 7 hours on average? Use the sleep data 4, 8, 6, 5, 3, 7, 9 and 6 hours, a random sample, to test H₀: μ = 7 against Hₐ: μ < 7 at α = 0.05.
Summarize and check
n = 8, x̄ = 6 and s = 2. The data show no strong skew or outliers, so a t-test is reasonable for this small sample.
Find the standard error
Find t and the p-value
t = (6 − 7)/0.7071 ≈ −1.41 with 7 degrees of freedom. For Hₐ: μ < 7 the p-value is the left tail, about 0.100.
Decide
0.100 > 0.05, so fail to reject H₀. The sample mean is below 7, but with only eight students the difference could be chance; this does not show that the mean is 7.
Result
t ≈ −1.41 and p ≈ 0.10: fail to reject H₀ at the 5% level.
Your turn
With the same mean and standard deviation but n = 32, what would t be?
Show the answer and explanation
t ≈ −2.83, strong evidence at the 5% level.
The standard error becomes 2/√32 ≈ 0.354, so t = −1/0.354 ≈ −2.83: more data make the same difference more convincing.
Keep exploring
In Statistics, Distributions with t = −1.4142, 7 degrees of freedom and the left tail gives p ≈ 0.1001.
Return to the concept →Sources and scope
Authored study material. Tool results depend on the stated inputs and model assumptions.
Try in the workspace
Open the example inputs, change a value and keep a useful result on your board.
Find the p-value in Statistics Open worked example on a board Confidence interval in Math ReferenceYour existing work stays on this device. Examples open as editable copies.