Business Statistics • Hypothesis Testing

One & Two-Sample Tests — One- and Two-Sample Tests for Means and Proportions

Use sample data to make rigorous decisions about population means and proportions in business contexts.

A column chart with a percentage marker and business case.
Inside this lesson 10 sections 5 questions 10 figures

SECTION 1

Historical Context & Motivation

Modern businesses rely on data to guide decisions ranging from pricing strategies to quality control, yet the mathematical foundations for testing hypotheses about populations from sample data took centuries to develop. Before the early twentieth century, managers and scientists had no formal framework for determining whether an observed difference—say, between the average output of two production lines—was real or simply the result of random variation. The development of hypothesis testing gave decision-makers a principled way to move from data to conclusion, transforming fields as diverse as agriculture, medicine, and eventually corporate strategy.

1908 • Student's t-Distribution

William Sealy Gosset, publishing under the pseudonym 'Student' while working at Guinness Brewery, derived the t-distribution, enabling reliable inference from small samples—a breakthrough for industrial quality control.

1925 • Fisher's Framework

Ronald Fisher published Statistical Methods for Research Workers, formalizing the p-value and establishing the logic of significance testing used in every business statistics course today.

1933 • Neyman–Pearson Theory

Jerzy Neyman and Egon Pearson introduced the concepts of Type I and Type II errors, giving researchers a decision-theoretic framework that balances the risk of false positives against the risk of missed effects.

1940s–60s • Industrial & Business Adoption

