Hypothesis Testing and Z-Tests for Population Means, STAT 211 Quiz 7 – Study Notes

Source: Quiz 7 Solutions, Principles of Statistics I, Texas A&M University

Tags: hypothesis testing, z-test, test statistic, p-value, significance level, null hypothesis, alternative hypothesis, reject H0, fail to reject, two-tailed test, one-tailed test, population mean, STAT 211


TL;DR

Hypothesis testing is a structured method for deciding whether sample data provides enough evidence to reject a claim about a population parameter. You set up null and alternative hypotheses, compute a test statistic (here, a z-score), find the p-value, and compare it to the significance level to draw a conclusion. The phrasing of your conclusion matters on exams.


Key Terms

Null hypothesis (H₀)

The default claim about the population parameter, typically a statement of "no difference" or "no effect." It always contains an equality (=, ≤, or ≥).

Alternative hypothesis (H₁ or Hₐ)

The research claim you are trying to find evidence for. It is the complement of H₀ and determines the direction of the test (one-tailed or two-tailed).

Test statistic

A standardised value calculated from the sample data that measures how far the sample result is from the null hypothesis value. For a z-test on a population mean: z* = (x̄ − μ₀) / (σ / √n).

p-value

The probability of observing a test statistic as extreme as (or more extreme than) the one calculated, assuming H₀ is true. A small p-value means the data is unlikely under H₀.

Significance level (α)

The threshold for rejecting H₀. Common values are 0.05 and 0.01. If the p-value ≤ α, you reject H₀.

Two-tailed test

Used when H₁ contains ≠. The p-value is calculated as 2 × P(Z > |z*|), because extreme values in either direction count as evidence against H₀.

One-tailed test (left or right)

Used when H₁ contains < (left-tailed) or > (right-tailed). The p-value is the area in one tail only.

Fail to reject H₀

The correct phrasing when the p-value > α. You never say "accept H₀," because failing to find evidence against it is not the same as proving it true.


Core Content

Setting Up the Hypotheses

  • Identify the population parameter in question (here, population mean μ).

  • The null hypothesis H₀ always states a specific value: H₀: μ = μ₀.

  • The alternative hypothesis H₁ is determined by the research question:

    • "Is it different from?" → H₁: μ ≠ μ₀ (two-tailed)

    • "Is it greater than?" → H₁: μ > μ₀ (right-tailed)

    • "Is it less than?" → H₁: μ < μ₀ (left-tailed)

  • The wording of the problem tells you the direction. Look for phrases like "more than," "has decreased," or simply "different from."

Computing the Z-Test Statistic for a Mean

The formula:

z* = (x̄ − μ₀) / (σ / √n)

Where:

  • x̄ = sample mean

  • μ₀ = hypothesised population mean (from H₀)

  • σ = population standard deviation (or sample standard deviation s when given)

  • n = sample size

When σ is unknown but n is small, technically a t-test applies. However, Quiz 7 uses z-test formulas throughout, so follow the formula sheet provided.

Finding the p-Value

  • Two-tailed (H₁: μ ≠ μ₀): p-value = 2 × P(Z > |z*|)

  • Right-tailed (H₁: μ > μ₀): p-value = P(Z > z*)

  • Left-tailed (H₁: μ < μ₀): p-value = P(Z < z*)

Use the standard normal (Z) table or calculator to find these probabilities.

Making a Decision

  • If p-value ≤ α → reject H₀

  • If p-value > α → fail to reject H₀

Writing the Conclusion (Exam-Critical)

The conclusion must be stated in context, using plain language. Two templates:

When you reject H₀: "We reject H₀ at the [α] significance level and conclude that [specific claim in context]."

When you fail to reject H₀: "We do not have sufficient evidence to conclude that [specific claim in context]."

Never say "we accept H₀." Never leave the conclusion in purely statistical language without context.


Formulas / Diagrams

Z-test statistic for a population mean:

z* = (x̄ − μ₀) / (σ / √n)

Z-test statistic for a population proportion:

z* = (p̂ − p₀) / √(p₀(1 − p₀) / n)

(Proportion test covered in the companion notes.)


Worked Examples: Z-Tests for Means

Example 1: Two-Tailed Test (Steel Beam Strength)

