8.6 Hypothesis Testing of a Single Mean and Single Proportion

Aligned outcomes:

SLO 4

Demonstrate an understanding of, and ability to use, basic ideas of statistical processes, including hypothesis tests and confidence interval estimation.

This lab has you run three complete hypothesis tests on data you collect yourself — a mean with a known standard deviation, a proportion, and a mean with an unknown one — so the machinery of 8.1 through 8.5 becomes something you execute end to end rather than read.

SLO 5

Identify appropriate statistical techniques and use technology-based statistical analysis to describe, interpret, and communicate results.

The three surveys deliberately need three different distributions, so before any calculator work you have to decide which one the problem has handed you, then write a conclusion that is honest about what a sample drawn from your own class can and cannot support.

Learning Objectives

By the end of this section, you will be able to:

In this section, you will learn to:
  • select the distribution a hypothesis test needs — normal when the population standard deviation is known, Student t when it is not, normal again when the parameter is a proportion;
  • run a complete hypothesis test on data you collect yourself, from stating the hypotheses through the test statistic and the p-value;
  • interpret the decision in context and write the conclusion as a complete sentence about the population you sampled.

8.6.1 Stats Lab: Hypothesis Testing of a Single Mean and Single Proportion

This section is a lab, not a reading. Sections 8.1 through 8.5 gave you every piece of a hypothesis test on data somebody else had already collected. Here you collect the data — from your own class — and run three complete tests on it.

The three surveys are not three repetitions of one procedure. They are deliberately built so that each one needs a different distribution, and choosing correctly is the first thing you are graded on:

The distribution is a decision you make before you compute anything

Every test in this lab produces a number, and every number produces a p-value, whether or not you picked the right curve to read it against. Nothing downstream will warn you. Deciding on the distribution first — from what you were given, not from what is convenient — is the step that makes the rest of the arithmetic mean anything.

There is one thing worth being honest about before you start. Your class is not a random sample of your school, and the students in a statistics class are not interchangeable with the students who are not in one. That does not make the lab pointless — the arithmetic is identical, and the practice is real — but it does limit what your conclusion is a conclusion about. When you write the final sentence of each test, write it about the population you actually sampled from, and say plainly that the sample was one of convenience. A test run on a convenience sample can be executed perfectly and still not support the sweeping claim it looks like it supports.

A second honesty problem runs through all three surveys: every value is self-reported. Nobody is watching you watch television, counting the languages spoken in your home, or opening your closet to audit the jeans. People round, people estimate, and people shade their answers toward what sounds normal. That does not invalidate the data, but it does mean a small effect — a class average of 3.8 hours against a claimed 4 — may be measuring the way people report rather than the way people behave. Record the number you were given and note where you suspect the reporting is soft.

Try It Now 8.6.1

Mateo wants to fill in step 4 for all three surveys before his group collects a single data point. Decide which distribution each survey needs, and say what in the problem statement told him.

Solution

Step 1 — Television Survey. The problem says "Assume that \(\sigma = 2\)." You are handed the population standard deviation, so you do not have to estimate it from your sample. The sample mean of a variable with known \(\sigma\) follows

$$ \bar{X} \sim N\!\left(\mu, \frac{\sigma}{\sqrt{n}}\right) $$

so the test uses the normal distribution.

Step 2 — Language Survey. The claim is about a percentage of people, not an average of a measured quantity: 42.3% of Californians speak a language other than English at home. The parameter is a population proportion \(p\), and for a large enough sample the sample proportion is approximately normal,

$$ P' \sim N\!\left(p, \sqrt{\frac{p(1-p)}{n}}\right) $$

so the test uses the normal distribution as well — but built from a proportion, not a mean.

Step 3 — Jeans Survey. You are told the population is normal, you are told to survey eight people, and you are told nothing at all about \(\sigma\). With \(\sigma\) unknown you must estimate it with the sample standard deviation \(s\), and that substitution is exactly what the Student t distribution exists to account for. Degrees of freedom are \(n - 1 = 7\).

Answer: normal, normal-for-a-proportion, and Student t with \(df = 7\). The deciding facts are, in order: \(\sigma\) was given; the parameter is a proportion; \(\sigma\) was withheld and \(n\) is small.

8.6.2 Television Survey