Statistical hypothesis testing became central to quality management (W. Edwards Deming's work in Japan), market research, and clinical trials, embedding one- and two-sample tests into the standard business analytics toolkit.

The core question these tests address is deceptively simple: Is what I observe in my sample evidence of a real effect in the population, or could it have arisen by chance? Whether you are evaluating whether a new training program actually raises employee productivity, or whether two regions differ in customer satisfaction rates, one- and two-sample tests provide the formal machinery for answering these questions with controlled risk.

SECTION 2

Core Principles & Definitions

Before diving into formulas, it is essential to internalize the logical architecture that underlies every hypothesis test. Each test follows the same five-step procedure regardless of whether you are examining a mean, a proportion, one sample, or two. Understanding these foundational principles ensures that you can adapt to any variant of the test rather than merely memorizing recipes.

1

Null & Alternative Hypotheses

The null hypothesis (H₀) states that no effect or difference exists. The alternative hypothesis (H₁) asserts the effect you are investigating. H₀ is assumed true until evidence compels its rejection.
2

Significance Level (α)

The significance level (commonly α = 0.05) is the maximum probability of a Type I error—rejecting a true null hypothesis. It is set before data collection and reflects your tolerance for false alarms.
3

Test Statistic

A test statistic standardizes the distance between the sample result and the null-hypothesized value, expressed in units of standard error. Common forms include the z-statistic and t-statistic.
4

P-Value

The p-value measures the probability of obtaining a test statistic at least as extreme as the one observed, assuming H₀ is true. A small p-value (≤ α) provides evidence against H₀.
5

Decision Rule

Compare the p-value to α (or compare the test statistic to the critical value). If p ≤ α, reject H₀; otherwise, fail to reject H₀. 'Fail to reject' is not the same as 'accept.'
✦

KEY TAKEAWAY

Think of hypothesis testing like a courtroom trial. The null hypothesis is the presumption of innocence—no effect exists. The sample data acts as the evidence, and α is the standard of proof. Just as a court may acquit a guilty defendant (Type II error) or convict an innocent one (Type I error), a hypothesis test can make analogous mistakes. The p-value quantifies how surprising the evidence is under the 'innocent' assumption; if it is small enough, the jury (the analyst) rejects H₀.

SECTION 3

Visual Framework — Test Selection Flowchart

Choosing the correct test is one of the most common sources of confusion for business students. The decision hinges on three questions: (1) Are you testing a mean or a proportion? (2) Do you have one sample or two? (3) Is the population standard deviation known, and is the sample large? The following flowchart encodes these decision rules so that you can rapidly identify the appropriate test statistic for any scenario.

Hypothesis Test Selection FlowchartWhat parameter?Mean (μ)Proportion (p)How many samples?How many samples?OneTwoOneTwoσ known or n ≥ 30?σ known or n ≥ 30?np₀ ≥ 5, n(1−p₀) ≥ 5?Pool or separate?YesNoYesNoz-testt-test2-sam z2-sam t1-prop z2-prop zLegendz-test (σ known / large n)t-test (σ unknown, small n)Proportion tests (always z)
Start at the top and follow the branches. The left half covers tests for means while the right half covers proportions. Within each branch, the number of samples and knowledge of σ determine whether you use a z- or t-statistic.

Notice that proportion tests always use the z-statistic because the standard error of a proportion is derived directly from the hypothesized value of p, so the population 'standard deviation' is effectively known. For means, the distinction between z and t hinges on whether the population standard deviation σ is known; in practice, σ is rarely known, so the t-test is far more common in business applications. When both sample sizes are large (typically n ≥ 30), the t-distribution closely approximates the standard normal, and the two tests yield nearly identical results.

SECTION 4

Mathematical Framework

Each hypothesis test reduces to the same fundamental ratio: the observed departure from the null-hypothesized value divided by the standard error of the estimator. The formulas below codify this logic for the four most common scenarios you will encounter in business statistics.

One-Sample Tests for Means

ONE-SAMPLE Z-TEST (σ KNOWN)

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

x̄ = sample mean, μ₀ = hypothesized population mean, σ = known population standard deviation, n = sample size. Use when σ is known or n is very large.

ONE-SAMPLE T-TEST (σ UNKNOWN)

t=(xˉ−μ0)/(s/√n),df=n−1t = (x̄ − μ₀) / (s / √n), df = n − 1

s = sample standard deviation, df = degrees of freedom. The t-distribution has heavier tails than the normal, reflecting the extra uncertainty from estimating σ with s. This is the default test for means in most business contexts.

Two-Sample Tests for Means

TWO-SAMPLE T-TEST (INDEPENDENT SAMPLES, POOLED VARIANCE)

t=(xˉ1−xˉ2)/√[sp2(1/n1+1/n2)],wheresp2=[(n1−1)s12+(n2−1)s22]/(n1+n2−2)t = (x̄₁ − x̄₂) / √[s²_p (1/n₁ + 1/n₂)], where s²_p = [(n₁−1)s₁² + (n₂−1)s₂²] / (n₁ + n₂ − 2)

s²_p = pooled variance estimate. The pooled formula assumes equal population variances (σ₁² = σ₂²). Welch's t-test is preferred when this assumption is questionable; it adjusts the degrees of freedom downward using the Satterthwaite approximation.

Tests for Proportions

ONE-SAMPLE Z-TEST FOR A PROPORTION

z=(p^−p0)/√[p0(1−p0)/n]z = (p̂ − p₀) / √[p₀(1 − p₀) / n]

p̂ = sample proportion, p₀ = hypothesized proportion. Valid when np₀ ≥ 5 and n(1 − p₀) ≥ 5, ensuring the sampling distribution of p̂ is approximately normal.

TWO-SAMPLE Z-TEST FOR PROPORTIONS

z=(p^1−p^2)/√[p^c(1−p^c)(1/n1+1/n2)],wherep^c=(x1+x2)/(n1+n2)z = (p̂₁ − p̂₂) / √[p̂_c(1 − p̂_c)(1/n₁ + 1/n₂)], where p̂_c = (x₁ + x₂) / (n₁ + n₂)

p̂_c = pooled sample proportion, computed by combining the successes (x₁, x₂) from both samples. Under H₀: p₁ = p₂, pooling provides the best estimate of the common proportion.

ℹ

One-Tailed vs. Two-Tailed Tests

A two-tailed test (H₁: μ ≠ μ₀) splits α equally between both tails. A one-tailed test (H₁: μ > μ₀ or H₁: μ < μ₀) places all of α in one tail, giving greater power to detect a difference in the hypothesized direction but no ability to detect a difference in the opposite direction. In business, one-tailed tests are appropriate when only one direction is relevant—for example, testing whether a new process reduces defect rates.

SECTION 5

Detailed Classification & Assumptions

Selecting the right test requires not only matching the parameter and sample structure but also verifying assumptions. The following table consolidates the six tests covered in this lesson with their key assumptions and business use cases. Violating assumptions can inflate error rates, so checking them before running the test is a non-negotiable step in rigorous analysis.

TestParameterSamplesKey AssumptionsBusiness Example
One-sample z (mean)μ1σ known, normal population or n ≥ 30Is mean fill volume of bottles = 500 mL?
One-sample t (mean)μ1σ unknown, normal population or n ≥ 30Does avg. call-center wait time differ from 3 min?
Two-sample t (means)μ₁ − μ₂2Independent samples, normal or large n, equal variances (pooled) or Welch'sDo two warehouses differ in avg. shipping time?
Paired tμ_d1 (paired)Paired observations, differences approximately normalDoes training improve same employees' scores?
One-sample z (proportion)p1np₀ ≥ 5, n(1 − p₀) ≥ 5Is the defect rate > 2%?
Two-sample z (proportions)p₁ − p₂2Independent samples, both n₁p̂_c and n₂p̂_c ≥ 5Do conversion rates differ between two ad campaigns?

Summary of one- and two-sample tests for means and proportions

Rejection Regions: Two-Tailed vs. One-Tailed (α = 0.05)Two-Tailed Test: H₁: μ ≠ μ₀α/2 = 0.025α/2 = 0.025−1.96+1.96Fail to reject H₀One-Tailed Test (Right): H₁: μ > μ₀α = 0.05+1.645Fail to reject H₀
The shaded red regions represent the rejection regions. In the two-tailed test (top), α is split equally into both tails at ±1.96. In the one-tailed test (bottom), all of α is concentrated in the right tail at +1.645, providing more power to detect an increase but none to detect a decrease.

SECTION 6

Worked Examples

Example 1: One-Sample t-Test for a Mean

A regional bank claims that the average time to process a loan application is 10 business days. A business analyst suspects the true average is higher. She randomly samples 25 recent applications and finds a sample mean of 11.4 days with a sample standard deviation of 3.2 days. Test at α = 0.05.

One-Sample t-Test — Loan Processing Time

  1. 1

    Step 1 — State the Hypotheses

    H₀: μ = 10 (mean processing time is 10 days). H₁: μ > 10 (mean processing time exceeds 10 days). This is a right-tailed test because the analyst's concern is that processing takes too long.
  2. 2

    Step 2 — Choose the Test & Check Assumptions

    σ is unknown and n = 25 < 30, so we use the one-sample t-test with df = 25 − 1 = 24. We assume the population of processing times is approximately normal (reasonable for business process times). The critical value from the t-table at α = 0.05 (one-tailed) with 24 df is t* = 1.711.
  3. 3

    Step 3 — Compute the Test Statistic

    t = (x̄ − μ₀) / (s / √n) = (11.4 − 10) / (3.2 / √25) = 1.4 / 0.64 = 2.1875
    t = 2.1875
  4. 4

    Step 4 — Determine the p-Value

    Using a t-distribution with 24 degrees of freedom, P(T > 2.1875) ≈ 0.019. Since we can also compare: t = 2.1875 > t* = 1.711.
    p-value ≈ 0.019
  5. 5

    Step 5 — Make the Decision

    Because p = 0.019 < α = 0.05, we reject H₀. There is statistically significant evidence at the 5% level that the mean loan processing time exceeds 10 business days. The bank should investigate process bottlenecks.
    Reject H₀ — evidence that μ > 10 days

Example 2: Two-Sample z-Test for Proportions

An e-commerce company runs an A/B test comparing two checkout page designs. Design A (n₁ = 500) converts 64 visitors; Design B (n₂ = 500) converts 80 visitors. Test at α = 0.05 whether the conversion rates differ.

Two-Sample z-Test — A/B Conversion Rates

  1. 1

    Step 1 — State the Hypotheses

    H₀: p₁ = p₂ (no difference in conversion rates). H₁: p₁ ≠ p₂ (rates differ). Two-tailed test.
  2. 2

    Step 2 — Compute the Pooled Proportion

    p̂₁ = 64/500 = 0.128, p̂₂ = 80/500 = 0.160. Pooled proportion: p̂_c = (64 + 80) / (500 + 500) = 144/1000 = 0.144. Check: n₁p̂_c = 72 ≥ 5 ✓, n₂p̂_c = 72 ≥ 5 ✓.
    p̂_c = 0.144
  3. 3

    Step 3 — Compute the Standard Error & Test Statistic

    SE = √[0.144 × 0.856 × (1/500 + 1/500)] = √[0.123264 × 0.004] = √0.000493 = 0.02220. z = (0.128 − 0.160) / 0.02220 = −0.032 / 0.02220 = −1.441
    z = −1.441
  4. 4

    Step 4 — Determine the p-Value

    For a two-tailed test, p-value = 2 × P(Z < −1.441) = 2 × 0.0748 = 0.1496. The critical values are ±1.96.
    p-value ≈ 0.150
  5. 5

    Step 5 — Decision & Business Interpretation

    Because p = 0.150 > α = 0.05, we fail to reject H₀. At the 5% significance level, there is insufficient evidence that the two checkout designs have different conversion rates. The company should consider running the test longer to increase sample size and statistical power before concluding the designs perform equally.
    Fail to reject H₀ — no significant difference detected

SECTION 7

Strengths, Limitations & Common Pitfalls

StrengthsLimitations
Provides a rigorous, reproducible decision framework—different analysts using the same data and α will reach the same conclusion.Results are binary (reject/fail to reject) and can obscure practical significance; a statistically significant result may be too small to matter in a business context.
Quantifies the probability of observed results under H₀, enabling controlled risk management through pre-set α levels.Sensitive to sample size: very large samples can make trivially small effects statistically significant, while small samples may miss meaningful effects (low power).
Versatile: the same logical framework applies to means, proportions, variances, and beyond, making it a transferable skill.Assumes random sampling; non-random or biased samples undermine validity regardless of the test chosen.
Widely understood across disciplines—finance, marketing, operations—facilitating cross-functional communication.Common misinterpretation: the p-value is NOT the probability that H₀ is true. It is the probability of observing data this extreme IF H₀ were true.

Strengths and limitations of frequentist hypothesis testing

⚠️

PRACTICAL VS. STATISTICAL SIGNIFICANCE

Imagine you are a marketing director and your A/B test shows that a new landing page increases conversion by 0.02 percentage points with p = 0.03. Statistically significant? Yes. Worth the $50,000 redesign? Almost certainly not. Always pair hypothesis test results with a confidence interval and an effect size estimate (such as Cohen's d for means) to assess whether the detected difference is large enough to justify action.

SECTION 8

Connections to Advanced Methods

One- and two-sample tests are the gateway to a broader ecosystem of inferential methods. As business problems grow in complexity—multiple treatment groups, confounding variables, time-series data—the same core logic extends into more sophisticated frameworks. Understanding where the simple tests fit helps you recognize when to upgrade your toolkit.

This LessonAdvanced ExtensionWhen You Need It
Two-sample t-testOne-way ANOVA (F-test)Comparing means across 3+ groups (e.g., performance of 4 regional offices)
Two-proportion z-testChi-square test of independenceTesting association between two categorical variables with multiple levels
One-sample t-testRegression t-tests on coefficientsTesting whether a predictor has a significant linear effect on a response
Frequentist p-valuesBayesian hypothesis testingIncorporating prior beliefs; computing the probability H₀ is true rather than just the p-value
Fixed α, fixed nPower analysis & sample size planningDetermining how large n must be to detect a specified effect with desired power (1 − β)

From one- and two-sample tests to advanced inference

In particular, mastering the structure of a two-sample t-test prepares you for ANOVA, which is simply a generalization to k groups. The F-statistic in ANOVA reduces to t² when k = 2, confirming that these methods are part of a single coherent framework. Similarly, regression analysis uses t-tests on individual slope coefficients, and each such test is conceptually identical to the one-sample t-test you have already learned—the only difference is that the 'sample mean' becomes a regression coefficient and the 'hypothesized value' is typically zero.

SECTION 9

Practice Problems

Question 1: CONCEPTUAL

Explain why 'failing to reject H₀' is not the same as 'accepting H₀.' Use a business example to illustrate your reasoning.
Show answer
Failing to reject H₀ means the sample did not provide sufficient evidence against it—it does not prove H₀ is true. Consider a company testing whether a new training program improves sales (H₁: μ_after > μ_before). If p = 0.12, we fail to reject H₀ at α = 0.05. This could mean the program truly has no effect, or it could mean our sample was too small to detect a real but modest improvement (a Type II error). Saying we 'accept H₀' would incorrectly imply certainty that the program is ineffective, potentially causing the firm to abandon a beneficial initiative prematurely.

Question 2: BASIC CALCULATION

A fast-food chain claims that the average drive-through wait time is 4.0 minutes. A quality team samples 36 cars and records x̄ = 4.5 minutes with s = 1.8 minutes. Conduct a two-tailed one-sample t-test at α = 0.05. State the hypotheses, compute t, and state your conclusion.
Show answer
H₀: μ = 4.0, H₁: μ ≠ 4.0. The test statistic is t = (4.5 − 4.0) / (1.8 / √36) = 0.5 / 0.30 = 1.667 with df = 35. For a two-tailed test at α = 0.05 and 35 df, the critical values are approximately ±2.030. Since |1.667| < 2.030, we fail to reject H₀. Alternatively, the p-value ≈ 0.104 > 0.05. There is insufficient evidence at the 5% level to conclude that the mean wait time differs from 4.0 minutes, though the sample mean is directionally higher and the chain might want a larger sample for a more definitive answer.

Question 3: INTERMEDIATE

A retailer tests whether the proportion of customers using mobile payment exceeds 0.30. In a random sample of 200 transactions, 72 used mobile payment. (a) State the hypotheses. (b) Verify the normality condition. (c) Compute the z-statistic and p-value. (d) State the conclusion at α = 0.05.
Show answer
(a) H₀: p = 0.30, H₁: p > 0.30 (right-tailed). (b) np₀ = 200 × 0.30 = 60 ≥ 5 and n(1 − p₀) = 200 × 0.70 = 140 ≥ 5, so the normal approximation is valid. (c) p̂ = 72/200 = 0.36. SE = √[0.30 × 0.70 / 200] = √0.00105 = 0.03240. z = (0.36 − 0.30) / 0.03240 = 0.06 / 0.03240 = 1.852. P(Z > 1.852) ≈ 0.032. (d) Since p = 0.032 < 0.05, we reject H₀. There is significant evidence that mobile payment usage exceeds 30%. The retailer should consider investing further in mobile payment infrastructure.

Question 4: APPLIED

A pharmaceutical distributor wants to know whether average order fulfillment times differ between its East Coast and West Coast warehouses. East Coast: n₁ = 40, x̄₁ = 26.3 hours, s₁ = 5.1 hours. West Coast: n₂ = 45, x̄₂ = 24.0 hours, s₂ = 4.8 hours. Using a two-sample t-test with pooled variance at α = 0.05, test whether the means differ. Interpret the result for management.
Show answer
H₀: μ₁ = μ₂, H₁: μ₁ ≠ μ₂ (two-tailed). Pooled variance: s²_p = [(39)(5.1²) + (44)(4.8²)] / (40 + 45 − 2) = [(39)(26.01) + (44)(23.04)] / 83 = [1014.39 + 1013.76] / 83 = 2028.15 / 83 = 24.436. sps_p = 4.943. SE = 4.943 × √(1/40 + 1/45) = 4.943 × √(0.0472) = 4.943 × 0.2173 = 1.074. t = (26.3 − 24.0) / 1.074 = 2.3 / 1.074 = 2.142, df = 83. The critical value for a two-tailed test at α = 0.05 with df = 83 is approximately ±1.989. Since 2.142 > 1.989, we reject H₀ (p ≈ 0.035). Management should investigate operational differences between the two warehouses; the East Coast facility averages about 2.3 hours longer, which may signal staffing or logistics inefficiencies.

Question 5: CRITICAL THINKING

A marketing analyst runs 20 independent two-sample proportion tests (each at α = 0.05) to compare click-through rates across 20 different customer segments. She finds that 3 of the 20 tests yield p < 0.05. (a) How many significant results would you expect by chance alone if all null hypotheses are true? (b) Should she report all 3 results as 'real' findings? (c) Suggest a correction method and explain its rationale.
Show answer
(a) If all 20 null hypotheses are true, the expected number of false rejections is 20 × 0.05 = 1.0, though observing 2 or even 3 is not unusual due to random variation. (b) No—reporting all 3 as genuine effects without adjustment is likely to include false positives. This is the multiple comparisons problem: running many tests inflates the family-wise error rate well beyond 5%. (c) The Bonferroni correction divides α by the number of tests, requiring p < 0.05/20 = 0.0025 for each individual test. This is conservative but simple. The Benjamini-Hochberg procedure controls the false discovery rate (FDR) instead of the family-wise error rate and is less conservative—often more appropriate in exploratory business analytics where some false discoveries are tolerable. The key principle is that the more tests you run simultaneously, the stricter the significance threshold must be to maintain overall reliability.

SUMMARY

Lesson Summary

Summary

This lesson established the complete framework for one- and two-sample hypothesis tests applied to means and proportions. Every test follows the same five-step logic: state H₀ and H₁, set the significance level α, compute the test statistic (z or t), find the p-value, and make a decision—reject or fail to reject H₀. For means, choose the z-test when σ is known and the t-test when σ is unknown. For proportions, both one- and two-sample tests use the z-statistic because the standard error is derived from the hypothesized (or pooled) proportion.

Beyond statistical significance, always assess practical significance by pairing your test with a confidence interval and an effect size measure. Remember the assumptions—random sampling, independence, and the appropriate normality or sample-size conditions—and verify them before interpreting results. These foundational tests generalize naturally to ANOVA, chi-square tests, and regression analysis, making mastery of the one- and two-sample case the single most important step in your statistical inference journey.

Varsity Tutors • Business Statistics • One & Two-Sample Tests for Means and Proportions