Discussion 5.1: Z vs. T Distributions, Confidence Intervals, and One-Sample Hypothesis Testing

Overview of Statistical Inference for Population Means

  • Statistical inference uses sample data to draw conclusions about unknown population parameters.
  • Core mechanisms covered in this module:
    • Distinguishing between the standard normal distribution (ZZ distribution) and Student's tt-distribution (TT distribution).
    • Constructing and interpreting confidence intervals for both known population parameters and unknown parameters estimated via sample statistics.
    • Conducting and interpreting one-sample hypothesis tests for single population means.

Properties of the Z Distribution and T Distribution

  • The ZZ Distribution:
    • Represents the standard normal distribution, possessing a mean of μ=0\mu = 0 and a standard deviation of σ=1\sigma = 1.
    • Role of the Central Limit Theorem (CLT): The threshold of sample size n≥30n \ge 30 relies on the Central Limit Theorem, which establishes that the sampling distribution of the sample mean approaches normality as sample size increases, regardless of the underlying population distribution's shape.
    • Criteria for application:
    • Used for confidence intervals and hypothesis tests regarding means when the population is known to follow a normal distribution.
    • Used when the sample size is large (n≥30n \ge 30) AND the population variance (σ2\sigma^2) or population standard deviation (σ\sigma) is known.
  • The TT Distribution:
    • Structurally represents a "looser" version of the standard normal distribution, characterized by a lower peak at the center and heavier, fatter tails.
    • The spread and tail thickness depend on degrees of freedom (dfdf), defined as df=n−1df = n - 1.
    • As sample size nn (and consequently degrees of freedom) increases, the TT distribution converges toward the standard normal ZZ distribution.
    • Criteria for application:
    • Used for confidence intervals and hypothesis tests about means when the sample size is small (n<30n < 30).
    • Used whenever the population variance (σ2\sigma^2) or population standard deviation (σ\sigma) is unknown, regardless of how large the sample size is.
  • Comparison of critical cutoff values at a 95%95\% confidence level:
    • For the standard normal ZZ distribution, the critical values encompassing the central 95%95\% of area are −1.96-1.96 and 1.961.96.
    • For a TT distribution with sample size n=12n = 12 (df=11df = 11), the critical values expand outward to −2.201-2.201 and 2.2012.201 to capture the central 95%95\%, reflecting increased uncertainty due to estimating standard deviation from a sample.

Comparison of standard normal Z distribution and t-distribution with n=12

Decision Criteria: Selecting Between Z and T Distributions

  • Step 1: Assess knowledge of the population dispersion:
    • Ask: "Do you know the POPULATION standard deviation (σ\sigma) or variance (σ2\sigma^2)?"
  • Step 2: Follow the branch based on the standard deviation:
    • If NO (population standard deviation/variance is unknown):
    • Use the TT distribution immediately, regardless of sample size.
    • If YES (population standard deviation/variance is known):
    • Ask: "Is sample size n≥30n \ge 30?"
    • If YES (n≥30n \ge 30): Use the ZZ distribution.
    • If NO (n<30n < 30): Use the TT distribution.

Decision flowchart for choosing between Z distribution and T distribution

Fundamentals of Confidence Intervals

  • Definition: A confidence interval estimates an unknown population parameter based on an observed sample statistic (also referred to as a point estimator).
  • Structure of the interval:
    • Adds and subtracts a margin of error around the point estimate (such as the sample mean xˉ\bar{x} or population mean μ\mu).
    • The margin of error accounts for sampling variability and quantifies the reality that a single sample estimate will rarely equal the true population parameter exactly.

