📖 Contents · Hub · Full version Chapter 11 · One-Sample Tests
Statistics Easy Read · Chapter 11

One-Sample Tests

You have a claim about the world, and you have one sample of data. A hypothesis test is the careful way to ask whether the data are surprising enough to make you doubt the claim. This chapter builds a single five step method that never changes. Then it pours three different one sample cases into it. The first is a mean when the population standard deviation is somehow known. The second is a mean when it is not, which is the far more common case and the reason Student's t distribution exists. The third is a proportion. Every formula here is the same idea in different clothes: how far is the estimate from the claim, measured in standard errors? Get comfortable with that one sentence, and the rest is bookkeeping.

By the end of this chapter you can

  • State a null and an alternative hypothesis in symbols and in words, and choose one-tailed or two-tailed correctly.
  • Carry out the five steps of any hypothesis test in order, without memorizing a separate recipe for each test.
  • Work out and read a z-test for a mean when σ is known.
  • Work out and read a t-test for a mean when σ is unknown, and explain degrees of freedom.
  • Work out and read the one-proportion z-test, including why the standard error uses p0 and not p̂.
  • State a p-value correctly, and say just what it is not.
  • Check the assumptions each test needs, and say what happens when they fail.
  • Tell statistical significance apart from practical importance, and link a test to its matching confidence interval.

Section 1The five steps of a test

A distribution curve with the rejection region shaded in the tail and the non-rejection region in the middle
Reference. Rejection and non-rejection regions. The tail area cut off by the critical value is where a test statistic is judged surprising. Source and license: see the figure credits

One procedure, every test

People often try to memorize hypothesis testing as a pile of unrelated formulas. It is not that. There is one method, and the only thing that changes between tests is which formula you plug into step 3. Learn the skeleton once, and the whole chapter shrinks into something you can manage.

A hypothesis test begins with a claim about a population parameter. That is a fixed, unknown number describing the whole population, like the population mean μ or the population proportion p. You cannot see the parameter. You can only see a statistic worked out from a sample, such as x̄ or p̂. The test asks a single question: if the claim were true, how unusual would a sample like mine be?

StepWhat you doWhat it looks like
1State the hypotheses about the parameter: before looking at the dataH0: μ = 500    Ha: μ ≠ 500
2Choose the significance level α and check the conditions the test requiresα = 0.05; random sample, normal enough
3Compute the test statistic: distance from the claim, in standard errorsz or t = (estimate − claim) ÷ SE
4Find the p-value (or compare to the critical value)p = 0.0124; or |z| > 1.96?
5Decide and interpret in context: in plain words, about the original claim“Reject H0; there is evidence the mean differs from 500.”

Two rules govern step 1. First, the null hypothesis H0 always holds the equality. It is the “nothing unusual is happening” statement, the exact number the math needs. Second, the alternative hypothesis Ha states what you are actually looking for. It must be chosen from the research question, never from the direction the data happened to fall. Picking a one sided alternative after seeing which way the sample leaned doubles your real error rate while pretending it did not.

Reading a p-value without getting it wrong

The p-value is the probability of getting a test statistic at least as extreme as the one you saw, worked out under the assumption that the null hypothesis is true. That last part is not decoration; it is the whole meaning of the number. A small p-value says: “data like these would be rare if H0 held.” That gives grounds for doubting H0.

Say a test gives z = 2.50 with a two-tailed alternative. From the standard normal, the upper tail beyond 2.50 has an area of 0.0062. The alternative is two sided, so both tails count: p = 2 × 0.0062 = 0.0124. Compared with α = 0.05, we have 0.0124 < 0.05, so we reject H0. Compared with a stricter α = 0.01, we have 0.0124 > 0.01, and we would fail to reject. It is the same data and the same evidence; only the cutoff changed. That is worth thinking about, because it shows α is a habit you adopt, not a trait of nature.

Statement about p = 0.0124Correct?Why
“If H0 were true, results this extreme happen about 1.2% of the time.”YesThis is the definition
“There is a 1.2% probability that H0 is true.”NoThe p-value assumes H0; it cannot also measure its probability
“There is a 98.8% probability the alternative is true.”NoSame error, wearing a hat
“The effect is large and important.”Nop-values shrink with sample size; they measure evidence, not size
“A large p-value proves H0 is true.”NoAbsence of evidence is not evidence of absence: we say fail to reject