In a recent survey, it was stated that Americans watch television on average four hours per day. Assume that \(\sigma = 2\). Using your class as the sample, conduct a hypothesis test to determine if the average for students at your school is lower.

Collect one value from each student — the number of hours per day that student watches television — and record them below before you compute anything.

Table 8.6.1 — Hours of television per day, one entry per student surveyed.
StudentHoursStudentHours
17
28
39
410
511
612

Note the direction of the claim before you write the hypotheses. The survey says Americans average four hours; you are asked whether students at your school are lower. That word makes this a one-tailed test with the rejection region in the left tail, and it belongs in the alternative hypothesis, not the null.

  1. \(H_{0}\): ____
  2. \(H_{a}\): ____
  3. In words, define the random variable. ____ = ____
  4. The distribution to use for the test is ____.
  5. Determine the test statistic using your data.
  6. Draw a graph and label it appropriately, then shade the actual level of significance. (a) Graph — sketch the curve, mark your test statistic on the horizontal axis, and shade the tail beyond it. (b) Determine the p-value: ____
  7. Do you or do you not reject the null hypothesis? Why?
  8. Write a clear conclusion using a complete sentence.

Because \(\sigma\) is given rather than estimated, the test statistic is a z-score built from the standard error of the sample mean:

$$ z = \frac{\bar{x} - \mu_0}{\dfrac{\sigma}{\sqrt{n}}} = \frac{\bar{x} - 4}{\dfrac{2}{\sqrt{n}}} $$
The null hypothesis is the claim on trial, not the one you want

You would probably guess before collecting anything that students watch less television than the national average. That guess goes in \(H_a\). The null gets the benefit of the doubt — \(\mu = 4\) — and your data has to be surprising enough under that assumption to overturn it.

The \(\sqrt{n}\) in the denominator is doing the work that makes a hypothesis test different from just eyeballing an average. A class average of 3.6 hours is the same distance below 4 whether it came from 8 students or 80, but it is far more surprising coming from 80 — and the standard error is what converts "how far below" into "how surprising".

One more thing to settle before you compute: pick your significance level now, while you still do not know the answer. The level \(\alpha\) is the p-value threshold below which you agree in advance to reject the null, and it is also your accepted rate of being wrong in one particular direction — reject a null that was actually true. Choosing \(\alpha = 0.05\) after seeing a p-value of 0.048 is not a decision, it is a rationalization, and it is the single easiest way to turn a real procedure into a rubber stamp. Write your \(\alpha\) at the top of your data sheet before the first student answers, and hold yourself to it even when the result lands just on the wrong side of it. The Jeans Survey later in this lab is engineered to land exactly there.

Try It Now 8.6.2

A class of 30 students reports an average of 3.2 hours of television per day. With \(\sigma = 2\) and a significance level of \(\alpha = 0.05\), carry out the test.

Solution

Step 1 — state the hypotheses. The claim being tested is the national average; the question asks whether students are lower.

$$ H_0: \mu = 4 \qquad H_a: \mu < 4 $$

Step 2 — compute the standard error.

$$ \frac{\sigma}{\sqrt{n}} = \frac{2}{\sqrt{30}} = \frac{2}{5.4772} = 0.3651 $$

Step 3 — compute the test statistic.

$$ z = \frac{3.2 - 4}{0.3651} = \frac{-0.8}{0.3651} = -2.19 $$

Step 4 — find the p-value. The alternative is \(\mu < 4\), so this is a left-tailed test and the p-value is the area to the left of \(z = -2.19\):

$$ p\text{-value} = P(Z < -2.19) \approx 0.0142 $$

Step 5 — decide. Compare against \(\alpha\): \(0.0142 < 0.05\), so we reject \(H_0\).

Answer: at the 5% significance level there is sufficient evidence to conclude that the mean number of hours of television watched per day by students in this class is less than four. Note the wording — the conclusion is about the population this convenience sample represents, and a p-value of 0.0142 means that if the true mean really were 4 hours, a sample average this low or lower would turn up about 1.4% of the time.

8.6.3 Language Survey

About 42.3% of Californians and 19.6% of all Americans over age five speak a language other than English at home. Using your class as the sample, conduct a hypothesis test to determine if the percent of the students at your school who speak a language other than English at home is different from 42.3%.