Confidence Intervals for Known Population Parameters (Z Distribution)

  • Standard Intervals for Known Population Means and Standard Deviations:
    • Applied when a population is normally distributed, and both the population mean (μ\mu) and population standard deviation (σ\sigma) are known.
    • Benchmark confidence interval calculations:
    • 90%90\% Confidence Interval: μ±1.65 σ\mu \pm 1.65\,\sigma
    • 95%95\% Confidence Interval: μ±1.96 σ\mu \pm 1.96\,\sigma (certain practical sources use ±2 σ\pm 2\,\sigma as a common approximation shortcut)
    • 99%99\% Confidence Interval: μ±2.58 σ\mu \pm 2.58\,\sigma
  • Empirical Rule (Normal Distribution Percentages):
    • Within μ±1 σ\mu \pm 1\,\sigma lies approximately 68.27%68.27\% of the distribution.
    • Within μ±2 σ\mu \pm 2\,\sigma lies approximately 95.45%95.45\% of the distribution.
    • Within μ±3 σ\mu \pm 3\,\sigma lies approximately 99.73%99.73\% of the distribution.

Standard normal distribution curve displaying percentages within standard deviation intervals

  • Exact or Custom Intervals Formula:
    • To compute an exact answer or construct an interval for confidence levels other than 90%90\%, 95%95\%, or 99%99\%:
    • General formula:     μ±Zα/2 σ\mu \pm Z_{\alpha/2}\,\sigma
    • Margin of error expression:     Margin of Error=Zα/2 σ\text{Margin of Error} = Z_{\alpha/2}\,\sigma
    • Variable definitions:
    • μ\mu = population mean
    • σ\sigma = population standard deviation
    • Zα/2Z_{\alpha/2} = critical value derived from the standard normal (ZZ) distribution
  • Spreadsheet Implementation:
    • Determine Zα/2Z_{\alpha/2} using the Excel function NORM.S.INV.
    • Input formula for probability: (1 - confidence_level) / 2.
    • Multiply the resulting critical value by σ\sigma to determine the margin of error.
    • Add and subtract this margin of error from μ\mu.
  • Applied Scenario:
    • Assume SAT scores follow a normal distribution with a known population mean μ=1100\mu = 1100 and a known population standard deviation σ=200\sigma = 200.
    • Objective: Construct a 95%95\% confidence interval around the population mean.
    • Calculation:
    • Critical ZZ value for 95%95\% is Z0.025=1.96Z_{0.025} = 1.96.
    • Margin of Error=1.96×200=392\text{Margin of Error} = 1.96 \times 200 = 392.
    • Lower limit: 1100−392=7081100 - 392 = 708.
    • Upper limit: 1100+392=14921100 + 392 = 1492.
    • Resulting interval: [708,1492][708, 1492].

Confidence Intervals for Sample Means Using the Z Distribution

  • Application Criteria:
    • Sample size is large (n≥30n \ge 30).
    • Population standard deviation (σ\sigma) is known.
    • Population mean (μ\mu) is unknown and estimated by the sample mean (xˉ\bar{x}).
  • Mathematical Formulation:   xˉ±Zα/2 σn\bar{x} \pm Z_{\alpha/2}\,\frac{\sigma}{\sqrt{n}}
  • Margin of Error Component:   Margin of Error=Zα/2 σn\text{Margin of Error} = Z_{\alpha/2}\,\frac{\sigma}{\sqrt{n}}
  • Component Definitions:
    • xˉ\bar{x} = sample mean
    • σ\sigma = population standard deviation
    • nn = sample size
    • Zα/2Z_{\alpha/2} = critical cutoff value from the ZZ distribution
    • σn\frac{\sigma}{\sqrt{n}} = standard error of the mean
  • Software Methods:
    • Method 1: Use NORM.S.INV to derive the critical ZZ value (or utilize hard-coded values: 1.651.65 for 90%90\%, 1.961.96 for 95%95\%, 2.582.58 for 99%99\%), and multiply by σn\frac{\sigma}{\sqrt{n}} to calculate the margin of error.
    • Method 2: Calculate the margin of error directly via the Excel function CONFIDENCE.NORM(alpha, standard_dev, size).
  • Applied Scenario:
    • A dataset named TestScores contains a sample of n=70n = 70 students' performance on a standardized test.
    • Nationwide population standard deviation is known to be σ=10\sigma = 10.
    • Task: Construct a 98%98\% confidence interval around the sample mean.
    • Setup:
    • α=1−0.98=0.02\alpha = 1 - 0.98 = 0.02
    • Critical value: Zα/2=Z0.01=NORM.S.INV(0.01)≈2.326Z_{\alpha/2} = Z_{0.01} = \text{NORM.S.INV}(0.01) \approx 2.326
    • Standard error: σn=1070≈1.1952\frac{\sigma}{\sqrt{n}} = \frac{10}{\sqrt{70}} \approx 1.1952
    • Margin of error: 2.326×1.1952≈2.782.326 \times 1.1952 \approx 2.78
    • Interval: xˉ±2.78\bar{x} \pm 2.78