Notice the awkward phrase fail to reject, chosen on purpose. We never “accept” the null. A test that comes up empty may mean the null is true. Or it may just mean the sample was too small to detect a real difference. Courts acquit for lack of evidence without declaring the defendant a saint, and statistics does the same.

Two ways to be wrong

You are deciding with uncertainty, so you can go wrong in two directions. A Type I error is rejecting a true null, which is a false alarm. Its long run rate is exactly α, which is why you choose α before you look. A Type II error is failing to reject a false null, which is a miss, with rate β. The power of a test is 1 − β, the chance of catching a real effect when one exists. Power rises with larger samples, larger true effects, less variability and a larger α.

H0 is actually trueH0 is actually false
Reject H0Type I error (rate α)Correct decision (power = 1 − β)
Fail to reject H0Correct decisionType II error (rate β)
A p-value is not the probability that the null hypothesis is true. This is the most common error in all of applied statistics, and it turns up in published papers with sad regularity. The p-value is worked out assuming H0. It is the probability of the data given the hypothesis, not the probability of the hypothesis given the data. Those two amounts are truly different numbers. Swapping them is the same mistake as mixing up “most people with this rare disease test positive” with “most people who test positive have this rare disease.”
Interactive Walk three different one-sample tests through the identical five-step procedure, hypotheses, α and conditions, test statistic, p-value, decision, on samples you actually draw, with every number, curve and verdict recomputed live. Open full ↑
Key points
  • Every test follows the same five steps, and only the formula in step 3 changes.
  • H0 holds the equality. Ha comes from the question, never from the data.
  • A p-value is P(data this extreme given H0 is true), not P(H0 is true).
  • We fail to reject; we never accept. α is the Type I error rate, and power = 1 − β.

Section 2Z-test for a mean

The standard normal distribution curve centered at zero with the horizontal axis marked in standard deviations
Reference. The standard normal distribution: the reference curve that every z test statistic is judged against. Source and license: see the figure credits

Where the formula comes from

Take repeated random samples of size n from a population with mean μ and standard deviation σ. The sample means x̄ bounce around, but not wildly and not without a pattern. They center on μ, and they spread out with a standard deviation of σ∕√n. That amount is the standard error of the mean. The √n in the denominator is the math version of a very natural fact: bigger samples give steadier averages. Make the sample four times as big, and you halve the standard error.

Say that, on top of that, the sampling distribution of x̄ is normal. That happens either because the population is normal, or because n is large enough for the Central Limit Theorem to take over. Then standardizing gives a familiar amount:

z = ( x̄ − μ0 ) ∕ ( σ ∕ √n )

Read it out loud in plain English: how many standard errors is my sample mean away from the claimed mean? That is all a test statistic ever is. The z-test is the version you use when σ, the population standard deviation, is known ahead of time and does not have to be estimated from your data.

Be honest about how rare that is. In real research, you almost never know σ while still not knowing μ. The z-test earns its place in two ways. It is the honest tool when a factory process, a calibrated instrument or a standardized test has decades of history pinning σ down. And it is the clean stepping stone that makes the t-test in the next section easy to understand.

A worked example

A bottling line is supposed to fill bottles to a mean of 500 mL. Years of process records show that the fill standard deviation is steady at σ = 4.0 mL. A quality worker pulls a random sample of n = 25 bottles and finds a sample mean of x̄ = 498.2 mL. Is the line off target? Test at α = 0.05.

Step 1: hypotheses. The line could drift either way, and both directions matter, so the test is two-tailed:
H0: μ = 500     Ha: μ ≠ 500

Step 2: level and conditions. α = 0.05. The sample is random, σ is known from the history of the process and fill volumes from a machine are about normal. The conditions are met.

Step 3: test statistic. First find the standard error, then standardize:

SE = σ ∕ √n = 4.0 ∕ √25 = 4.0 ∕ 5 = 0.80 mL
z = (498.2 − 500) ∕ 0.80 = (−1.8) ∕ 0.80 = −2.25

