8.3 Probability Distribution Needed for Hypothesis Testing
SLO 4
Demonstrate an understanding of, and ability to use, basic ideas of statistical processes, including hypothesis tests and confidence interval estimation.
Before you can run a test you have to know which distribution the test statistic follows. This section lays out the three distributions — normal, Student's t, and binomial — and the conditions that pick one, so the later test steps have a foundation to stand on.
SLO 5
Identify appropriate statistical techniques and use technology-based statistical analysis to describe, interpret, and communicate results.
The technique-selection skill here is matching the test statistic's distribution to the parameter and sample size. You do not run a calculator command yet, but you practice naming which distribution a given test will use, which is the prerequisite for every calculator step that follows.
Learning Objectives
By the end of this section, you will be able to:
- name the probability distribution a hypothesis test uses, given the parameter being tested and what you know about the population;
- state the assumptions that a normal test for a mean, a Student's t-test for a mean, and a normal test for a proportion each require;
- check the \(np > 5\) and \(nq > 5\) condition that lets a sample proportion be treated as normal;
- read a scenario and decide which distribution the test calls for before doing any arithmetic.
Earlier in the course, we discussed sampling distributions. Particular distributions are associated with various types of hypothesis testing. That is the whole job of this short section: before you compute anything, you have to know which curve the computation is going to live on. Pick the wrong one and every number after it — the test statistic, the p-value, the decision — is measured against the wrong ruler. The good news is that the choice comes down to two questions you can answer by reading the problem, and there are only three answers.
8.3.1 Matching a Test to Its Distribution
The following table summarizes various hypothesis tests and corresponding probability distributions that will be used to conduct the test, based on the assumptions shown below.
| Type of Hypothesis Test | Population Parameter | Estimated value (point estimate) | Probability Distribution Used |
|---|---|---|---|
| Hypothesis test for the mean, when the population standard deviation is known | Population mean \(\mu\) | Sample mean \(\overline{x}\) | Normal distribution, \(\overline{X} \sim N\left(\mu_X, \frac{\sigma_X}{\sqrt{n}}\right)\) |
| Hypothesis test for the mean, when the population standard deviation is unknown and the distribution of the sample mean is approximately normal | Population mean \(\mu\) | Sample mean \(\overline{x}\) | Student's t-distribution, \(t_{df}\) |
| Hypothesis test for proportions | Population proportion \(p\) | Sample proportion \(p'\) | Normal distribution, \(P' \sim N\left(p, \sqrt{\frac{p \cdot q}{n}}\right)\) |
Read the table left to right, one row at a time. The first column names the situation you are in, and the last column names the curve you will draw. Two questions get you from one end to the other. First: is the claim about an average or about a percentage? An average of a measured quantity — hours of sleep, dollars of rent, degrees of temperature — is a population mean \(\mu\). A share of a group that has some yes-or-no trait — the fraction of voters who turned out, the fraction of parts that were defective — is a population proportion \(p\). Second, and only if the claim is about a mean: do you know the population standard deviation \(\sigma\)? If the problem hands you \(\sigma\), you get the normal distribution. If instead it hands you the sample standard deviation \(s\), you get Student's t-distribution.
Notice that the middle column is doing quiet work too. It names the statistic you actually compute from your data — \(\overline{x}\) for a mean, \(p'\) for a proportion — and that statistic is the point estimate the test is built around. The distribution in the last column is not the distribution of the raw data. It is the sampling distribution of that point estimate: the pattern you would see if you took sample after sample and plotted the estimate each time. That distinction is what all of Chapter 6 was for, and it is why a test about a mean can use a normal curve even when the underlying measurements are lumpy.
Every test needs a significance level \(\alpha\) chosen before you look at the data. If there is no given preconceived \(\alpha\), then use \(\alpha = 0.05\).
That default is worth pinning down, because \(\alpha\) is the one number in a hypothesis test that does not come from your data at all. It is a decision you make about how much risk of a Type I error you are willing to carry, and Section 8.2 is where that risk got its name. Setting it in advance is what keeps the procedure honest: if you were allowed to pick \(\alpha\) after seeing the p-value, you could always pick one that gives you the answer you wanted, and the test would prove nothing. So the order is fixed. Write the hypotheses, choose \(\alpha\), collect the data, then compute. When a problem is silent about \(\alpha\), the convention in this book — and in most of the research you will read — is five percent, meaning you accept a one-in-twenty chance of rejecting a true null hypothesis. Some fields set it tighter. A drug trial or a physics experiment may use \(0.01\) or far smaller, precisely because a false alarm there is expensive. The distribution you pick from the table above does not change with \(\alpha\); what changes is how far into the tail the evidence has to reach before you are willing to call it.
For each claim below, say whether the parameter being tested is a mean or a proportion, and name the point estimate you would compute from the sample.
a) A campus health center claims that students sleep an average of 7 hours a night.
b) Marisol Delgado, a quality inspector, claims that fewer than 3% of the bolts coming off her line are defective.
Solution — sorting claims into mean or proportion
Step 1 — Ask what is being measured on each individual. In part (a) each student contributes a number of hours, which is a measured quantity. In part (b) each bolt is either defective or not, which is a yes-or-no trait.
Step 2 — Match that to a parameter. A measured quantity averaged over the population is a population mean \(\mu\). A yes-or-no trait counted as a share of the population is a population proportion \(p\).
Step 3 — Name the point estimate. The sample version of \(\mu\) is the sample mean \(\overline{x}\). The sample version of \(p\) is the sample proportion \(p'\).
Answer: a. population mean \(\mu\), estimated by \(\overline{x}\). b. population proportion \(p\), estimated by \(p'\).
8.3.2 Testing a Single Mean
When you perform a hypothesis test of a single population mean \(\mu\) using a normal distribution (often called a z-test), you take a simple random sample from the population. The population you are testing is normally distributed, or your sample size is sufficiently large. You know the value of the population standard deviation, which, in reality, is rarely known.
Definition 8.3.1 - Knowing the population standard deviation fixes the width of the curve the test runs on, and that width pulls in by a factor of the square root of the sample size.
When you perform a hypothesis test of a single population mean \(\mu\) using a Student's t-distribution (often called a t-test), there are fundamental assumptions that need to be met in order for the test to work properly. Your data should be a simple random sample that comes from a population that is approximately normally distributed. You use the sample standard deviation to approximate the population standard deviation. If the sample size is sufficiently large, a t-test will work even if the population is not approximately normally distributed.
Knowing \(\sigma\) is like measuring a board with a certified steel rule. Estimating it with \(s\) is like measuring with a rule you also had to build from the same board. The t-distribution's fatter tails are the extra doubt that second measurement costs you.
Definition 8.3.2 - With the population spread unknown, the sample's own s slides into its slot in the test statistic, and the curve that comes out pays for the guess with fatter tails.
Read those two definitions side by side and you will see they share almost every requirement. Both demand a simple random sample. Both want either an approximately normal population or a sample large enough that the Central Limit Theorem takes over. The single point of difference is the standard deviation: the z-test is handed \(\sigma\), the t-test has to make do with \(s\). Because \(s\) is itself a sample quantity, it wobbles from sample to sample, and the t-distribution is the curve that accounts for that extra wobble. Its degrees of freedom, written \(df\), are what tie it to your sample size — a small sample gives a t-curve with noticeably heavier tails than the normal curve, and a large one gives a t-curve you can barely tell apart from it.
In practice, the phrase in Definition 8.3.1 that matters most is "which, in reality, is rarely known." If you genuinely knew \(\sigma\) for the population, you would usually know \(\mu\) as well, and there would be nothing to test. So the z-test for a mean is mostly a teaching device and a special case for situations where a long production history has pinned down the spread. The t-test is the one you will actually reach for. When a homework problem gives you a sample mean, a sample standard deviation, and a sample size, and says nothing about the population's spread, it is asking for a t-test even if it never uses the word.
So the choice between these two rows of Table 8.3.1 comes down to one question you can answer just by reading carefully: whose standard deviation were you handed? That sounds like a small detail, and mathematically it is a single substitution, but it decides which curve the test statistic lives on and therefore what p-value you end up comparing against \(\alpha\). The trap is that problems rarely announce the answer. They hand you a pile of numbers and expect you to notice whether the spread was described as belonging to the population or computed from the sample you took.
A random sample of 30 commuters reports a mean travel time of 24 minutes with a sample standard deviation of 6 minutes. You want to test whether the population mean travel time is 22 minutes. Which distribution should the test use, and why?
Solution — commuter travel times with an unknown sigma
Step 1 — Identify the parameter. The claim is about a mean travel time, so the parameter is a population mean \(\mu\).
Step 2 — Check what you were given for the spread. The problem reports a sample standard deviation of 6 minutes. It never gives a population standard deviation, so \(\sigma\) is unknown.
Step 3 — Apply Definition 8.3.2. A test of a single mean with \(\sigma\) unknown, from a random sample of size \(n = 30\), uses Student's t-distribution with \(df = n - 1 = 29\).
Answer: Use a Student's t-distribution, \(t_{29}\), because the population standard deviation is unknown and \(s\) is standing in for it.
Try it in rāSHio
Once you have decided the commute data needs a t-distribution, rāSHio will run the test for you: choose Stats → T Stats, enter the sample mean 24, the sample standard deviation 6 and the sample size 30, then set the claimed mean to 22. The panel reports the same 29 degrees of freedom you worked out here, which is the fastest way to confirm you picked the right curve before you read anything else off the screen.
Figure 8.3.1 — Running a one-sample t-test in rāSHio: Stats → T Stats. The walkthrough uses its own demo data; the steps are the ones you run on the commute times.
8.3.3 Testing a Single Proportion
When you perform a hypothesis test of a single population proportion \(p\), you take a simple random sample from the population. You must meet the conditions for a binomial distribution: there are a certain number \(n\) of independent trials, the outcomes of any trial are success or failure, and each trial has the same probability of a success \(p\). The shape of the binomial distribution needs to be similar to the shape of the normal distribution. To ensure this, the quantities \(np\) and \(nq\) must both be greater than five \((np > 5\) and \(nq > 5)\). Then the binomial distribution of a sample (estimated) proportion can be approximated by the normal distribution with \(\mu = p\) and \(\sigma = \sqrt{\frac{pq}{n}}\). Remember that \(q = 1 - p\).
A binomial distribution is a row of separate bars, one for each possible count. When \(n\) is big enough and \(p\) is not too extreme, those bars line up into a shape a smooth normal curve traces almost exactly. The \(np > 5\) test is how you check the staircase got tall enough to trace.
Definition 8.3.3 - The binomial bars fill in as the sample grows, and once np and nq have both cleared five a smooth normal curve traces their tops.
The third row of Table 8.3.1 is the odd one out. A proportion comes from counting successes and failures, which is a binomial setting, not a normal one. The test still gets to use a normal curve, but only after you check that the binomial distribution in front of you is shaped enough like a normal distribution for the swap to be fair. That check is the last sentence of the definition above, and it is the only part of this row you have to actively verify before running anything.
Work the condition rather than just reading it. The quantity \(np\) is the expected number of successes in your sample and \(nq\) is the expected number of failures, so the requirement is really saying that you need to expect at least a handful of each. A survey of 400 people testing a claimed proportion of \(p = 0.5\) gives \(np = 200\) and \(nq = 200\), comfortably clear. A survey of 40 people testing a claimed rare event at \(p = 0.02\) gives \(np = 0.8\), which fails — you would expect less than one success, and a normal curve centered on a value that low is not a believable stand-in for the lumpy binomial staircase.
When the condition fails, the fix is not to run the test anyway. You either collect a larger sample, so that \(np\) and \(nq\) both climb past five, or you work with the exact binomial distribution instead of approximating it. Notice also which \(p\) you use in the check: the value claimed by the null hypothesis, not the sample proportion \(p'\) you observed. The whole test is conducted in the world where \(H_{0}\) is true, so the null's value of \(p\) is the one that sets both the center \(\mu = p\) and the spread \(\sigma = \sqrt{\frac{pq}{n}}\) of the curve you will be drawing.
A city claims that 15% of its residents bike to work. You survey a simple random sample of 60 residents. Check whether a normal test for a single proportion is appropriate.
Solution — checking the biking claim against np and nq
Step 1 — Read off \(n\), \(p\), and \(q\) from the null claim. The claimed proportion is \(p = 0.15\), so \(q = 1 - 0.15 = 0.85\), and the sample size is \(n = 60\).
Step 2 — Compute both products.
$$ np = 60(0.15) = 9 \qquad nq = 60(0.85) = 51 $$Step 3 — Compare each to five. Both \(9 > 5\) and \(51 > 5\), and the sample is a simple random sample of independent yes-or-no responses, so the binomial conditions hold and the normal approximation is fair.
Answer: Yes. A normal test for a single proportion is appropriate, using \(\mu = 0.15\) and \(\sigma = \sqrt{\frac{(0.15)(0.85)}{60}}\).
Try it in rāSHio
The np and nq check is the gate; the test is what you run once it opens. In rāSHio choose Stats → Prop Stats, enter the claimed proportion 0.15, the sample size 60 and however many of the 60 residents you surveyed bike to work. The panel works on the same normal curve centred on 0.15 that this section just told you to use, so the condition you checked by hand is the thing that licenses everything it reports.
Figure 8.3.2 — Running a proportion test in rāSHio: Stats → Prop Stats. The walkthrough uses its own demo counts; the steps are the ones you run on the biking claim.
Problem Set 8.3
Problem 1. Which two distributions can you use for hypothesis testing for this chapter?
Problem 1 Solution
Step 1 — Recall what the chapter tests: every test in this chapter is about a single population mean or a single population proportion, and Table 8.3.1 lists the distribution used for each case.
Step 2 — Read the last column of the table: the mean-with-known-\(\sigma\) row and the proportion row both use the normal distribution; the mean-with-unknown-\(\sigma\) row uses Student's t-distribution. That is only two distinct curves.
Answer: A normal distribution or a Student's t-distribution.
Problem 2. Which distribution do you use when you are testing a population mean and the population standard deviation is known? Assume a normal distribution, with \(n \geq 30\).
Problem 2 Solution
Step 1 — Identify the parameter: the claim is about a population mean \(\mu\).
Step 2 — Check what is known about the spread: the problem states that the population standard deviation \(\sigma\) is known, which is the condition in Definition 8.3.1.
Step 3 — Confirm the shape condition: with \(n \geq 30\) the sampling distribution of \(\overline{X}\) is approximately normal even without a normal population, so the z-test applies.
Answer: The normal distribution, \(\overline{X} \sim N\left(\mu_X, \frac{\sigma_X}{\sqrt{n}}\right)\).
Problem 3. Which distribution do you use when the standard deviation is not known and you are testing one population mean? Assume sample size is large.
Problem 3 Solution
Step 1 — Identify the parameter: the claim is about one population mean \(\mu\).
Step 2 — Check what is known about the spread: the standard deviation is not known, so the sample standard deviation \(s\) has to stand in for \(\sigma\). That is the condition in Definition 8.3.2.
Step 3 — Note that a large sample does not change the choice: a large \(n\) makes the t-curve look nearly normal, but the test is still a t-test because \(s\) is an estimate.
Answer: Use a Student's t-distribution.
Problem 4. A population mean is 13. The sample mean is 12.8, and the sample standard deviation is two. The sample size is 20. What distribution should you use to perform a hypothesis test? Assume the underlying population is normal.
Problem 4 Solution
Step 1 — Sort the given numbers: the population mean is \(\mu = 13\), the sample mean is \(\overline{x} = 12.8\), the sample standard deviation is \(s = 2\), and the sample size is \(n = 20\). The parameter being tested is a mean.
Step 2 — Look for a population standard deviation: none is given. The 2 is labeled a sample standard deviation, so \(\sigma\) is unknown.
Step 3 — Check the shape requirement: the problem says the underlying population is normal, which satisfies Definition 8.3.2 even though \(n = 20\) is small.
Step 4 — Set the degrees of freedom: \(df = n - 1 = 20 - 1 = 19\).
Answer: A Student's t-distribution with 19 degrees of freedom, \(t_{19}\).
Problem 5. A population has a mean of 25 and a standard deviation of five. The sample mean is 24, and the sample size is 108. What distribution should you use to perform a hypothesis test?
Problem 5 Solution
Step 1 — Sort the given numbers: the population has mean 25 and standard deviation 5; the sample mean is \(\overline{x} = 24\) with \(n = 108\). The parameter being tested is a mean.
Step 2 — Notice whose standard deviation it is: the 5 belongs to the population, so \(\sigma = 5\) is known. That is the condition in Definition 8.3.1.
Step 3 — Check the shape requirement: \(n = 108\) is large, so the sampling distribution of \(\overline{X}\) is approximately normal.
Answer: A normal distribution for a single population mean, \(\overline{X} \sim N\left(25, \frac{5}{\sqrt{108}}\right)\).
Problem 6. It is thought that 42% of respondents in a taste test would prefer Brand A. In a particular test of 100 people, 39% preferred Brand A. What distribution should you use to perform a hypothesis test?
Problem 6 Solution
Step 1 — Identify the parameter: preferring Brand A is a yes-or-no trait, and the claim is about the share of respondents who prefer it, so the parameter is a population proportion \(p\).
Step 2 — Check the binomial-to-normal condition: the null claim is \(p = 0.42\), so \(q = 0.58\) and \(n = 100\).
$$ np = 100(0.42) = 42 \qquad nq = 100(0.58) = 58 $$Both are greater than five, so the normal approximation is fair.
Step 3 — Name the distribution: by Definition 8.3.3 the sample proportion is approximately normal with \(\mu = p\) and \(\sigma = \sqrt{\frac{pq}{n}}\).
Answer: A normal distribution for a single population proportion, \(P' \sim N\left(0.42, \sqrt{\frac{(0.42)(0.58)}{100}}\right)\).
Problem 7. You are performing a hypothesis test of a single population mean using a Student's t-distribution. What must you assume about the distribution of the data?
Problem 7 Solution
Step 1 — Go back to the assumptions: Definition 8.3.2 lists what a t-test needs — a simple random sample, and a population that is approximately normally distributed.
Step 2 — Answer the question asked: the question is only about the distribution of the data, which is the second requirement.
Answer: It must be approximately normally distributed.
Problem 8. You are performing a hypothesis test of a single population mean using a Student's t-distribution. The data are not from a simple random sample. Can you accurately perform the hypothesis test?
Problem 8 Solution
Step 1 — Check the requirement that is at risk: Definition 8.3.2 requires the data to be a simple random sample.
Step 2 — Compare it to what you have: the data are not from a simple random sample, so that requirement fails.
Step 3 — Say what the failure costs you: without random sampling there is no guarantee the sample represents the population, so the sampling distribution the test relies on does not apply and the p-value means nothing about the population.
Answer: No. The t-test requires a simple random sample, so the results cannot be trusted or generalized to the population.
Problem 9. You are performing a hypothesis test of a single population proportion. What must be true about the quantities of \(np\) and \(nq\)?
Problem 9 Solution
Step 1 — Recall why the condition exists: a proportion starts as a binomial count, and the normal curve is only a fair stand-in when the binomial distribution is shaped like a normal distribution.
Step 2 — State the condition from Definition 8.3.3: \(np\) is the expected number of successes and \(nq\) is the expected number of failures, and both must clear five.
Answer: They must both be greater than five: \(np > 5\) and \(nq > 5\).
Problem 10. You are performing a hypothesis test of a single population proportion. You find out that \(np\) is less than five. What must you do to be able to perform a valid hypothesis test?
Problem 10 Solution
Step 1 — Diagnose the failure: \(np < 5\) means you expect fewer than five successes, so the binomial distribution is too lopsided for a normal curve to trace.
Step 2 — Find the quantity you can change: \(p\) is set by the null hypothesis and cannot be adjusted, so the only lever is the sample size \(n\).
Step 3 — Choose the fix: collect more data until \(np > 5\) and \(nq > 5\) both hold. If a larger sample is not possible, drop the approximation and work with the exact binomial distribution instead.
Answer: Increase the sample size until both \(np\) and \(nq\) exceed five; otherwise use the exact binomial distribution rather than the normal approximation.
Problem 11. You are performing a hypothesis test of a single population proportion. The data come from which distribution?
Problem 11 Solution
Step 1 — Separate the data from the test: each observation is a single success-or-failure trial, and the count of successes across \(n\) independent trials is binomial.
Step 2 — Note what the normal curve is doing: the normal distribution is only an approximation used to run the test once \(np > 5\) and \(nq > 5\); the data themselves still come from a binomial distribution.
Answer: The binomial distribution.
Problem 12. It is believed that Lake Tahoe Community College (LTCC) Intermediate Algebra students get less than seven hours of sleep per night, on average. A survey of 22 LTCC Intermediate Algebra students generated a mean of 7.24 hours with a standard deviation of 1.93 hours. At a level of significance of 5%, do LTCC Intermediate Algebra students get less than seven hours of sleep per night, on average? The distribution to be used for this test is \(\overline{X} \sim\)
a) \(N\left(7.24, \frac{1.93}{\sqrt{22}}\right)\)
b) \(N(7.24, 1.93)\)
c) \(t_{22}\)
d) \(t_{21}\)
Problem 12 Solution
Step 1 — Identify the parameter: hours of sleep is a measured quantity averaged over students, so the parameter is a population mean \(\mu\).
Step 2 — Look for a population standard deviation: the survey reports a standard deviation of 1.93 hours computed from the 22 students, so it is a sample standard deviation \(s\). The population value \(\sigma\) is unknown, which rules out both normal-distribution choices, (a) and (b).
Step 3 — Set the degrees of freedom: for a test of a single mean, \(df = n - 1 = 22 - 1 = 21\), so the curve is \(t_{21}\), not \(t_{22}\). That rules out (c).
Answer: d. \(t_{21}\)
Key Terms
z-test — a hypothesis test for a single population mean that uses the normal distribution, available when the population standard deviation \(\sigma\) is known.
t-test — a hypothesis test for a single population mean that uses Student's t-distribution, used when \(\sigma\) is unknown and the sample standard deviation \(s\) stands in for it.
normal test for a single proportion — a hypothesis test about a population proportion \(p\), valid once the binomial conditions hold and both \(np > 5\) and \(nq > 5\).