Confidence Intervals for Sample Means Using the T Distribution

  • Application Criteria:
    • Sample size is small (n<30n < 30), OR
    • Population standard deviation (σ\sigma) is unknown (sample standard deviation ss is used as the point estimate), regardless of sample size.
  • Mathematical Formulation:   xˉ±tα/2 sn\bar{x} \pm t_{\alpha/2}\,\frac{s}{\sqrt{n}}
  • Degrees of Freedom:   df=n−1df = n - 1
  • Margin of Error Component:   Margin of Error=tα/2 sn\text{Margin of Error} = t_{\alpha/2}\,\frac{s}{\sqrt{n}}
  • Component Definitions:
    • xˉ\bar{x} = sample mean
    • ss = sample standard deviation
    • nn = sample size
    • tα/2t_{\alpha/2} = critical value from the TT distribution with df=n−1df = n - 1
    • dfdf = degrees of freedom
    • sn\frac{s}{\sqrt{n}} = estimated standard error of the mean
  • Software Methods:
    • Method 1: Compute the critical tt value using T.INV.2T(probability, deg_freedom) where probability equals α\alpha, and then compute the margin of error by multiplying by sn\frac{s}{\sqrt{n}}.
    • Method 2: Compute margin of error directly using CONFIDENCE.T(alpha, standard_dev, size) where standard_dev is the sample standard deviation ss.
    • Method 3: Use the Descriptive Statistics tool located in the Excel Analysis Toolpak with the Confidence Level for Mean option selected (requires raw data).
  • Applied Scenario:
    • A dataset named TestScores contains a sample of n=70n = 70 students' performance on a standardized test.
    • Population standard deviation is unknown.
    • Task: Construct a 92%92\% confidence interval around the sample mean.
    • Setup:
    • α=1−0.92=0.08\alpha = 1 - 0.92 = 0.08
    • df=70−1=69df = 70 - 1 = 69
    • Critical value: t0.04,69=T.INV.2T(0.08,69)t_{0.04, 69} = \text{T.INV.2T}(0.08, 69)
    • Margin of error: CONFIDENCE.T(0.08,s,70)\text{CONFIDENCE.T}(0.08, s, 70)
    • Interval: xˉ±t0.04,69 s70\bar{x} \pm t_{0.04, 69}\,\frac{s}{\sqrt{70}}

One-Sample Hypothesis Testing Framework

  • Definition: A one-sample hypothesis test evaluates whether an assumption, claim, or hypothesized parameter about a single population mean is plausible based on empirical sample data.
  • Selection of Test Statistic:
    • One-Sample ZZ Test: Employed when sample size is large (n≥30n \ge 30) AND the population standard deviation (σ\sigma) is known.
    • One-Sample TT Test: Employed when sample size is small (n<30n < 30) OR the population standard deviation (σ\sigma) is unknown.