The sample mean sits 2.25 standard errors below the target.

Step 4: p-value. From the standard normal table, the area below z = −2.25 is 0.0122. The alternative is two sided, so we double it:

p = 2 × 0.0122 = 0.0244

The critical value route agrees. For a two-tailed test at α = 0.05, the critical values are ±1.96, and |−2.25| = 2.25 > 1.96. So the statistic lands in the rejection region.

Step 5: decide and explain. Since 0.0244 < 0.05, reject H0. There is statistically significant evidence at the 5% level that the mean fill volume differs from 500 mL, and the sample suggests underfilling by about 1.8 mL. Now say the worker only cared about underfilling and had stated Ha: μ < 500 before collecting data. Then the p-value would be the single lower tail, 0.0122.

The confidence interval says the same thing

A two sided test at level α and a 100(1 − α)% confidence interval are two views of one calculation. The 95% interval here is

498.2 ± 1.96 × 0.80 = 498.2 ± 1.57 → (496.63, 499.77)

The claimed value 500 lies outside that interval, which is just why the test rejected. The rule holds in general. A two sided test rejects H0: μ = μ0 at level α exactly when the 100(1 − α)% interval leaves out μ0. The interval is often the more useful report, because it also tells you the believable size of the gap, which a p-value never does.

Alternativep-value from zCritical value at α = 0.05Reject when
Ha: μ ≠ μ02 × P(Z > |z|)±1.96|z| > 1.96
Ha: μ > μ0P(Z > z)+1.645z > 1.645
Ha: μ < μ0P(Z < z)−1.645z < −1.645
What “95% confident” really means. It is a statement about the method, not about this one interval. Say you repeated the whole business, sampling, working out and building the interval, over and over without end. Then about 95% of the intervals made would contain the true μ. The interval you are holding either contains μ or it does not, because μ is a fixed number, not a random one. Saying “there is a 95% chance μ is between 496.63 and 499.77” treats the parameter as random, and that is not what the method gives.
Interactive Run a complete one-sample z-test on real simulated data: draw a sample, watch its mean form, see the test statistic land on the standard normal curve beside the critical value and the shaded p-value, then repeat the whole test thousands of times to watch the rejection rate settle onto α when the null is true and onto the test's power when it is not. Open full ↑
Key points
  • z = (x̄ − μ0) ∕ (σ∕√n): the estimate's distance from the claim, in standard errors.
  • The standard error σ∕√n shrinks with √n, so four times the data gives half the wobble.
  • Use the z-test only when σ is truly known, not estimated from the sample.
  • A two sided test at α rejects exactly when the matching 100(1 − α)% confidence interval leaves out μ0.

Section 3T-test for a mean

Several Student t distribution curves with different degrees of freedom, showing heavier tails at small df
Reference. Student's t distributions at several degrees of freedom. The tails thicken as df falls, and the curve comes closer to the normal curve as df grows. Source and license: see the figure credits

The problem with substituting s for σ

In real work, σ is unknown, so you estimate it with the sample standard deviation s. The formula looks almost the same:

t = ( x̄ − μ0 ) ∕ ( s ∕ √n )

But something subtle has changed. The z formula had one random amount in it, x̄. The t formula has two, because s jumps around from sample to sample as well. That extra source of noise makes extreme values more common than the normal curve predicts. William Sealy Gosset worked this out around 1908, while running small batch experiments at a brewery. He published under the pen name “Student,” and so it is called Student's t distribution.

The t distribution is symmetric and bell shaped like the normal, and it is centered at zero. But it has heavier tails, meaning more probability far from the center. Heavier tails mean larger critical values, so the t-test needs more evidence before it will reject. That is not a flaw. It is the honest price of not knowing σ.

Degrees of freedom

The t distribution is not one curve but a family, labeled by degrees of freedom. For a one sample t-test, df = n − 1.

Why n − 1 instead of n? Working out s means first working out x̄ from the same data, and that costs you one piece of independent information. Here is a concrete view. If you know four deviations from the mean, the fifth is forced, because the deviations must add up to zero. That is five numbers with four of them free, so four degrees of freedom. Every degree of freedom you spend estimating something is one less left to measure variability.

