Comprehensive Guide to the t Distribution, Hypothesis Testing, and Confidence Intervals

Foundations of Hypothesis Testing: Z Test Versus Single-Sample t Test

  • Comparison of statistical tests based on population parameter knowledge:

    • In a ZZ test, a sample mean (MM) is compared against a known population mean (μ\mu) when the population standard deviation (σ\sigma) is known.

    • In a single-sample tt test, a sample mean (MM) is compared against a population with a known mean (μ\mu), but the population standard deviation (σ\sigma) is unknown.

    • When the true population standard deviation (σ\sigma) is unknown, it must be estimated using the sample standard deviation (ss).

  • General conceptual structure of the tt statistic ratio:

    • The tt statistic reflects a fundamental ratio across all inferential designs:     General t=Sample Statistic−Hypothesized ParameterEstimated Standard Error\text{General } t = \frac{\text{Sample Statistic} - \text{Hypothesized Parameter}}{\text{Estimated Standard Error}}

    • Concretely expressed as:     Conceptual t=what you got in the sample−what you’d expect to get if H0 is truehow much of a difference you’d expect because you’re sampling\text{Conceptual } t = \frac{\text{what you got in the sample} - \text{what you'd expect to get if } H_0 \text{ is true}}{\text{how much of a difference you'd expect because you're sampling}}

Conceptual structure of the t formula
  • Formula for the single-sample tt test:   t=M−μMsMt = \frac{M - \mu_M}{s_M}

    • MM represents the sample mean obtained from empirical observations.

    • μM\mu_M represents the population mean of the distribution of sample means, which equals the known population mean (μ\mu).

    • sMs_M represents the estimated standard error of the mean, calculated as:     sM=sns_M = \frac{s}{\sqrt{n}}

Degrees of Freedom and Sample Variance

  • Price paid for estimating parameters:

    • Estimating an unknown population parameter (σ\sigma) using sample data (ss) introduces mathematical restrictions, creating a penalty captured by degrees of freedom (dfdf).

  • Formal definitions of degrees of freedom (dfdf):

    • Physical/mechanical definition: The number of independent ways by which a dynamic system can move without violating any constraint imposed upon it.

    • Mathematical/statistical definition: A mathematical restriction that needs to be put in place when estimating one statistic (σ→s\sigma \rightarrow s) from an estimate of another (μ→M\mu \rightarrow M).

Definitions of degrees of freedom and sample standard deviation formula
  • Sample standard deviation formula incorporating degrees of freedom:   s=∑(X−M)2n−1s = \sqrt{\frac{\sum (X - M)^2}{n - 1}}

    • The sample mean (MM) serves as an estimate of the population mean (μ\mu).

    • The resulting sample standard deviation (ss) serves as an estimate of the population standard deviation (σ\sigma).

    • The calculation of degrees of freedom for a single sample is:     df=n−1df = n - 1

Properties and Characteristics of the t Distribution

  • Source of variability in the tt distribution:

    • In a tt test, σ\sigma is estimated with ss.

    • From sample to sample, the numerical value of ss fluctuates due to sampling error.

    • This additional source of error results in substantially greater variability within the tt distribution compared to the standard normal (ZZ) distribution.

Comparison of standard normal Z distribution and t distribution curves
  • Structural and morphological comparison between ZZ and tt distributions:

    • Thicker tails: The tt distribution exhibits heavier, thicker tails and a flatter peak than the normal curve, accounting for a higher probability of extreme scores.

    • Critical value differences: At an identical significance threshold (e.g., α=.05\alpha = .05), the critical value of tt (tcritt_{\text{crit}}) lies farther out into the tails than the critical value of ZZ (ZcritZ_{\text{crit}}).

    • Rejection difficulty: It is harder to reject the null hypothesis with a tt test than with a ZZ test, requiring a more extreme sample mean (one located farther from zero) to achieve statistical significance.

    • Effect of sample size and dfdf:

    • The tt distribution dynamically changes shape depending on the degrees of freedom (n−1n - 1).

    • When sample size (nn) is small, degrees of freedom are low, producing the thickest tails and most dispersion.

    • As sample size (nn) approaches infinity (n→∞n \rightarrow \infty), degrees of freedom approach infinity (df=∞df = \infty), and the tt distribution becomes identical to the standard normal distribution (t=Zt = Z).

Critical Values and Table of the t Distribution

  • Table layout and reading conventions:

    • Critical values in Table B.2 are indexed by degrees of freedom (dfdf) along the rows and alpha levels (α\alpha) along the columns.

    • Proportions are specified either for one tail (either right or left) or for two tails combined.

Critical values of the t distribution reference table
  • Selected critical values of the tt distribution across degrees of freedom:

    • At df=1df = 1:

    • One tail: 0.25→1.0000.25 \rightarrow 1.000, 0.10→3.0780.10 \rightarrow 3.078, 0.05→6.3140.05 \rightarrow 6.314, 0.025→12.7060.025 \rightarrow 12.706, 0.01→31.8210.01 \rightarrow 31.821, 0.005→63.6570.005 \rightarrow 63.657

    • Two tails: 0.50→1.0000.50 \rightarrow 1.000, 0.20→3.0780.20 \rightarrow 3.078, 0.10→6.3140.10 \rightarrow 6.314, 0.05→12.7060.05 \rightarrow 12.706, 0.02 →31.8210.02 \ \rightarrow 31.821, 0.01→63.6570.01 \rightarrow 63.657

    • At df=2df = 2:

    • Two tails: 0.05→4.3030.05 \rightarrow 4.303, 0.01→9.9250.01 \rightarrow 9.925

    • At df=3df = 3:

    • Two tails: 0.05→3.1820.05 \rightarrow 3.182, 0.01→5.8410.01 \rightarrow 5.841

    • At df=4df = 4:

    • Two tails: 0.05→2.7760.05 \rightarrow 2.776, 0.01→4.6040.01 \rightarrow 4.604

    • At df=5df = 5:

    • Two tails: 0.05→2.5710.05 \rightarrow 2.571, 0.01→4.0320.01 \rightarrow 4.032

    • At df=6df = 6:

    • Two tails: 0.05→2.4470.05 \rightarrow 2.447, 0.01→3.7070.01 \rightarrow 3.707

    • At df=7df = 7:

    • Two tails: 0.05→2.3650.05 \rightarrow 2.365, 0.01→3.4990.01 \rightarrow 3.499

    • At df=8df = 8:

    • Two tails: 0.05→2.3060.05 \rightarrow 2.306, 0.01→3.3550.01 \rightarrow 3.355

    • At df=9df = 9:

    • Two tails: 0.05→2.2620.05 \rightarrow 2.262, 0.01→3.2500.01 \rightarrow 3.250

    • At df=10df = 10:

    • Two tails: 0.05→2.2280.05 \rightarrow 2.228, 0.01→3.1690.01 \rightarrow 3.169

    • At df=20df = 20:

    • Two tails: 0.05→2.0860.05 \rightarrow 2.086, 0.01→2.8450.01 \rightarrow 2.845

    • At df=30df = 30:

    • Two tails: 0.05→2.0420.05 \rightarrow 2.042, 0.01→2.7500.01 \rightarrow 2.750

    • At df=60df = 60:

    • Two tails: 0.05→2.0000.05 \rightarrow 2.000, 0.01→2.6600.01 \rightarrow 2.660

    • At df=120df = 120:

    • Two tails: 0.05→1.9800.05 \rightarrow 1.980, 0.01→2.6170.01 \rightarrow 2.617

    • At df=∞df = \infty (equivalent to ZZ):

    • One tail: 0.05→1.6450.05 \rightarrow 1.645, 0.025→1.9600.025 \rightarrow 1.960, 0.01→2.3260.01 \rightarrow 2.326, 0.005→2.5760.005 \rightarrow 2.576

    • Two tails: 0.10→1.6450.10 \rightarrow 1.645, 0.05→1.9600.05 \rightarrow 1.960, 0.02→2.3260.02 \rightarrow 2.326, 0.01→2.5760.01 \rightarrow 2.576

Single-Sample t Test Applications and Empirical Studies

  • Harlow (1959) Infant Attachment Study:

    • Experimental arrangement: Infant monkeys were placed in cages with two artificial surrogate mothers:

    • A bare wire mesh mother equipped with a feeding nursing bottle.

    • A soft terry cloth mother providing no access to food.

    • Baseline and null model: In a typical day, infant monkeys spend an aggregate of 18 hours18\text{ hours} clinging to a mother surrogate. If there were no preference, clinging time would divide equally, yielding a population baseline mean of μ=9 hours\mu = 9\text{ hours}.

    • Empirical observation: Typical monkeys spent roughly 15 hours per day15\text{ hours per day} clinging to the terry cloth mother, evidencing strong attachment to contact comfort.

    • Sample parameters:

    • Sample size: n=10n = 10

    • Sample mean: M=15.3 hours per dayM = 15.3\text{ hours per day}

    • Sample standard deviation: s=5.2 hourss = 5.2\text{ hours}

    • Hypothesized mean: μ=9 hours\mu = 9\text{ hours}

    • Significance criterion: α=.05\alpha = .05

    • Test setup:

    • df=n−1=10−1=9df = n - 1 = 10 - 1 = 9

    • Evaluate if monkeys spend significantly more time with the softer mother than expected by chance.

  • COVID-19 Quarantine and CDC Exercise Recommendations:

    • Baseline guideline: The CDC recommends that adults engage in 150 minutes150\text{ minutes} of exercise per week, represented as 30 minutes a day30\text{ minutes a day} across 5 days5\text{ days} (μ=5\mu = 5).

    • Research question: Determine if pandemic conditions (closed fitness facilities, shelter-in-place orders) significantly altered exercise adherence relative to the CDC guideline of 5 days per week5\text{ days per week}.

    • Sample data (n=9n = 9 adults recorded days exercised per week):     {5,6,4,3,4,1,0,5,4}\{5, 6, 4, 3, 4, 1, 0, 5, 4\}

    • Test parameters:

    • Population benchmark: μ=5\mu = 5

    • Significance level: α=.01\alpha = .01

    • Degrees of freedom: df=9−1=8df = 9 - 1 = 8

Estimation via Confidence Intervals

  • Hypothesis testing versus parameter estimation:

    • If the analytical goal is strictly to identify whether an effect or difference exists, conduct a hypothesis test.

    • If the analytical goal is to quantify the size or magnitude of an effect, construct a confidence interval.

    • Confidence intervals are particularly informative following null hypothesis rejection to define the probable scale of the difference.

  • Formula for the single-sample tt confidence interval:   M±(tconf)(sM)M \pm (t_{\text{conf}})(s_M)

Single-sample confidence interval formula breakdown
  • Properties of the critical multiplier (tconft_{\text{conf}}):

    • Extracted directly from the tt distribution critical value table.

    • Located via degrees of freedom (dfdf) and the designated error rate (α\alpha).

    • Rule of symmetry: tconft_{\text{conf}} is always two-tailed, even when the preceding hypothesis test was directional (one-tailed).

Precision, Sample Size, and Interpretation of Confidence Intervals

  • Confidence levels and margin of error:

    • A 95%95\% confidence interval corresponds to an error threshold of α=.05\alpha = .05.

    • A 99%99\% confidence interval corresponds to an error threshold of α=.01\alpha = .01.

    • Width comparison: A 99%99\% confidence interval is wider and encompasses more values than a 95%95\% interval.

    • Precision comparison: A 95%95\% confidence interval is narrower and therefore more precise than a 99%99\% interval.

  • Strategies to increase confidence interval precision:

    • Lower the confidence coefficient: Moving from a 99%99\% confidence interval to a 95%95\% confidence interval reduces the width.

    • Increase sample size (nn):

    • Standard error varies inversely with sample size: sM=sns_M = \frac{s}{\sqrt{n}}.

    • Increasing nn shrinks sMs_M.

    • Larger samples mitigate the disproportionate leverage of single outlier scores on MM , yielding narrower, more precise intervals.

  • Theoretical interpretation and the "ring toss" metaphor:

    • True parameter fixedness: The population mean (μ\mu) is a fixed, unchanging quantity; it does not move.

    • Intervals as moving rings: Across repeated independent sampling, each generated confidence interval varies in position depending on the sample mean.

    • Ring toss imagery:

    • The target peg represents the true population mean (μ\mu).

    • The thrown rings represent confidence intervals constructed from individual samples.

    • In a 95%95\% interval system, 95%95\% of all constructed intervals successfully enclose the target peg (μ\mu), whereas 5%5\% miss.

    • A 99%99\% interval uses a wider ring, capturing the peg in 99%99\% of tosses.

Interpretation of confidence intervals and the ring toss metaphor

Dependent Samples t Test: Repeated Measures and Matched Pairs

  • General features of the dependent samples design:

    • Eliminates the need to know population parameters (μ\mu or σ\sigma).

    • Compares two sets of scores that are linked or paired directly with one another.

  • Core design classifications:

    • Repeated measures (within-subjects): Measuring the identical subject across multiple time points or experimental conditions (e.g., "before" treatment versus "after" treatment).

    • Related measures (matched subjects): Pairing distinct individuals one-to-one on key extraneous variables that could affect the dependent variable.

  • Test statistic formula:   t=MD−μMDsMDt = \frac{M_D - \mu_{M_D}}{s_{M_D}}

    • MDM_D is the sample mean of the computed difference scores (D=X1−X2D = X_1 - X_2).

    • μMD\mu_{M_D} represents the hypothesized mean difference under the null hypothesis, which is always 00:     μMD=0\mu_{M_D} = 0

    • sMDs_{M_D} is the estimated standard error of the difference scores, calculated as:     sMD=sDns_{M_D} = \frac{s_D}{\sqrt{n}}

    • Confidence interval formula for dependent samples:     MD±(tconf)(sMD)M_D \pm (t_{\text{conf}})(s_{M_D})

  • Statistical power and individual difference variability:

    • Within-subjects designs are statistically more powerful than between-subjects designs.

    • Increased power results from reducing individual difference variability by measuring the same individual repeatedly.

    • Location in the formula: Individual differences reside in the denominator of the tt test (the standard error term); eliminating this variance decreases standard error and inflates the observed tt value.

  • Methodological limitations of within-subjects designs:

    • Order effects: The experience gained during an initial trial or condition can systematically distort participant behavior or performance in subsequent trials.

    • Practice effects: Incremental experience, task familiarity, or fatigue accumulated across successive trials can alter performance independently of the treatment.

Dependent Samples t Test Empirical Studies

  • Pelton (1983) Olympic Marksmen Study:

    • Experimental premise: Olympic marksmen exhibit enhanced shooting accuracy when timing trigger pulls to occur between heartbeats rather than during heartbeats, avoiding fine mechanical vibrations.

    • Sample details: n=6n = 6 Olympic marksmen firing precision rounds during both phases; accuracy scores recorded on a scale out of 100.

    • Paired observations:

    • Marksman 1: During = 93, Between = 98

    • Marksman 2: During = 90, Between = 94

    • Marksman 3: During = 95, Between = 96

    • Marksman 4: During = 92, Between = 91

    • Marksman 5: During = 95, Between = 97

    • Marksman 6: During = 91, Between = 97

    • Hypothesis parameters: Two-tailed or directional evaluation with α=.05\alpha = .05. If significant, construct a 95%95\% confidence interval for the population mean difference score (μD\mu_D).

  • Pet Ownership and Mood Inventory Study:

    • Experimental premise: Evaluating whether single individuals who own pets differ in subjective mood from single non-pet owners.

    • Control matching: Non-pet owners are matched one-to-one with pet owners on income, social support network, and general physical health.

    • Sample data (n=6n = 6 matched pairs; mood inventory scores):

    • Pair 1: Non-Pet Owner = 10, Pet Owner = 15

    • Pair 2: Non-Pet Owner = 9, Pet Owner = 9

    • Pair 3: Non-Pet Owner = 11, Pet Owner = 10

    • Pair 4: Non-Pet Owner = 11, Pet Owner = 19

    • Pair 5: Non-Pet Owner = 5, Pet Owner = 17

    • Pair 6: Non-Pet Owner = 9, Pet Owner = 15

    • Hypothesis parameters: Significance level set at α=.01\alpha = .01 with df=n−1=5df = n - 1 = 5.

Independent Samples t Test and Pooled Variance

  • Structural configuration:

    • Employs two completely separate, independent groups of subjects (e.g., experimental group versus control group).

Independent samples t formula and step-by-step computational schematic
  • Formula for the independent samples tt test:   t=(M1−M2)−(μM1−μM2)s(M1−M2)t = \frac{(M_1 - M_2) - (\mu_{M_1} - \mu_{M_2})}{s_{(M_1 - M_2)}}

    • (M1−M2)(M_1 - M_2) is the difference between sample means.

    • (μM1−μM2)(\mu_{M_1} - \mu_{M_2}) is the hypothesized difference between population means under the null hypothesis, which is always 00:     μM1−μM2=0\mu_{M_1} - \mu_{M_2} = 0

  • Formula for estimated standard error of the mean difference:   s(M1−M2)=sp2n1+sp2n2s_{(M_1 - M_2)} = \sqrt{\frac{s_p^2}{n_1} + \frac{s_p^2}{n_2}}

  • Concept and formula for pooled variance (sp2s_p^2):

    • Conceptual definition: An averaged variance weighted by degrees of freedom, granting the larger sample more influence ("say") in estimating the population error variance.

    • Formula:     sp2=SS1+SS2(n1−1)+(n2−1)s_p^2 = \frac{SS_1 + SS_2}{(n_1 - 1) + (n_2 - 1)}

    • Sum of squares (SSSS) computational equations:     SS1=∑X12−(∑X1)2n1SS_1 = \sum X_1^2 - \frac{(\sum X_1)^2}{n_1}     SS2=∑X22−(∑X2)2n2SS_2 = \sum X_2^2 - \frac{(\sum X_2)^2}{n_2}

  • Degrees of freedom calculation:   df=(n1−1)+(n2−1)=n1+n2−2df = (n_1 - 1) + (n_2 - 1) = n_1 + n_2 - 2

  • Step-by-step calculation workflow:

    1. Calculate the mean for sample 1: M1=∑X1n1M_1 = \frac{\sum X_1}{n_1}.

    2. Calculate the mean for sample 2: M2=∑X2n2M_2 = \frac{\sum X_2}{n_2}.

    3. Calculate the sum of squares for sample 1 (SS1SS_1).

    4. Calculate the sum of squares for sample 2 (SS2SS_2).

    5. Calculate pooled variance (sp2s_p^2) using pooled degrees of freedom.

    6. Compute the estimated standard error of the difference (s(M1−M2)s_{(M_1 - M_2)}).

    7. Calculate the tt ratio.

  • Confidence interval formula for independent samples:   (M1−M2)±(tconf)(s(M1−M2))(M_1 - M_2) \pm (t_{\text{conf}})(s_{(M_1 - M_2)})

Independent Samples t Test Empirical Studies

  • Seery, Holman, and Silver (2010) Life Adversity and Well-Being Study:

    • Theoretical rationale: Investigates the empirical validity of the phrase "That which doesn't kill us makes us stronger." Prior literature indicated individuals with a history of adversity exhibit superior mental health and well-being over individuals with negligible adversity history.

    • Group categorization (based on adverse events during the prior two years):

    • Low Adversity Group (≤2 negative life events\le 2\text{ negative life events}):

      • Sample values (n1=12n_1 = 12): {7,8,7,2,6,9,7,10,5,0,10,8}\{7, 8, 7, 2, 6, 9, 7, 10, 5, 0, 10, 8\}

    • Moderate Adversity Group (3 to 5 negative life events3\text{ to } 5\text{ negative life events}):

      • Sample values (n2=11n_2 = 11): {4,9,12,8,9,13,12,13,13,7,6}\{4, 9, 12, 8, 9, 13, 12, 13, 13, 7, 6\}

    • Analytical criteria: Evaluate differences in well-being at α=.05\alpha = .05 with pooled degrees of freedom:     df=12+11−2=21df = 12 + 11 - 2 = 21

  • Social Conformity and Authority Compliance in a Committee Atmosphere:

    • Experimental arrangement: Adapting classic obedience protocols where participants deliver escalating shocks ranging from 0 to 25 (0 indicates immediate refusal; 25 denotes full compliance to the investigator in a lab coat).

    • Two between-subjects conditions:

    • Committee Condition: Shocks are administered only after an affirmative group decision involving one naive subject and two experimental confederates who uniformly endorse the naive participant's choice.

    • Solitary Condition (Control): Shocks are administered following the decision of a single, uninfluenced naive subject.

    • Compliance scores (N=12N = 12 total participants randomly assigned equally):

    • Committee (n1=6n_1 = 6): {2,5,20,15,4,10}\{2, 5, 20, 15, 4, 10\}

    • Solitary (n2=6n_2 = 6): {3,8,7,10,14,0}\{3, 8, 7, 10, 14, 0\}

    • Analytical criteria: Test the null hypothesis at α=.01\alpha = .01 with pooled degrees of freedom:     df=6+6−2=10df = 6 + 6 - 2 = 10

Decision Framework for Selecting the Appropriate Statistical Test

  • Decision criteria hierarchy:

    • Group count assessment:

    • If examining one group (1 group1\text{ group}):

      • Is the population standard deviation (σ\sigma) known?

      • Yes: Execute a ZZ test: Z=M−μσMZ = \frac{M - \mu}{\sigma_M}.

      • No: Execute a Single Sample tt test: t=M−μsMt = \frac{M - \mu}{s_M}.

    • If examining two groups (2 groups2\text{ groups}):

      • Are scores matched, paired, or repeated across subjects before and after an intervention?

      • Yes: Execute a Dependent Samples tt test: t=MD−μMDsMDt = \frac{M_D - \mu_{M_D}}{s_{M_D}}.

      • No: Execute an Independent Samples tt test: t=(M1−M2)−(μ1−μ2)s(M1−M2)t = \frac{(M_1 - M_2) - (\mu_1 - \mu_2)}{s_{(M_1 - M_2)}}.

    • If examining three or more groups (≥3 groups\ge 3\text{ groups}):

      • Execute an Analysis of Variance (ANOVA).