One-Sample Z Tests

  • Application Criteria:
    • Sample size is large (n≥30n \ge 30) AND population standard deviation (σ\sigma) is known.
  • Test Statistic Formula:   Z=xˉ−μ−dσnZ = \frac{\bar{x} - \mu - d}{\frac{\sigma}{\sqrt{n}}}
  • Component Definitions:
    • xˉ\bar{x} = sample mean
    • μ\mu = hypothetical population mean specified under the null hypothesis
    • dd = hypothesized difference (typically d=0d = 0 in standard tests)
    • σ\sigma = population standard deviation
    • nn = sample size
    • σn\frac{\sigma}{\sqrt{n}} = standard error of the mean
  • Software Methods:
    • Method 1: Calculate the ZZ test statistic manually and use NORM.S.DIST(z, TRUE) to determine the cumulative lower-tail p-value.
    • Method 2: Use the Excel function Z.TEST(array, x, [sigma]) to compute the p-value directly from raw sample data (returns the one-tailed upper-tail p-value).
  • Applied Scenario:
    • Problem: Test designers intended for test takers nationwide to achieve an average score of 7575. Did they achieve this goal or not?
    • Hypotheses:
    • Null Hypothesis (H0H_0): The average score is 7575H0:μ=75H_0: \mu = 75
    • Alternative Hypothesis (HAH_A): The average score is not 7575HA:μ≠75H_A: \mu \neq 75
    • Testing Parameters:
    • Sample size: n=70n = 70 from TestScores dataset
    • Population standard deviation: σ=10\sigma = 10
    • Significance level: α=0.05\alpha = 0.05
    • Test type: Two-tailed one-sample ZZ test

One-Sample T Tests

  • Application Criteria:
    • Sample size is small (n<30n < 30) OR population standard deviation (σ\sigma) is unknown.
  • Test Statistic Formula:   t=xˉ−μ−dsnt = \frac{\bar{x} - \mu - d}{\frac{s}{\sqrt{n}}}
  • Degrees of Freedom:   df=n−1df = n - 1
  • Component Definitions:
    • xˉ\bar{x} = sample mean
    • μ\mu = hypothetical population mean specified under the null hypothesis
    • dd = hypothesized difference (typically d=0d = 0)
    • ss = sample standard deviation
    • nn = sample size
    • dfdf = degrees of freedom
    • sn\frac{s}{\sqrt{n}} = estimated standard error of the mean
  • Software Methods:
    • Method 1: Compute the tt test statistic manually and calculate p-values using the Excel function T.DIST (or T.DIST.RT, T.DIST.2T based on tail direction).
    • Method 2: Use the Excel Analysis Toolpak tool t-Test: Two-Sample Assuming Unequal Variances (requires raw data and a secondary dummy column of zeros/constants to adapt it for a one-sample test).
  • Applied Scenario:
    • Problem: A score of 7070 is considered passing. Was the nationwide average significantly higher than that?
    • Hypotheses:
    • Null Hypothesis (H0H_0): The average score is less than or equal to 7070H0:μ≤70H_0: \mu \le 70
    • Alternative Hypothesis (HAH_A): The average score is greater than 7070HA:μ>70H_A: \mu > 70
    • Testing Parameters:
    • Sample size: n=70n = 70 from TestScores dataset
    • Population standard deviation: Unknown
    • Significance level: α=0.05\alpha = 0.05
    • Test type: Right-tailed one-sample TT test with df=69df = 69

Reporting and Interpreting Hypothesis Test Results

  • Standard Interpretation Format:
    • Every test must be stated in the canonical form:     P = [p-value]. At alpha = [significance level], we [fail to reject / reject] the null hypothesis.
  • Decision Rules:
    • If p≥αp \ge \alpha: Fail to reject the null hypothesis (H0H_0).
    • If p<αp < \alpha: Reject the null hypothesis (H0H_0).
  • Strict Academic Phrasing Conventions:
    • Permitted terminology is restricted solely to "reject" or "fail to reject".
    • Never use the words "accept," "prove," or "disprove" in reference to a statistical hypothesis.