As df grows, s becomes a reliable stand in for σ, the extra noise fades and the t curve comes closer and closer to the standard normal. You can see this in any table of critical values.

dfnTwo-tailed t* at α = 0.05Comment
562.571Much stricter than 1.96
10112.228Still noticeably stricter
15162.131Closing in
20212.086 
30312.042About 4% above the normal value
60612.000Nearly indistinguishable
∞-1.960The standard normal itself

A worked example

A transit planner claims that the mean one way trip to work in a city area is 30 minutes. A random sample of n = 16 workers gives x̄ = 33.4 minutes with s = 6.4 minutes. Test the claim at α = 0.05.

Step 1. H0: μ = 30     Ha: μ ≠ 30 (the claim could be wrong in either direction).

Step 2. α = 0.05. The sample is random. n = 16 is small, so we need the distribution of trip times to be about symmetric with no big outliers. Look at a dotplot or boxplot before going on.

Step 3.

SE = s ∕ √n = 6.4 ∕ √16 = 6.4 ∕ 4 = 1.60 minutes
t = (33.4 − 30) ∕ 1.60 = 3.4 ∕ 1.60 = 2.125    with df = 16 − 1 = 15

Step 4. The two-tailed critical value at df = 15 is t* = 2.131. Our statistic, 2.125, falls a hair short of it, so the two-tailed p-value is a hair above 0.05. Software gives p ≈ 0.051.

Step 5. Since 0.051 > 0.05, we fail to reject H0. At the 5% level, there is not quite enough evidence to conclude that the mean trip differs from 30 minutes. The matching 95% interval tells the same story: 33.4 ± 2.131 × 1.60 = 33.4 ± 3.41 → (29.99, 36.81), which contains 30, but only barely.

Now watch what a larger sample does. Say the same x̄ = 33.4 and s = 6.4 had come from n = 25:

SE = 6.4 ∕ √25 = 6.4 ∕ 5 = 1.28     t = 3.4 ∕ 1.28 = 2.656, df = 24, t* = 2.064, p ≈ 0.014

The estimated effect is the same, 3.4 minutes, but now we reject with room to spare. Nothing about the world changed; only how exact our measurement was. This is why “not significant” must never be reported as “no difference.” It is also why a study's sample size belongs in every conclusion you read.

α = 0.05 is a habit, not a cliff. A p-value of 0.051 and one of 0.049 carry almost the same evidence. Yet the first is often written up as “no effect” and the second as “an effect.” Report the actual p-value, the confidence interval and the sample size. Let the reader see how strong the evidence is, instead of a verdict made up at a cutoff.
Interactive Drag the degrees of freedom and watch the t curve tighten onto the normal, with a logarithmic tail zoom, a real sampling simulation showing why estimating s fattens the tails, and live-computed critical values that reveal what using 1.960 too soon actually costs. Open full ↑
Key points
  • t = (x̄ − μ0) ∕ (s∕√n). Use it whenever σ is unknown, which is nearly always.
  • Estimating σ with s adds noise, so the t curve has heavier tails and larger critical values than the normal.
  • df = n − 1, because one degree of freedom was spent working out x̄.
  • As df → ∞, the t distribution becomes the standard normal.

Section 4Test for a proportion

A binomial histogram overlaid with a smooth normal curve showing the normal approximation
Reference. The normal approximation to the binomial. It is the math permission slip behind the one-proportion z-test. Source and license: see the figure credits

Counting successes

Often the variable is made of groups (categorical) instead of numbers: yes or no, faulty or fine, voted or did not. The parameter of interest is then the population proportion p. The estimate is the sample proportion p̂ = x∕n, where x is the number of successes.

The count x follows a binomial distribution. When the sample is large enough, a smooth normal curve comes very close to that lumpy binomial histogram, and that is what lets us reuse the z tools. Under H0: p = p0, the sampling distribution of p̂ is about normal, with mean p0 and standard error √( p0(1 − p0) ∕ n ). Standardizing gives the one-proportion z-test:

z = ( p̂ − p0 ) ∕ √( p0(1 − p0) ∕ n )