This survey collects a yes-or-no answer from each student rather than a measured quantity, so the data reduces to two numbers: how many said yes, and how many were asked.

Table 8.6.2 — Class tally for the language question.
QuantityValue
Number of students surveyed, \(n\)
Number who speak a language other than English at home, \(x\)
Sample proportion, \(p' = x / n\)

Read the claim carefully: it asks whether your school's percentage is different from 42.3%, not whether it is higher or lower. "Different" is two-sided, so the alternative hypothesis uses \(\neq\) and the p-value collects area in both tails. This matters — a two-tailed p-value is twice the one-tailed area, so the same data is harder to call significant when the question is posed this way.

  1. \(H_{0}\): ____
  2. \(H_{a}\): ____
  3. In words, define the random variable. ____ = ____
  4. The distribution to use for the test is ____
  5. Determine the test statistic using your data.
  6. Draw a graph and label it appropriately, then shade the actual level of significance. (a) Graph — sketch the curve, mark your test statistic, and shade both tails. (b) Determine the p-value: ____
  7. Do you or do you not reject the null hypothesis? Why?
  8. Write a clear conclusion using a complete sentence.

The test statistic uses the standard error of a proportion. Note which proportion goes inside the square root — it is \(p_0\), the value the null hypothesis claims, not the \(p'\) you measured:

$$ z = \frac{p' - p_0}{\sqrt{\dfrac{p_0(1 - p_0)}{n}}} = \frac{p' - 0.423}{\sqrt{\dfrac{(0.423)(0.577)}{n}}} $$

The whole procedure runs under the assumption that \(H_0\) is true, so every quantity that describes the distribution you are comparing against comes from \(H_0\). Substituting your sample proportion into the standard error is a common and quiet error: it produces a plausible-looking number and a slightly wrong p-value.

Before trusting the normal approximation, check that it applies. The sample proportion is only approximately normal when both \(np_0\) and \(n(1 - p_0)\) are at least 5. With \(p_0 = 0.423\) that needs roughly a dozen students, so a full class clears it comfortably — but check rather than assume, because a group of six would not.

Try It Now 8.6.3

Mei-Lin runs the language question in her class of 25 students, and 14 of them report speaking a language other than English at home. Help her test at \(\alpha = 0.05\) whether this differs from 42.3%, and verify the normal approximation is legitimate before she computes anything.

Solution

Step 1 — check the condition. Under \(H_0\), \(p_0 = 0.423\):

$$ np_0 = 25(0.423) = 10.575 \ge 5 \qquad n(1 - p_0) = 25(0.577) = 14.425 \ge 5 $$

Both clear 5, so the normal approximation is legitimate.

Step 2 — state the hypotheses. "Different from" is two-sided:

$$ H_0: p = 0.423 \qquad H_a: p \neq 0.423 $$

Step 3 — compute the sample proportion and standard error.

$$ p' = \frac{14}{25} = 0.56 \qquad \sqrt{\frac{(0.423)(0.577)}{25}} = \sqrt{0.009763} = 0.0988 $$

Step 4 — compute the test statistic.

$$ z = \frac{0.56 - 0.423}{0.0988} = \frac{0.137}{0.0988} = 1.39 $$

Step 5 — find the p-value. Two-tailed, so double the area in the upper tail:

$$ p\text{-value} = 2 \cdot P(Z > 1.39) = 2(0.0823) = 0.165 $$

Step 6 — decide. \(0.165 > 0.05\), so we do not reject \(H_0\).

Answer: at the 5% significance level there is not sufficient evidence to conclude that the proportion of students at this school who speak a language other than English at home differs from 42.3%. Worth noticing: 56% against 42.3% looks like a large gap, and it still is not significant — 25 students is a small sample, and the two-tailed test spends its evidence on both directions at once. Had the question been one-tailed, the p-value would have been 0.082, which is still above 0.05 but visibly closer.

8.6.4 Jeans Survey

Suppose that young adults own an average of three pairs of jeans. Survey eight people from your class to determine if the average is higher than three. Assume the population is normal.

Eight is a deliberately small sample, and the survey withholds the population standard deviation. Both facts point at the same distribution.

Table 8.6.3 — Pairs of jeans owned, eight respondents.
PersonPairs of jeansPersonPairs of jeans
15
26
37
48
  1. \(H_{0}\): ____
  2. \(H_{a}\): ____
  3. In words, define the random variable. ____ = ____
  4. The distribution to use for the test is ____.
  5. Determine the test statistic using your data.
  6. Draw a graph and label it appropriately, then shade the actual level of significance. (a) Graph — sketch the curve, mark your test statistic, and shade the right tail. (b) Determine the p-value: ____
  7. Do you or do you not reject the null hypothesis? Why?
  8. Write a clear conclusion using a complete sentence.

With \(\sigma\) unknown you estimate it from the sample, and the test statistic becomes a t-score with \(n - 1 = 7\) degrees of freedom:

$$ t = \frac{\bar{x} - \mu_0}{\dfrac{s}{\sqrt{n}}} = \frac{\bar{x} - 3}{\dfrac{s}{\sqrt{8}}} $$
Fatter tails mean a bigger p-value for the same test statistic

Reading a t-score against a normal table does not produce an error message. It produces a smaller p-value than the data supports, which biases you toward rejecting the null. It is a mistake that only ever fails in one direction, and the direction is the one that manufactures findings.

The formula looks identical to the z-score from the Television Survey with \(s\) swapped in for \(\sigma\), and that swap is the entire reason the distribution changes. When you estimate the spread from the same eight numbers you used to estimate the center, you have introduced a second source of uncertainty that a normal curve does not account for. The t distribution accounts for it by carrying fatter tails, and the fewer degrees of freedom you have, the fatter they get. This is also why "assume the population is normal" appears in the problem statement — with only eight observations there is no central limit theorem to lean on, so the assumption has to be granted rather than earned.

Eight is small enough that this matters a great deal. At \(df = 7\) the t distribution needs a test statistic of 1.895 to clear the 5% mark, while the normal distribution is satisfied by 1.645 — so there is a whole band of results that the wrong curve calls significant and the right one does not. As the sample grows the two curves converge, and by a few hundred observations the distinction stops mattering in practice. With eight, it decides the answer. That is the whole reason this survey caps you at eight people rather than letting you poll the room.

Try It Now 8.6.4

Eight students report owning an average of 3.5 pairs of jeans with a sample standard deviation of 0.76. Test at \(\alpha = 0.05\) whether the average is higher than three. Then compute what you would have concluded had you incorrectly used the normal distribution.

Solution

Step 1 — state the hypotheses. "Higher than three" is one-sided to the right:

$$ H_0: \mu = 3 \qquad H_a: \mu > 3 $$

Step 2 — compute the standard error, using \(s\) because \(\sigma\) is unknown.

$$ \frac{s}{\sqrt{n}} = \frac{0.76}{\sqrt{8}} = \frac{0.76}{2.8284} = 0.2687 $$

Step 3 — compute the test statistic.

$$ t = \frac{3.5 - 3}{0.2687} = \frac{0.5}{0.2687} = 1.86 $$

Step 4 — find the p-value on the t distribution with \(df = 7\). Right-tailed:

$$ p\text{-value} = P(T_7 > 1.86) \approx 0.053 $$

Step 5 — decide. \(0.053 > 0.05\), so we do not reject \(H_0\).

Step 6 — repeat the reading against the wrong curve. Using the standard normal for the same test statistic:

$$ P(Z > 1.86) \approx 0.031 $$

which is below 0.05 and would have led to rejecting \(H_0\).

Answer: the correct test does not reject the null — at the 5% significance level there is not sufficient evidence to conclude that young adults own more than three pairs of jeans on average. The same eight numbers read against a normal distribution would have produced the opposite decision. Nothing about the arithmetic would have looked wrong; the only thing separating a published finding from a non-finding here was picking the right curve, which is why step 4 of every one of these surveys asks you to name the distribution before you compute anything.

Key Terms

convenience sample — a sample drawn from whoever is readily available, such as your own class; the arithmetic of a test is unaffected, but the population the conclusion describes is narrower than it appears.

self-reported data — values supplied by the respondents themselves rather than measured by the researcher, and therefore subject to rounding, estimation, and social pressure.

degrees of freedom — the parameter \(n - 1\) that selects which t distribution to use; smaller values produce fatter tails and larger p-values for the same test statistic.