Hypothesis Testing: The One-, and Two-Sample Case

Hypothesis Testing: The One-, and Two-Sample Case

Introduction to the t-test

The t-test is a statistical test based on the Student’s t-distribution. It is primarily used to compare:

  • A group mean against a “test statistic”.

  • Means between two different groups.

  • Means within one group with two measurements.

Z-test vs. t-test
  • Use a z-test when the population standard deviation is known.

  • There exists one z-distribution; conversely, there are many t-distributions depending on degrees of freedom.

What is the t-test?

The t-test is characterized by a strict recipe of equations:

  • One-sample t-test

  • Independent two-sample t-test

  • Paired sample t-test

Normal Distribution and Sample Size

The impact of sample size on variability:

  • Variability decreases with larger sample sizes.

  • The t-distribution curves more sharply compared to the normal distribution as sample sizes vary.

  • The t-distribution's shape depends fundamentally on the sample size (denominator involves sample size in variance calculations).

Detailed Comparison: t-test vs. z-test

One-sample z-test
  • Purpose: To determine if a sample mean is representative of the population.

  • Assumes population standard deviation is known.
    Formula: z=Xμσ/Nz = \frac{X - \mu}{\sigma / \sqrt{N}}

One-sample t-test
  • Purpose: Similar to the z-test, but used when the population standard deviation is unknown.

  • Formula: t=Xμs/Nt = \frac{X - \mu}{s / \sqrt{N}} Where:

    • XX = sample mean

    • μ\mu = population mean

    • ss = sample standard deviation

    • NN = sample size

Steps of Hypothesis Testing

  1. State the null hypothesis (H0) and alternative hypothesis (H1).

  2. Choose the significance level (α) and determine if the test is one-tailed or two-tailed.

  3. State the rejection and acceptance rule based on critical values.

  4. Compute the appropriate t or z statistic based on sample data.

  5. Make a decision by applying the rejection/acceptance rule.

  6. Write a conclusion contextualized to the study.

Application Example: Comparing LSAT Scores

Scenario Overview

Do Ontario university graduates have an average LSAT score that is higher than all Canadian LSAT test takers?

  • Population: Entire Canadian population of LSAT test takers

  • Sample: LSAT results of n=100 Ontario students

Formulating Hypotheses
  • Null Hypothesis (H0): The average LSAT score of Ontario students is equal to the Canadian average.
    H0:μ=153H0: \mu = 153

  • Alternative Hypothesis (H1): The average LSAT score of Ontario students is higher than the Canadian average.
    H1: \mu > 153

  • Set significance level (α) as 0.05 for two-tailed tests.

Performing the z-test
  • Rejection/accept rule:
    Reject H0 if |zcalculated| > critical z-value (0.05, two-tailed). Accept H0 if |zcalculated| < critical z-value (0.05, two-tailed).

  • Given the calculated z-value results, e.g., if zcalc=3.33z_{calc} = 3.33, compare against the critical value.

  • If |z_{calc}| > 1.96 , reject the null hypothesis.

Conclusion of LSAT Scores

The conclusion of the test shows that Ontario graduates score significantly (p<0.05) higher than the average e.g., confirming that:

  • They have a 95% chance of scoring greater than the Canadian average.