Note this with care: there is no t-test for a proportion. For a mean, the center and the spread are separate parameters, so estimating the spread costs you degrees of freedom. For a proportion, they are locked together. The variability p0(1 − p0) is fully set by the value p0 that the null already names. Nothing extra is being estimated, so no t fix is needed.

A worked example

A policy group claims that 60% of adults in a region support a proposed measure. An independent random sample of n = 400 adults finds 216 supporters. Does this go against the claim? Test at α = 0.05.

Step 1. H0: p = 0.60     Ha: p ≠ 0.60

Step 2. α = 0.05. Check the success/failure condition using p0: np0 = 400(0.60) = 240 ≥ 10, and n(1 − p0) = 400(0.40) = 160 ≥ 10. The sample is random, and 400 adults is far under 10% of the region's population, so the observations are close enough to independent. The conditions are met.

Step 3. Find the sample proportion and the null standard error:

p̂ = 216 ∕ 400 = 0.54
SE0 = √( 0.60 × 0.40 ∕ 400 ) = √( 0.24 ∕ 400 ) = √0.0006 = 0.02449
z = (0.54 − 0.60) ∕ 0.02449 = (−0.06) ∕ 0.02449 = −2.45

Step 4. The area below z = −2.45 is 0.00714. It is two sided, so p = 2 × 0.00714 = 0.0143.

Step 5. Since 0.0143 < 0.05, reject H0. There is statistically significant evidence that the true support rate differs from 60%, and the sample points to something closer to 54%.

The one place students reliably slip

The test and the confidence interval use different standard errors, and that is not a contradiction. A test is run in the null's world, so it uses the null's variability, p0(1 − p0). A confidence interval assumes no one value, so it must estimate variability from the data, using p̂(1 − p̂).

For our data, the 95% interval is

SE = √( 0.54 × 0.46 ∕ 400 ) = √0.000621 = 0.02492
0.54 ± 1.96 × 0.02492 = 0.54 ± 0.0488 → (0.491, 0.589)

The interval leaves out 0.60, which agrees with the rejection. Because the two standard errors differ a little, a test and interval can now and then disagree in borderline cases. That is a known quirk, not an error on your part.

SituationStandard errorWhy
Hypothesis test√( p0(1 − p0)∕n )Everything is computed assuming H0 is true
Confidence interval√( p̂(1 − p̂)∕n )No null value is assumed, so estimate from the data
Condition to checknp0 ≥ 10 and n(1 − p0) ≥ 10The normal approximation to the binomial must hold
If the condition failsExact binomial testCompute tail probabilities from the binomial directly
Percentages are not proportions until you divide. Every amount in these formulas is a decimal between 0 and 1. Feeding 54 and 60 into the formula instead of 0.54 and 0.60 gives a wildly wrong answer, and it is the most common math failure on proportion problems. Convert first, then work it out, then convert back to a percentage only in your final sentence.
Interactive Run a one-proportion z-test end to end on real simulated data: set the count, watch z land on the curve beside the critical value and shaded p-value, compare the exact binomial distribution against the normal curve the test substitutes for it, and repeat the whole test thousands of times to see its true long-run rejection rate. Open full ↑
Key points
  • p̂ = x∕n, and the test statistic is z = (p̂ − p0) ∕ √(p0(1 − p0)∕n).
  • The test's standard error uses p0, and the confidence interval's uses p̂.
  • Check np0 ≥ 10 and n(1 − p0) ≥ 10. Otherwise, use the exact binomial test.
  • There is no t-test for a proportion, because the null value sets the variability and nothing extra is estimated.

Section 5Assumptions

Sampling distributions of the sample mean drawn from a non-normal population at increasing sample sizes, becoming more bell-shaped
Reference. Sampling distributions of the sample mean from a population that is not normal. As n grows, the distribution of x̄ becomes normal. Source and license: see the figure credits

Three conditions, in order of importance

A p-value is only as trustworthy as the assumptions used to work it out. Every one sample test rests on three conditions, and they are plainly not equally forgiving.

1. Random sampling. The data must come from a random sample of the population you want to describe, or from a randomized experiment. This is the assumption that cannot be rescued. Say your sample is a convenience sample, an online poll where people picked themselves or the volunteers who happened to show up. Then x̄ estimates the wrong thing, and no amount of data fixes it. A bigger biased sample simply gives you a more exact wrong answer.