Setup: A sample of n = 6 steel beams has mean compressive strength x̄ = 58 psi, standard deviation s = 6 psi. Test whether the true mean differs from 50 psi at α = 0.05.

  • H₀: μ = 50

  • H₁: μ ≠ 50

Test statistic:

z* = (58 − 50) / (6 / √6) = 8 / 2.449 ≈ 3.27

p-value: Two-tailed, so p = 2 × P(Z > 3.27) = 2 × 0.011 = 0.022.

Decision: 0.022 < 0.05 → reject H₀.

Conclusion: We reject H₀ at the 0.05 significance level and conclude that the true mean compressive strength of the steel is different from 50 psi.

Example 2: Right-Tailed Test (Coffee Consumption)

Setup: The national average daily coffee consumption is μ₀ = 3 cups. A university surveys n = 49 students and finds x̄ = 3.7 cups with s = 1.4. Test whether their students drink more than the national average at α = 0.05.

  • H₀: μ = 3

  • H₁: μ > 3

Test statistic:

z* = (3.7 − 3) / (1.4 / √49) = 0.7 / 0.2 = 3.5

p-value: Right-tailed, so p = P(Z > 3.5) = 0.00023.

Decision: 0.00023 < 0.05 → reject H₀.

Conclusion: We reject H₀ at the 0.05 significance level and conclude that the university's students drink more coffee than the average daily consumption of Americans.

Example 3: Left-Tailed Test (Long-Distance Calls)

Setup: Evening long-distance calls from a city historically average μ₀ = 15.2 minutes. A sample of n = 35 calls has mean x̄ = 14.3 minutes, with σ = 5. Test at α = 0.05 whether the average call length has decreased.

  • H₀: μ = 15.2

  • H₁: μ < 15.2

Test statistic:

z* = (14.3 − 15.2) / (5 / √35) = −0.9 / 0.845 ≈ −1.065

p-value: Left-tailed, so p = P(Z < −1.065) = 0.14.

Decision: 0.14 > 0.05 → fail to reject H₀.

Conclusion: We do not have sufficient evidence to conclude that the average evening long-distance call has decreased.


Why It Matters / Exam Flags

⚠️ The direction of the alternative hypothesis (one-tailed vs. two-tailed) changes how you calculate the p-value. Getting this wrong doubles or halves your p-value.

⚠️ Never say "accept H₀." The correct phrasing is always "fail to reject H₀" or "we do not have sufficient evidence."

⚠️ The conclusion must reference the real-world context, not just the statistical result. Saying "reject H₀" alone is incomplete.

⚠️ For a two-tailed test, multiply the one-tail probability by 2. Forgetting this is one of the most common errors.

⚠️ Check whether the problem gives you σ (population standard deviation) or s (sample standard deviation). Quiz 7 uses the z-test formula regardless, but on later material the distinction matters.


Practice Q&A

Q: What are the two possible conclusions in hypothesis testing?

A: Reject H₀ (when p-value ≤ α) or fail to reject H₀ (when p-value > α). You never "accept" either hypothesis.

Q: You calculate z = 2.10 for a two-tailed test at α = 0.05. P(Z > 2.10) = 0.0179. What is the p-value, and what do you conclude?*

A: p-value = 2 × 0.0179 = 0.0358. Since 0.0358 < 0.05, reject H₀.

Q: A sample mean is higher than the hypothesised mean, and H₁ is right-tailed. Your z = 1.50 and α = 0.05. P(Z > 1.50) = 0.0668. Do you reject H₀?*

A: No. The p-value of 0.0668 is greater than 0.05, so you fail to reject H₀.

Q: Why do we say "fail to reject H₀" rather than "accept H₀"?

A: Because failing to find sufficient evidence against H₀ does not prove H₀ is true. A different sample or a larger sample might yield a different result.

Q: Write the z-test statistic formula for a population mean from memory.

A: z* = (x̄ − μ₀) / (σ / √n)


Related Terms / Search Tags

hypothesis test, z-test, z-score, test statistic, null hypothesis, alternative hypothesis, p-value, significance level, alpha, reject null, fail to reject, type I error, type II error, two-tailed, one-tailed, left-tailed, right-tailed, population mean, sample mean, standard deviation, STAT 211, Texas A&M, principles of statistics