When someone claims a population has a certain average and our sample gives a different average, we need a way to tell whether the claim is wrong or our sample was just a random fluke.
1
Judging the Gap Against Expected Random Bounce
Suppose a battery company claims its batteries last μ=500 hours on average, and a random batch of n=9 batteries gives a sample mean of xˉ=480 hours. Why can't we just look at the 20-hour gap by itself to decide whether the company's claim is wrong?
Why the Gap Alone Isn't Enough
2
Measuring the Gap in Standard Errors
We want to find how many expected random wobbles (standard errors) sit between our sample mean xˉ=480 hours and the claimed mean of 500 hours when our 9 batteries have a sample standard deviation of s=30 hours.
The t-Statistic and Degrees of Freedom
To measure the gap in standard errors, we divide the distance from the claim by the standard error of the sample mean:
t=standard errornsxˉ−μ0gap from claim,degrees of freedomdf=n−1
The subscript 0 in μ0 just marks the specific number claimed in the null hypothesis (here, μ0=500 hours), not the number zero.
Text solution
Standard error of the sample meanDivide the single-battery spread s=30 hours by n to find how much a 9-battery average naturally wobbles.
Standard Error=ns=930=330=10 hours
Gap in standard errors (t-statistic)Divide the gap between the sample mean and the claimed mean by the 10-hour standard error.
t=nsxˉ−μ0=10480−500=10−20=−2.0
Degrees of freedomSubtract 1 from the sample size to set the tail thickness of the t-curve.
df=n−1=9−1=8
So our 480-hour sample average sits 2.0 standard errors below the 500-hour claim on the df=8t-curve.
When the individual battery lifetimes cluster more tightly, the standard error ns shrinks. More of those smaller standard errors fit inside the 20-hour gap, pushing t further into the tail of the df=8t-curve.
Even when the sample average stays at 480 hours, the spread of the 9 batteries changes the size of a standard error step and how many steps fit in that 20-hour gap.
3
Running a One-Sample t-Test
Now that we know our sample sits 2.0 standard errors below the claim (t=−2.0), we want to find the p-value (the probability, if the 500-hour claim is true, of getting a random 9-battery average at least 20 hours away from 500 hours by pure luck) and decide whether to reject the company's claim at α=0.05.
Running a One-Sample t-Test
claim: μ=500 hours
n=9,xˉ=480,s=30
α=0.05
reject the claim?
Text solution
Hypotheses and significance levelSet the company's claim as the null hypothesis and test for a difference in either direction at the α=0.05 cutoff.
H0:μ=500 hours,Ha:μ=500 hours,α=0.05
Conditions for trusting the t-curveCheck that the 9 batteries are a random sample and that their plotted lifetimes look roughly bell-shaped with no strong skewness or extreme outliers (needed whenever n<30).
Random sample of n=9<30⟹check that the plotis roughly bell-shapedwith no extreme outliers
Bracketing ∣t∣ on the df=8 rowIgnore the negative sign on t=−2.00 and find the two values it sits between on the df=8 row of the t-table.
1.860<2.00<2.306(on row df=8)
Finding the two-tailed p-valueDouble the one-tail column headers (0.05 and 0.025) because Ha:μ=500 shades both tails.
Decision against α=0.05Compare the p-value against the 0.05 cutoff to decide whether random luck is still a plausible explanation.
p>0.05⟹fail to reject H0
Because a random 9-pack of batteries lands at least 20 hours from 500 hours about 8% of the time by pure luck when the 500-hour claim is true, we do not have convincing evidence that the true average battery life differs from 500 hours.
A t-table only bounds the p-value between two values (0.05<p<0.10) rather than giving the calculator's 0.08, but that bracket is all we need to see that p>0.05.
If the standard error stays at 10 hours, moving the sample mean further from 500 hours pushes −t and +t further into the tails. Once the sample mean is more than 2.306 standard errors from the claim, the combined tail area drops below 0.05.
Drag the sample mean away from the 500-hour claim to see how many standard-error steps it takes to push the two-tail area below 0.05.
4
How Sample Size Changes the Test
What happens to our test if we get the exact same sample mean (xˉ=480 hours) and the exact same sample standard deviation (s=30 hours), but from a sample of n=36 batteries instead of n=9?
How Sample Size Changes the Test
Text solution
Smaller standard error for n=36Divide the same 30-hour sample spread by 36 to see how much a 36-battery average wobbles.
Standard Error=ns=3630=630=5 hours
Larger ∣t∣ and more degrees of freedomMeasure the same −20-hour gap in units of the new 5-hour standard error on the df=35 curve.
t=5480−500=5−20=−4.0,df=36−1=35
Tail probability and decisionAround df=35 on the t-table, ∣t∣=4.0 sits past the furthest column on the right, making the two-tail area tiny compared to α=0.05.
p<0.001(calculator: p≈0.0003)<0.05⟹reject H0
So the exact same 20-hour gap that could easily be random noise in a batch of 9 batteries (p≈0.08) becomes overwhelming evidence against the 500-hour claim in a batch of 36 batteries (p≈0.0003).
Even when the sample mean and spread stay the same, a larger sample size n shrinks the standard error ns and thins the tails of the t-curve (df=n−1). The smaller standard error pushes t further out, and the thinner tails leave less area beyond it, so the shaded p-value tails nearly vanish.
With the same 20-hour gap and 30-hour spread, testing more batteries shrinks the chance variation of the average and turns random luck into clear evidence against the 500-hour claim.
Key concepts
When you test a claim H0:μ=μ0 about a population mean and only have the sample standard deviation s to estimate the spread, use a one-sample t-test:
t=nsxˉ−μ0,df=n−1
When you can (and cannot) trust the t-curve
The sample must be random, and either the sample size is large (n≥30) or a plot of the sample looks roughly bell-shaped with no strong skewness or extreme outliers (like n=9 roughly bell-shaped battery lifetimes). Do not use the t-test if the sample was pulled from a single shelf, or if a small sample (n<30) is strongly skewed or has an extreme outlier.
Turning the gap into t
Divide the gap xˉ−μ0 (such as 480−500=−20 hours) by the expected random wobble of the sample average, ns (such as 930=10 hours), to count how many standard errors the sample sits from the claim (t=−2.0 on the df=8 curve).
One tail vs. two tails on the t-table
Scan row df=n−1 for ∣t∣ (ignoring any minus sign). If Ha tests a single direction (μ<500 or μ>500), read the one-tail probability headers directly; if Ha tests either direction (μ=500), double the one-tail headers to include both tails.
Making the call
If p<α,reject H0 (convincing evidence for Ha). If p>α,fail to reject H0, which means the gap could plausibly be random sample variation, never that we proved H0 is true.
5
Practice
1
A cereal company claims its boxes contain μ=368 grams of cereal on average. You weigh a random sample of n=16 boxes and find a sample mean of xˉ=362 grams with a sample standard deviation of s=8 grams. Find the standard error, the t-statistic, and the degrees of freedom, and explain in plain language what the t-statistic tells you.
Watch out: divide s=8 by 16=4, not by 16 itself. Dividing by 16 gives a standard error of 0.5 grams and t=−12.0, while forgetting n altogether gives t=−86=−0.75.
First find how much a 16-box average naturally bounces around (ns), then measure the gap xˉ−μ0 in units of that standard error.
Standard error
Standard Error=ns=168=48=2 grams
(Watch out: divide s=8 by 16=4, not by 16 itself. Dividing by 16 gives a standard error of 0.5 grams and t=−12.0, while forgetting n altogether gives t=−86=−0.75.)
(Keep the order xˉ−μ0: subtracting 368−362 flips the sign to +3.0.)
MeaningThe t-statistic of −3.0 means your 16-box sample average lies 3.0 standard errors (expected random wobbles) below the company's 368-gram claim.
2
In each scenario below, decide whether the conditions for trusting the t-distribution in a one-sample t-test for a mean are met, and explain why or why not: (a) A quality inspector takes a random sample of n=12 steel bolts, and a plot of their lengths looks roughly bell-shaped with no outliers. (b) An auditor takes a random sample of n=10 hospital bills, and a plot of the bills shows strong right skewness with one extreme outlier. (c) A student weighs n=15 loaves of bread all pulled from the front shelf of one grocery store on Monday morning, and a plot of the weights is roughly bell-shaped with no outliers.
Check both conditions in every scenario: how the sample was chosen (Random) and whether the sample size or data plot allows the t-curve (Normal or Large Sample).
(a) MetThe bolts are a random sample, and although n=12 is under 30, the plot is roughly bell-shaped with no outliers. (Watch out: do not say the condition fails just because n<30; a small sample is fine when its plot is roughly bell-shaped without outliers.)
(b) Not metAlthough the sample is random, the sample size is small (n=10<30) and the data show strong right skewness and an extreme outlier, violating the Normal or Large Sample condition.
(c) Not metPulling all 15 loaves from the front shelf of one store on one morning is not a random sample, violating the Random condition. (Watch out: a bell-shaped plot with no outliers cannot fix a non-random sample.)
3
A coffee shop claims its medium cups hold 12.0 ounces on average. Walking in specifically to test whether the shop is underfilling its cups, you measure a random sample of n=25 cups (whose fill amounts are roughly bell-shaped with no outliers) and find xˉ=11.7 ounces and s=0.6 ounces. On the df=24 row of a t-table, the columns with one-tail probabilities 0.025,0.01, and 0.005 have t-values 2.064,2.492, and 2.797. State the hypotheses, compute t, use the table to bound the p-value, and state your conclusion at α=0.01.
Testing whether the shop is "underfilling its cups" points in one direction for Ha. Once you bracket ∣t∣ on the df=24 row, check whether Ha calls for one tail or two before reading the probability headers.
Hypotheses
H0:μ=12.0 ounces,Ha:μ<12.0 ounces
Standard error and t-statistic
Standard Errortdf=250.6=50.6=0.12 ounces=0.1211.7−12.0=0.12−0.3=−2.50,=25−1=24
Bounding the p-valueIgnoring the minus sign, ∣t∣=2.50 falls between 2.492 and 2.797 on the df=24 row. Because Ha:μ<12.0 is one-sided, we read the one-tail headers directly:
2.492<2.50<2.797⟹0.005<p<0.01
(Watch out: do not double the one-tail areas for a one-sided test. Doubling them gives 0.01<p<0.02, which reverses the decision at α=0.01.)
ConclusionSince p<0.01, we reject H0: there is convincing evidence that the true average fill is less than 12.0 ounces.
4
A tire maker claims its tires last μ=60,000 miles on average. A consumer group tests a random sample of n=11 tires to see whether the true average differs from 60,000 miles in either direction (at α=0.05) and gets t=2.10, which leaves an area of 0.031 in the right tail of the df=10t-curve. A student writes: "Because p=0.031 is less than 0.05, we reject H0; if p had been greater than 0.05, it would have proved the tires really average 60,000 miles." Find the two mistakes in the student's reasoning, state the correct p-value and conclusion, and explain what that p-value means in context.
Because Ha:μ=60,000 miles is two-sided, both tails beyond t=±2.10 must be included, so the single-tail area of 0.031 must be doubled.
Check how "differs... in either direction" affects the single-tail area of 0.031, and ask what failing to reject H0 actually says about the claim.
Mistake 1 (one tail instead of two)Because Ha:μ=60,000 miles is two-sided, both tails beyond t=±2.10 must be included, so the single-tail area of 0.031 must be doubled:
p=2(0.031)=0.062
Since p=0.062>0.05, we fail to reject H0, not reject H0.
Mistake 2 (claiming to prove H0)Failing to reject H0 never proves that the true mean really is 60,000 miles; it only means we do not have convincing evidence that the true mean differs from 60,000 miles.
Meaning of p=0.062If the true average tire life really is 60,000 miles, there is a 6.2% chance of getting a random 11-tire sample average at least this far from 60,000 miles in either direction by random luck alone. (Watch out: do not say there is a 6.2% chance that the company's 60,000-mile claim is true.)
5
An engineer tests whether the mean lifetime of an LED bulb differs from μ0=1,000 hours. A random sample of n=4 bulbs gives xˉ=985 hours and s=20 hours (t=−1.50,df=3, two-tailed p=0.23). (a) Give the two reasons why testing only 4 bulbs makes it hard to rule out random luck for this 15-hour gap. (b) If a larger random sample gets the exact same sample mean (xˉ=985 hours) and sample standard deviation (s=20 hours), how many bulbs n would be needed for the 15-hour gap to sit 3.0 standard errors below the claim (t=−3.0)?
Watch out: to double ∣t∣ from 1.50 to 3.0, do not simply double the sample size from n=4 to n=8, which only gives t=−82015≈−2.12; because the standard error divides by n, you must quadruple n to 16 bulbs.
For (a), look at how a small n affects both the standard error and the tails of the t-curve. For (b), set t=n20985−1,000=−3.0 and solve for n first.
(a) Two reasonsFirst, with only n=4 bulbs, the standard error is large (420=10 hours), so a 15-hour gap is only 1.50 standard errors below the claim. Second, estimating s from only 4 bulbs leaves just df=4−1=3 degrees of freedom, giving the t-curve very fat tails with a large area (p=0.23) beyond ±1.50.
(Watch out: to double ∣t∣ from 1.50 to 3.0, do not simply double the sample size from n=4 to n=8, which only gives t=−82015≈−2.12; because the standard error divides by n, you must quadruple n to 16 bulbs.)