2. Independence. Each observation must carry information not already held in the others. Sampling with replacement promises it. Sampling without replacement is close enough, as long as n is no more than about 10% of the population. Clustered data break this badly. Measuring five patients from each of ten clinics is not fifty independent observations. Treating it as if it were gives a standard error that is too small and a p-value that looks too impressive.

3. Approximate normality of the sampling distribution. This is the one everyone worries about, and it is the most forgiving of the three. What must be about normal is the sampling distribution of x̄, not the raw data. The Central Limit Theorem says that as n grows, the distribution of x̄ comes closer and closer to normal, whatever the population's shape. Skewed populations just need larger samples to get there.

Sample sizeWhat the data must look likeHow to check
n < 15Close to symmetric, no outliers, no clear skewDotplot or boxplot, and be conservative
15 ≤ n < 40Mild skew acceptable; outliers still a problemHistogram plus a normal quantile plot
n ≥ 40Even fairly skewed data are usually fineStill plot the data; look for outliers and errors
Any n, proportionsnp0 ≥ 10 and n(1 − p0) ≥ 10Arithmetic, not a plot

Robustness, and what to do when a condition fails

A method is robust if it still works well enough when its assumptions are broken a little. The one sample t-test is famously robust to data that are not normal, once n is moderate. But it is not robust to outliers in small samples. A single mistyped value can drag both x̄ and s and flip a conclusion. And no test is robust to a sample that is not random, or to observations that depend on each other. Those failures do not just widen the uncertainty; they make it worthless.

TestRequiresIf violated
z-test for μRandom, independent, σ known, x̄ normalIf σ is estimated, use the t-test instead
t-test for μRandom, independent, population not strongly skewed for small nIncrease n, or use a nonparametric test such as the sign or signed-rank test
One-proportion z-testRandom, independent, np0 ≥ 10 and n(1 − p0) ≥ 10Use the exact binomial test
All threeHypotheses fixed before seeing the dataThe stated α is fiction; the real error rate is higher

The assumption nobody writes down

Beyond the math conditions sits one about method. The hypotheses, the significance level and the direction of the alternative must be settled before the data are looked at. Say you test many outcomes and report only the significant one, or switch to a one-tailed alternative after seeing which way the sample fell. Either one pushes the Type I error rate far above the α you claimed. With twenty independent tests at α = 0.05, you expect one “significant” result by chance alone, even if nothing at all is going on.

Last, remember what a test cannot tell you. Statistical significance means “probably not just noise.” It does not mean large, important or worth acting on. With n = 1,000,000, a difference of 0.02 mL in fill volume gives a standard error of 4.0/√1,000,000 = 0.004 mL and z = 5. That is wildly significant, and fully irrelevant. With n = 8, a difference that would change how patients are treated may fail to reach significance. Report the estimate and its confidence interval alongside the p-value. Judge importance on the scale of the actual measurement, such as minutes, milliliters or percentage points, not on the scale of the p-value.

The Central Limit Theorem fixes shape, not bias. A large n makes the sampling distribution of x̄ beautifully normal even when the population is skewed. But it does nothing at all about a sample that was not random. Convenience samples, surveys where people choose to reply and heavy nonresponse all give estimates centered on the wrong value. A large sample only tightens the interval around that wrong value. Design beats math every time.
Interactive Six real situations and four candidate procedures: decide which one-sample test belongs in each, then break the randomness, independence, and normality assumptions with sliders while a live simulation reports the false-alarm rate the test actually delivers instead of the 5% you asked for. Open full ↑
Key points
  • Random sampling is the unforgiving assumption, since no sample size repairs bias.
  • Independence holds if you sample at random and n is under 10% of the population. Clustering breaks it.
  • Normality applies to the sampling distribution of x̄, and the CLT gives it as n grows.
  • Hypotheses must be fixed before the data are seen, and significance is not the same as importance.