Applied Practice Exercises

  • Exercise 1: Interval with Known Population Standard Deviation
    • Prompt: Calculate a 90%90\% confidence interval around the average exam score in the sample. The population standard deviation (σ\sigma) is 1010.
    • Strategy: Since σ\sigma is known (and assuming large sample criteria n≥30n \ge 30), use the ZZ distribution.
    • Margin of error setup: 1.645×10n1.645 \times \frac{10}{\sqrt{n}}.
  • Exercise 2: Directional One-Sample Test with Known Dispersion
    • Prompt: Perform a one-sample test based on the following hypotheses, given σ=10\sigma = 10 and α=0.01\alpha = 0.01:
    • Null Hypothesis (H0H_0): Average exam score is greater than or equal to 8282H0:μ≥82H_0: \mu \ge 82
    • Alternative Hypothesis (HAH_A): Average exam score is less than 8282HA:μ<82H_A: \mu < 82
    • Strategy: Perform a left-tailed one-sample ZZ test using σ=10\sigma = 10.
  • Exercise 3: Interval with Unknown Population Standard Deviation
    • Prompt: Calculate a 95%95\% confidence interval around the average exam score in the sample. Assume the population standard deviation is unknown.
    • Strategy: Because σ\sigma is unknown, use the TT distribution with degrees of freedom df=n−1df = n - 1 and sample standard deviation ss.
    • Margin of error setup: t0.025,n−1×snt_{0.025, n-1} \times \frac{s}{\sqrt{n}}.
  • Exercise 4: Test Involving a Hypothesized Difference
    • Prompt: Perform a one-sample test with α=0.05\alpha = 0.05 assuming population standard deviation is unknown:
    • Null Hypothesis (H0H_0): Average exam score is at least 55 points higher than 7575H0:μ≥75+5H_0: \mu \ge 75 + 5
    • Alternative Hypothesis (HAH_A): Average exam score is less than 55 points higher than 7575HA:μ<75+5H_A: \mu < 75 + 5
    • Procedural Note: The phrasing "at least 5 points higher" indicates a hypothesized mean difference parameter d=5d = 5 relative to base benchmark 7575 (equating to a comparison threshold of 8080). Use a left-tailed one-sample TT test.
  • Exercise 5: Sample SAT Score Interval Calculation
    • Prompt: Assume that the average SAT score for a sample of n=50n = 50 students was xˉ=1020\bar{x} = 1020, and the population standard deviation is σ=200\sigma = 200. Calculate a 99%99\% confidence interval around the sample average.
    • Determination of Distribution: The sample size is large (n=50≥30n = 50 \ge 30) and the population standard deviation is known (σ=200\sigma = 200), requiring the ZZ distribution.
    • Numerical Evaluation:
    • Sample mean: xˉ=1020\bar{x} = 1020
    • Population standard deviation: σ=200\sigma = 200
    • Sample size: n=50n = 50
    • Confidence level: 0.990.99, yielding α=0.01\alpha = 0.01
    • Critical value: Zα/2=Z0.005≈2.576Z_{\alpha/2} = Z_{0.005} \approx 2.576 (or standard shortcut 2.582.58)
    • Standard error of the mean:       σn=20050=2007.07107≈28.284\frac{\sigma}{\sqrt{n}} = \frac{200}{\sqrt{50}} = \frac{200}{7.07107} \approx 28.284
    • Margin of error calculation:       Margin of Error=2.576×28.284≈72.86\text{Margin of Error} = 2.576 \times 28.284 \approx 72.86       (Using 2.582.58: 2.58×28.284≈72.972.58 \times 28.284 \approx 72.97)
    • Interval limits (using Z=2.576Z = 2.576):       Lower Limit=1020−72.86=947.14\text{Lower Limit} = 1020 - 72.86 = 947.14Upper Limit=1020+72.86=1092.86\text{Upper Limit} = 1020 + 72.86 = 1092.86
    • Resulting 99%99\% Confidence Interval: [947.14,1092.86][947.14, 1092.86].