The chapter in one breath

  • Every hypothesis test is the same five steps: hypotheses, level and conditions, test statistic, p-value and a conclusion in context.
  • A test statistic always answers one question: how many standard errors is the estimate from the claim?
  • Use the z-test for a mean, z = (x̄ − μ0)∕(σ∕√n), only when σ is truly known.
  • Use the t-test, t = (x̄ − μ0)∕(s∕√n) with df = n − 1, when σ is estimated. It has heavier tails and larger critical values.
  • Use the one-proportion z-test, z = (p̂ − p0)∕√(p0(1 − p0)∕n). The test uses p0 in the SE, and the interval uses p̂.
  • A p-value is the probability of data this extreme given that the null is true, never the probability that the null is true.
  • We fail to reject instead of accepting. “Not significant” may only mean the sample was too small.
  • Every test assumes randomness, independence and close enough to normal, and randomness is the one nothing can repair.

ReferenceWords worth knowing

A quick reference for the words in this chapter. Skim it now, and come back to it whenever a term in a results section stops making sense.

Alpha (α), significance level
The cutoff chosen ahead of time for how much evidence is needed to reject H0. It is also the long run rate of Type I errors. It is most often 0.05, but that is a habit, not a law.
Alternative hypothesis (Ha)
The statement the researcher is looking for evidence of, written with ≠, > or <. It is chosen from the research question, never from the data seen.
Central limit theorem
The result that the sampling distribution of x̄ comes closer and closer to a normal distribution as n grows, whatever the shape of the population.
Critical value
The cutoff (z* or t*) that marks the edge of the rejection region for a chosen α and alternative.
Degrees of freedom (df)
The number of independent pieces of information left for estimating variability. It is n − 1 for a one sample t-test, because x̄ used up one.
Effect size
A measure of how big a difference is, on the scale of the data or standardized. It is the question a p-value does not answer.
Null hypothesis (H0)
The “no effect, no difference” statement that holds the equality. It is the assumption under which the p-value is worked out.
One-proportion z-test
The test of H0: p = p0 using z = (p̂ − p0) ∕ √(p0(1 − p0)∕n).
One-tailed (one-sided) test
A test whose alternative points in a single direction, which puts the whole rejection region in one tail. It must be named before data collection.
p-value
The probability, assuming H0 is true, of getting a test statistic at least as extreme as the one seen.
Power
1 − β: the probability of correctly rejecting a false null. It rises with a larger n, larger true effects, less variability and a larger α.
Rejection region
The set of test statistic values, in the tail or tails, that lead to rejecting H0 at the chosen α.
Robustness
A method's ability to work well enough when its assumptions are broken a little. The t-test is robust to data that are a bit off normal, but not to outliers in small samples.
Sample proportion (p̂)
The count of successes divided by the sample size, x∕n. It is the point estimate of the population proportion p.
Standard error
The standard deviation of a sampling distribution: σ∕√n for a mean with σ known, and s∕√n when it is estimated.
Statistically significant
Describes a result whose p-value falls below α. It means “unlikely to be noise alone,” not “large” or “important.”
Student's t distribution
A symmetric, bell shaped family of distributions labeled by degrees of freedom, with heavier tails than the normal. It comes closer and closer to the standard normal as df grows.
Test statistic
A standardized measure of how far the sample estimate lies from the null value, in standard errors. Here it is z or t.
Two-tailed (two-sided) test
A test whose alternative is ≠. It splits the rejection region between both tails and doubles the one tail probability to get the p-value.
Type I error
Rejecting a null hypothesis that is actually true: a false alarm. Its long run rate is α.
Type II error
Failing to reject a null hypothesis that is actually false: a miss. Its rate is β.
z-test
A test whose statistic is compared with the standard normal distribution. For a mean, it needs σ to be known.

Check yourself

1. List the five steps of a hypothesis test in order, and state what changes from one test to another.
(1) State H0 and Ha; (2) choose α and check conditions; (3) work out the test statistic; (4) find the p-value or compare with the critical value; (5) decide and explain in context. Only the formula in step 3 changes between tests. And even that is always (estimate − claim) ÷ standard error.
2. A study reports p = 0.03. A classmate says, “So there's only a 3% chance the null hypothesis is true.” Correct them.
That is wrong. The p-value is worked out assuming the null is true, so it cannot be the probability that the null is true. The correct reading: if H0 were true, results at least this extreme would occur about 3% of the time. It is the probability of the data given the hypothesis, not of the hypothesis given the data.
3. Why do we say “fail to reject H0” instead of “accept H0”?
A result that is not significant fits with the null being true or with a real effect that the study was too small to detect. Absence of evidence is not evidence of absence. The test never confirms the null; it only fails to overturn it.
4. A calibrated instrument has a known σ = 4.0. In a random sample of n = 25, x̄ = 498.2. The test is H0: μ = 500 against a two sided alternative. Work out the standard error, z and the p-value, and state the conclusion at α = 0.05.
SE = 4.0∕√25 = 0.80; z = (498.2 − 500)∕0.80 = −2.25; p = 2(0.0122) = 0.0244; reject H0. At the 5% level, there is evidence that the mean differs from 500. Put another way, |−2.25| is bigger than the critical value 1.96.
5. Why does the t distribution have heavier tails than the standard normal?
Because s is estimated from the same sample and varies from sample to sample. That adds a second source of randomness on top of the variation in x̄. The extra noise makes extreme standardized values more common, so the tails are thicker and the critical values larger. That is the honest price of not knowing σ.
6. Explain why the degrees of freedom for a one sample t-test are n − 1.
Working out s needs x̄, which is worked out from the same data, and that uses up one independent piece of information. Once you know n − 1 of the deviations from the mean, the last one is forced, because all n deviations must add up to zero.
7. A random sample of n = 16 gives x̄ = 33.4 and s = 6.4. Test H0: μ = 30 two sided at α = 0.05 (t* = 2.131 at df = 15). Work out t and decide.
SE = 6.4∕4 = 1.60; t = 3.4∕1.60 = 2.125 with df = 15. Since 2.125 < 2.131 (p ≈ 0.051), fail to reject H0. The 95% interval, 33.4 ± 2.131(1.60) = (29.99, 36.81), contains 30, barely. That is the same conclusion in interval form.
8. Use the same x̄ = 33.4 and s = 6.4, but with n = 25 (t* = 2.064 at df = 24). Redo the test. What does the change teach you?
SE = 6.4∕5 = 1.28; t = 3.4∕1.28 = 2.656 > 2.064, so reject H0 (p ≈ 0.014). The estimated effect is the same (3.4 minutes); only the precision changed. “Not significant” can simply mean the sample was too small, so sample size must be reported with every conclusion.
9. In a random sample of n = 400, 216 people support a measure. Test H0: p = 0.60 against a two sided alternative at α = 0.05, showing the conditions and the math.
Conditions: np0 = 240 ≥ 10 and n(1 − p0) = 160 ≥ 10. Then p̂ = 216∕400 = 0.54; SE0 = √(0.6 × 0.4∕400) = √0.0006 = 0.02449; z = −0.06∕0.02449 = −2.45; p = 2(0.00714) = 0.0143; reject H0. There is evidence that the true support rate is not 60%.
10. Why does the one-proportion z-test use p0 in the standard error, while the confidence interval uses p̂?
A test works out everything in the null's world, so it uses the null's variability, p0(1 − p0). A confidence interval assumes no one value of p, so it must estimate variability from the data, using p̂(1 − p̂). Because the two standard errors differ a little, a borderline test and interval can now and then disagree.
11. A researcher surveys 5,000 visitors to their own website and finds a highly significant result. Why does the huge sample size not rescue the study?
The sample is not random. It is a convenience sample of people who picked themselves, so the estimate is centered on the wrong value. The Central Limit Theorem fixes the shape of the sampling distribution, not bias. A larger biased sample just gives a narrower interval around the wrong number.
12. State the three conditions every one sample test needs. Rank them by how forgiving they are, and give one fix for the least serious failure.
Random sampling (least forgiving, since nothing repairs it), independence (sample at random and keep n under 10% of the population) and approximate normality of the sampling distribution of x̄ (most forgiving). For a normality failure, raise n so the CLT takes over, or switch to a test that does not assume a shape (a nonparametric test), such as the sign test or the signed-rank test. For proportions, use the exact binomial test when np0 or n(1 − p0) falls below 10.