Hypothesis Testing

T-Test: Complete Guide to Calculation and APA 7

Psych Research Tools Team27 min read
t-testhypothesis testingapa stylestatistics

T-Test: Complete Guide to Calculation and APA 7

A t-test is one of the most widely used statistical tests in psychology, education, health sciences, and behavioral research. It is designed to determine whether a difference between means is large enough, relative to the variability in the data, to provide evidence against a null hypothesis.

Researchers commonly use t-tests to answer questions such as:

  • Do two independent groups have different mean anxiety scores?
  • Does a sample's average score differ from a known or hypothesized value?
  • Does participants' performance change from pre-test to post-test?
  • Is the mean difference between two related measurements statistically significant?

The term t-test actually covers several related procedures. The three major forms are:

  1. One-sample t-test: compares one sample mean with a specified value.
  2. Independent-samples t-test: compares means from two independent groups.
  3. Paired-samples t-test: compares two related measurements, such as pre-test and post-test scores.

This guide explains all three, with particular attention to the independent-samples t-test, including its formula, assumptions, calculation, interpretation, effect size, statistical power, and APA 7th edition reporting.

What Is a T-Test?

A t-test is an inferential statistical test for means. It evaluates a difference between a sample mean, or between two sample means, by comparing that difference with an estimate of its standard error.

Conceptually:

t = observed difference / standard error of the difference

A large absolute t-value indicates that the observed difference is large relative to the amount of sampling variation expected under the null hypothesis.

A small t-value indicates that the observed difference is relatively small compared with the uncertainty surrounding the estimate.

The t distribution is used because the population standard deviation is typically unknown and must be estimated from the sample.

When Should You Use a T-Test?

A t-test is appropriate when your research question involves a mean or mean difference and your outcome variable is measured on a scale for which a mean is meaningful.

For example, a psychology researcher might compare:

  • Mean depression scores between a treatment and control group.
  • Mean reaction time between two experimental conditions.
  • Mean exam performance against a benchmark score.
  • Mean stress scores before and after an intervention.

The correct version of the test depends mainly on the relationship between the observations.

Research questionAppropriate test
Is one sample mean different from a known value?One-sample t-test
Do two unrelated groups differ in their means?Independent-samples t-test
Do the same participants have different scores at two time points?Paired-samples t-test

Independent-Samples T-Test

The independent-samples t-test compares the means of two independent groups.

Suppose a researcher wants to determine whether psychology students who receive an intervention have different anxiety scores from students in a control group.

The hypotheses might be:

Null hypothesis (H₀):
The population means are equal.

H₀: μ₁ = μ₂

Alternative hypothesis (H₁):
The population means are different.

H₁: μ₁ ≠ μ₂

The test evaluates whether the observed difference between the two sample means is sufficiently large relative to its standard error.

Independent-Samples T-Test Formula

The general form of the independent-samples t statistic can be written as:

t = (M₁ − M₂) / SE(M₁ − M₂)

Where:

  • M₁ = mean of Group 1
  • M₂ = mean of Group 2
  • SE(M₁ − M₂) = standard error of the difference between means

When equal population variances are assumed, the pooled variance is used:

sp² = [((n₁ − 1)s₁²) + ((n₂ − 1)s₂²)] / (n₁ + n₂ − 2)

The standard error becomes:

SE(M₁ − M₂) = √[sp²(1/n₁ + 1/n₂)]

Therefore:

t = (M₁ − M₂) / √[sp²(1/n₁ + 1/n₂)]

The corresponding degrees of freedom are:

df = n₁ + n₂ − 2

This is the pooled-variance, or equal-variance, version of the independent-samples t-test.

Welch's T-Test

The assumption that the two populations have equal variances is not always reasonable.

When group variances differ, Welch's t-test is generally preferred because it does not require the equal-variance assumption.

Welch's test calculates the standard error using the two sample variances separately:

t = (M₁ − M₂) / √(s₁²/n₁ + s₂²/n₂)

The degrees of freedom are estimated using the Welch-Satterthwaite equation:

df ≈ (s₁²/n₁ + s₂²/n₂)² / [((s₁²/n₁)²/(n₁ − 1)) + ((s₂²/n₂)²/(n₂ − 1))]

The resulting degrees of freedom may therefore be non-integer.

Worked Independent-Samples T-Test Example

Imagine a researcher compares anxiety scores for two independent groups.

GroupnMeanSD
Intervention3018.405.20
Control3022.105.80

The observed mean difference is:

18.40 − 22.10 = −3.70

The intervention group has an anxiety score that is 3.70 points lower than the control group.

The direction is important, but the magnitude of the t statistic depends on the standard error of the difference.

Using the pooled-variance formulation:

sp² = [29(5.20²) + 29(5.80²)] / 58

sp² ≈ 30.42

Therefore:

SE = √[30.42(1/30 + 1/30)]

SE ≈ 1.424

The resulting t statistic is approximately:

t = −3.70 / 1.424

t ≈ −2.60

Degrees of freedom:

df = 30 + 30 − 2 = 58

The sign of the t statistic indicates the direction of the difference based on the order in which the groups were entered. For a two-tailed hypothesis test, the magnitude of the statistic determines how far the result lies into the tails of the t distribution.

The appropriate p-value should be obtained from statistical software or a validated t-test calculator.

The Three Types of T-Tests

1. One-Sample T-Test

A one-sample t-test evaluates whether a sample mean differs from a specified reference value.

For example:

Is the mean anxiety score in this sample different from 20?

The null hypothesis is:

H₀: μ = μ₀

The test statistic is:

t = (M − μ₀) / (s/√n)

Where:

  • M = sample mean
  • μ₀ = hypothesized population mean
  • s = sample standard deviation
  • n = sample size

Example

A researcher obtains:

  • M = 23.4
  • s = 6.0
  • n = 36

The hypothesized mean is:

μ₀ = 20

Then:

t = (23.4 − 20)/(6/√36)

t = 3.4/1

t = 3.40

Degrees of freedom:

df = 35

The test then determines whether a statistic this extreme would be sufficiently unlikely under the null hypothesis.


2. Independent-Samples T-Test

Use this test when the two groups contain independent observations.

Examples include:

  • Psychology students vs. engineering students
  • Treatment group vs. control group
  • Male participants vs. female participants
  • Group A vs. Group B, when each participant contributes data to only one group

The defining issue is independence.

If the same person contributes a score to both groups, the groups are not independent.


3. Paired-Samples T-Test

A paired-samples t-test, also called a dependent-samples t-test, is appropriate when two scores are naturally linked.

Common examples include:

  • Pre-test vs. post-test
  • Before treatment vs. after treatment
  • Performance under Condition A vs. Condition B in the same participants
  • Matched participant pairs

Instead of analyzing two independent group means, the paired t-test analyzes the difference score for each pair.

For each participant:

Dᵢ = X₁ᵢ − X₂ᵢ

The mean difference is then:

M_D = ΣDᵢ/n

The test statistic is:

t = M_D / (s_D/√n)

Degrees of freedom:

df = n − 1

T-Test Assumptions

A valid t-test requires more than entering numbers into statistical software.

The important assumptions depend on the specific version of the test.

1. Independence of Observations

Observations should be independent within the relevant design.

For an independent-samples t-test, each participant should generally belong to only one group, and one participant's score should not systematically determine another participant's score.

Independence is primarily a study-design assumption, not something that can be repaired simply through statistical software.

Clustered or repeated observations may require another approach, such as multilevel modeling or a repeated-measures analysis.

2. Continuous Outcome Variable

A t-test is designed for a quantitative outcome where calculating a meaningful mean and variance makes sense.

Likert-scale variables require additional consideration. A single ordinal item and a multi-item scale score are not necessarily equivalent measurement situations.

In psychology, composite scale scores are frequently analyzed using parametric methods when the measurement properties and research design justify doing so.

3. Approximately Normal Outcome or Difference Scores

For smaller samples, the sampling distribution of the mean is more sensitive to serious departures from normality.

For an independent-samples t-test, consider the distribution within each group.

For a paired-samples t-test, the relevant variable is the difference score, not necessarily each pre-test and post-test distribution separately.

Moderate departures from normality may not invalidate the analysis, particularly with reasonable sample sizes and without extreme outliers. Severe skewness, heavy tails, or influential outliers deserve closer examination.

4. Homogeneity of Variance

The traditional pooled independent-samples t-test assumes equal population variances.

This assumption is not required by Welch's t-test.

Therefore, when group variances differ materially, Welch's test is often a more appropriate choice.

5. No Extreme Outliers

Extreme outliers can strongly influence means, standard deviations, and therefore t-test results.

Researchers should inspect the raw data and use appropriate graphical or numerical diagnostics rather than relying on a single automated outlier rule.

How to Check T-Test Assumptions in SPSS

For an independent-samples t-test in SPSS, researchers commonly inspect:

Descriptive statistics

Review:

  • Mean
  • Standard deviation
  • Sample size
  • Minimum and maximum

Distributional diagnostics

Consider:

  • Histograms
  • Q-Q plots
  • Boxplots
  • Skewness and kurtosis
  • Extreme-value inspection

Formal normality tests such as Shapiro-Wilk can be useful, but they should not be treated as the sole criterion for deciding whether a t-test is appropriate.

Homogeneity of variance

SPSS commonly reports Levene's test for equality of variances alongside the independent-samples t-test.

The output typically provides two rows:

  • Equal variances assumed
  • Equal variances not assumed

The second row corresponds to the Welch-style adjustment.

Levene's Test and Choosing the Correct Row

Suppose SPSS reports a statistically significant Levene's test.

This suggests evidence that the group variances differ.

In that situation, researchers commonly report the equal variances not assumed result.

If Levene's test does not indicate a meaningful variance difference, the equal-variance row may be used when the pooled-variance model is substantively appropriate.

However, researchers should avoid treating a p-value from Levene's test as the only decision rule.

The combination of:

  • variance estimates,
  • sample sizes,
  • design,
  • robustness of the t-test,
  • and the research context

should inform the analysis.

Null and Alternative Hypotheses

A t-test can be one-tailed or two-tailed.

Two-tailed test

A two-tailed hypothesis predicts a difference without specifying its direction.

H₁: μ₁ ≠ μ₂

Example:

Anxiety scores differ between the intervention and control groups.

One-tailed test

A one-tailed hypothesis predicts a specific direction.

H₁: μ₁ < μ₂

Example:

The intervention group has lower anxiety scores than the control group.

A directional hypothesis should be specified before examining the results.

What Does the P-Value Mean?

The p-value is the probability, under the null model and the assumptions of the test, of obtaining a test statistic at least as extreme as the observed result.

It is not:

  • the probability that the null hypothesis is true;
  • the probability that your findings occurred "by chance";
  • the probability that the alternative hypothesis is true;
  • a measure of practical importance.

For example:

p = .03

does not mean:

There is a 3% probability that the null hypothesis is true.

Instead, it means that the observed result, or a more extreme result, would be relatively unusual under the specified null model.

Statistical Significance vs. Practical Significance

A statistically significant result is not automatically an important result.

A large sample can detect very small mean differences.

Conversely, a meaningful effect may fail to reach statistical significance in a small or noisy sample.

For that reason, t-test results should ideally be interpreted using several pieces of evidence:

  1. Mean difference
  2. Confidence interval
  3. p-value
  4. Effect size
  5. Sample size
  6. Research context

A useful interpretation therefore sounds like:

Participants in the intervention group reported lower anxiety scores than participants in the control group, with a mean difference of 3.70 points. The uncertainty around this estimate and the standardized effect should be considered alongside the p-value.

Rather than:

The intervention worked because p < .05.

Effect Size for a T-Test

Effect size answers a different question from statistical significance.

The t-test asks:

Is the observed difference inconsistent with the null hypothesis?

Effect size asks:

How large is the difference?

For mean comparisons, Cohen's d is commonly used.

Cohen's d for Independent Groups

A common formulation is:

d = (M₁ − M₂) / sp

Where sp is the pooled standard deviation.

Using the worked example:

  • M₁ = 18.40
  • M₂ = 22.10
  • sp ≈ 5.52

Then:

d ≈ −3.70 / 5.52

d ≈ −0.67

The negative sign indicates direction based on group ordering. The magnitude, approximately 0.67, represents the standardized difference.

Cohen's conventional benchmarks are often described as approximately:

Cohen's dConventional interpretation
0.20Small
0.50Medium
0.80Large

These thresholds are heuristics, not universal scientific laws. An effect that is "small" in one domain can be highly meaningful in another.

Hedges' g

For smaller samples, researchers may prefer Hedges' g, which applies a small-sample bias correction to the standardized mean difference.

Hedges' g is particularly useful when standardized mean differences will be compared across studies or used in meta-analysis.

Confidence Intervals

A confidence interval provides a range of values that represents uncertainty around an estimate.

For a mean difference, a confidence interval is often more informative than a p-value alone because it communicates both:

  • the estimated magnitude of the difference;
  • the precision of that estimate.

For example:

Mean difference = −3.70, 95% CI [−6.55, −0.85]

The interval indicates that the estimated difference is negative across the interval and excludes zero.

A confidence interval that excludes zero corresponds to statistical significance at the equivalent two-sided alpha level when the same model and assumptions are used.

Relationship Between t, p, and Effect Size

These statistics answer related but different questions.

StatisticPrimary question
tHow large is the observed difference relative to its standard error?
pHow compatible is the result with the null model?
Cohen's d / Hedges' gHow large is the difference in standardized units?
Mean differenceHow large is the difference in original units?
Confidence intervalHow precise is the estimated difference?

A strong research report considers all of them together.

T-Test and Sample Size

Sample size affects the precision of the estimate and the statistical power of the test.

Holding everything else constant:

  • larger samples generally produce smaller standard errors;
  • smaller standard errors generally produce larger absolute t statistics for the same effect;
  • larger samples generally increase power to detect effects.

However, sample size should not be chosen simply because a particular p-value is desired.

Researchers should ideally conduct an a priori power analysis using:

  • expected effect size;
  • alpha level;
  • desired statistical power;
  • study design;
  • number of groups;
  • allocation ratio where relevant.

For an independent-samples design, the anticipated standardized difference is commonly represented by Cohen's d.

Statistical Power

Statistical power is the probability of detecting an effect of a specified size when that effect genuinely exists, under the assumptions of the power analysis.

A common target is:

Power = .80

This means an 80% probability of rejecting the null hypothesis under the specified effect-size and design assumptions.

Power is affected by:

  • effect size;
  • sample size;
  • significance level;
  • variance;
  • allocation across groups;
  • whether the test is one- or two-tailed.

T-Test vs. ANOVA

Researchers sometimes ask whether they should use a t-test or ANOVA.

A practical distinction is:

  • Two-group mean comparison → independent or paired t-test, depending on design.
  • Three or more independent groups → usually one-way ANOVA or an appropriate regression model.
  • Three or more repeated measurements → repeated-measures ANOVA or another longitudinal model, depending on the design.

Running multiple pairwise t-tests instead of a single appropriate ANOVA can inflate the familywise Type I error rate unless multiple-testing procedures are used.

T-Test vs. Mann-Whitney U Test

The Mann-Whitney U test, also called the Wilcoxon rank-sum test, is a nonparametric alternative for two independent groups.

It can be considered when the assumptions and measurement structure make a rank-based approach more appropriate.

However, it should not be framed simply as:

"Data are non-normal, therefore use Mann-Whitney."

The choice depends on:

  • measurement scale;
  • distributional shape;
  • presence of outliers;
  • estimand of interest;
  • sample size;
  • study design;
  • and scientific question.

A rank-based test does not automatically solve every problem associated with non-normal data.

T-Test vs. Wilcoxon Signed-Rank Test

For paired observations, the corresponding nonparametric alternative is commonly the Wilcoxon signed-rank test.

Again, the decision should depend on the research question and data structure rather than a single normality-test result.

How to Perform an Independent T-Test in SPSS

In SPSS, the typical workflow is:

Step 1: Prepare the variables

You generally need:

  • one continuous dependent variable;
  • one grouping variable with two categories.

Example:

Anxiety_Score → dependent variable

Group → Intervention / Control

Step 2: Check the data

Inspect:

  • missing values;
  • invalid values;
  • group sizes;
  • descriptive statistics;
  • outliers;
  • distributions.

Step 3: Run the test

In SPSS:

Analyze → Compare Means → Independent-Samples T Test

Move the outcome variable into Test Variable(s).

Move the grouping variable into Grouping Variable.

Define the two group codes.

Step 4: Interpret the output

Review:

  • Group Statistics
  • Levene's Test
  • t statistic
  • degrees of freedom
  • two-sided p-value
  • mean difference
  • standard error difference
  • confidence interval

Step 5: Report an effect size

Calculate and report Cohen's d or Hedges' g when appropriate.

How to Perform a Paired T-Test in SPSS

For a pre-test/post-test design:

Analyze → Compare Means → Paired-Samples T Test

Pair:

Pre_Test with Post_Test

The output generally includes:

  • paired means;
  • mean difference;
  • standard deviation;
  • standard error;
  • t;
  • df;
  • significance;
  • confidence interval.

The interpretation focuses on the mean change and its uncertainty.

How to Perform a One-Sample T-Test in SPSS

For a one-sample comparison:

Analyze → Compare Means → One-Sample T Test

Enter the outcome variable and specify the hypothesized test value.

SPSS will provide:

  • sample mean;
  • t statistic;
  • degrees of freedom;
  • p-value;
  • mean difference;
  • confidence interval.

APA 7 Reporting of an Independent T-Test

APA-style statistical reporting should be concise but sufficiently complete for readers to understand the finding.

At minimum, a useful report typically includes:

  • group means and standard deviations;
  • test statistic;
  • degrees of freedom;
  • p-value;
  • confidence interval and/or mean difference when relevant;
  • effect size when appropriate.

Basic APA-style example

An independent-samples t-test indicated that the intervention group reported significantly lower anxiety scores than the control group, t(58) = −2.60, p = .012.

A stronger report includes descriptive statistics and effect size:

An independent-samples t-test indicated that anxiety scores were lower in the intervention group (M = 18.40, SD = 5.20) than in the control group (M = 22.10, SD = 5.80), t(58) = −2.60, p = .012, d = −0.67.

If available, add a confidence interval for the mean difference:

The mean difference was −3.70, 95% CI [−6.55, −0.85].

Reporting a Non-Significant Result

A non-significant result should also be reported transparently.

Example:

An independent-samples t-test indicated that anxiety scores did not differ significantly between the intervention group (M = 18.40, SD = 5.20) and control group (M = 19.20, SD = 5.60), t(58) = −0.59, p = .558, d = −0.15.

Avoid writing:

There was no effect.

A non-significant result does not prove that the population effect is exactly zero.

A better interpretation is:

The study did not provide sufficient evidence of a difference under the specified statistical model.

APA 7 Formatting Rules for t-Test Statistics

In APA style:

  • Statistical symbols such as t, p, M, SD, and d are italicized in running text.
  • Degrees of freedom are reported in parentheses after t.
  • The test statistic is generally rounded to two decimal places.
  • The p-value is commonly reported to three decimal places.
  • Exact p-values should generally be reported unless p < .001.
  • A leading zero is omitted for statistics that cannot exceed 1, such as p or correlations.
  • A leading zero is retained for statistics that can exceed 1, such as M, SD, and t.

Examples:

Correct:

t(28) = 2.43, p = .022

Correct:

p < .001

Usually not preferred:

p = .000

Also avoid:

t = 2.43, df = 28, p = .022

unless the reporting context specifically calls for a separate degrees-of-freedom notation.

APA 7: Italics and Symbols

Common notation:

StatisticAPA-style symbol
MeanM
Standard deviationSD
t statistict
p-valuep
Effect sized or g
Confidence intervalCI
Sample sizeN or n

Use uppercase N for the total sample and lowercase n for a subgroup or cell.

Example:

The total sample included 120 participants (N = 120), with 60 participants per group (n = 60).

Common Mistakes When Reporting T-Tests

Mistake 1: Reporting Only the P-Value

Bad:

The result was significant (p < .05).

This tells the reader almost nothing about the magnitude or direction of the finding.

Better:

Participants in the intervention group reported lower anxiety (M = 18.40, SD = 5.20) than participants in the control group (M = 22.10, SD = 5.80), t(58) = −2.60, p = .012, d = −0.67.

Mistake 2: Saying "Accept the Null Hypothesis"

It is generally preferable to write:

The null hypothesis was not rejected.

rather than:

The null hypothesis was accepted.

Failure to reject H₀ does not demonstrate that H₀ is true.

Mistake 3: Confusing Significance With Importance

A tiny effect can become statistically significant with a large enough sample.

A large effect can fail to reach significance with inadequate power.

Always inspect the effect size and confidence interval.

Mistake 4: Ignoring the Study Design

A pre-test/post-test study generally requires a paired analysis, not an independent-samples t-test.

Mistake 5: Treating Normality Tests as Automatic Gatekeepers

Statistical decisions should not be based solely on whether a Shapiro-Wilk test has p < .05.

Visual diagnostics, sample size, outliers, study design, and robustness all matter.

Mistake 6: Using Multiple T-Tests Instead of a Better Model

If a study has several groups or repeated measurements, running many separate t-tests may increase Type I error.

ANOVA, regression, mixed-effects models, or planned contrasts may be more appropriate.

Mistake 7: Reporting the Wrong Variance Assumption

For independent groups with unequal variances, blindly reporting the pooled-variance result can produce misleading inference.

Consider Welch's test when the variance assumption is questionable.

How to Interpret a T-Test Result Step by Step

Use this sequence:

1. Examine the descriptive statistics

What are the group means and standard deviations?

2. Examine the estimated difference

How many units separate the means?

3. Examine the confidence interval

What range of effects is compatible with the model and data?

4. Examine the t statistic and p-value

How strong is the evidence against the null hypothesis?

5. Examine the effect size

How large is the difference in standardized units?

6. Return to the research question

Does the observed difference have substantive meaning for psychology, education, clinical practice, or the relevant field?

T-Test Decision Guide

Are you comparing a mean with a reference value?
│
├── YES → One-Sample T-Test
│
└── NO
    │
    └── Are you comparing two measurements or groups?
        │
        ├── Same participants / matched pairs
        │   └── Paired-Samples T-Test
        │
        └── Independent participants
            └── Independent-Samples T-Test

For an independent-samples design:

Two independent groups
        │
        ▼
Check design and data quality
        │
        ▼
Inspect distributions and outliers
        │
        ▼
Compare group variances
        │
        ├── Variances reasonably similar
        │       └── Pooled t-test may be appropriate
        │
        └── Variances differ
                └── Welch's t-test
        │
        ▼
Report:
M, SD, t, df, p, CI, effect size

T-Test Calculator

A t-test calculator can reduce arithmetic errors and make it easier to obtain:

  • t statistics;
  • degrees of freedom;
  • p-values;
  • confidence intervals;
  • effect sizes;
  • descriptive statistics.

For research reporting, however, a calculator should supplement statistical reasoning rather than replace it.

Before entering data, determine:

  1. Which t-test matches your design?
  2. What is your dependent variable?
  3. Are the observations independent or paired?
  4. Is a directional hypothesis justified?
  5. Are there important outliers?
  6. Is Welch's test more appropriate?
  7. What effect size should be reported?

Use the T-Test Calculator

T-Test Example in Psychology

Imagine a clinical psychology study comparing perceived stress scores between participants who completed a mindfulness intervention and participants in a control condition.

Research question

Do perceived stress scores differ between the intervention and control groups?

Hypotheses

H₀: μ_intervention = μ_control

H₁: μ_intervention ≠ μ_control

Analysis

Because each participant contributes one stress score and belongs to only one of two independent groups, an independent-samples t-test is appropriate.

Suppose:

  • Intervention: M = 21.30, SD = 5.10, n = 35
  • Control: M = 24.80, SD = 5.70, n = 35

The researcher then evaluates the appropriate t statistic, degrees of freedom, p-value, confidence interval, and effect size.

Interpretation

A statistically significant result would suggest that the data provide evidence of a difference in mean perceived stress between the groups.

It would not, by itself, establish that the intervention caused the difference. Causal inference depends on the broader design, randomization, implementation, measurement, attrition, and other methodological considerations.

T-Test and Causal Inference

This distinction is particularly important in psychology.

A t-test is a statistical comparison, not a causal mechanism.

For example:

Participants who exercise more have lower anxiety scores.

A t-test may demonstrate that two groups differ in mean anxiety.

It does not automatically prove:

Exercise caused lower anxiety.

Causal conclusions require a study design capable of supporting them.

In a randomized controlled trial with adequate design and implementation, a between-group t-test can be part of the inferential framework for estimating an intervention effect.

In an observational study, the same t-test is generally descriptive of the observed group difference and should not automatically be given a causal interpretation.

Beyond the T-Test

The t-test is powerful for simple mean comparisons, but modern psychological research often involves more complex data structures.

Researchers may need:

  • ANOVA for multiple group means;
  • repeated-measures ANOVA for repeated observations;
  • linear regression for continuous predictors;
  • ANCOVA for adjusted group comparisons;
  • mixed-effects models for nested or repeated data;
  • generalized linear models for non-normal outcomes;
  • robust methods when assumptions are problematic.

The t-test remains useful because it is mathematically simple, interpretable, and closely related to regression and ANOVA.

In fact, a two-group independent-samples t-test and a regression model with a binary predictor can produce equivalent inferential results under equivalent assumptions.

T-Test Checklist for Researchers

Before running the analysis:

  • Define the research question.
  • Identify whether observations are independent or paired.
  • Define the null and alternative hypotheses.
  • Determine whether the test is one-tailed or two-tailed before looking at results.
  • Inspect missing data.
  • Inspect outliers.
  • Examine distributions.
  • Consider variance equality for independent groups.
  • Decide whether Welch's test is more appropriate.
  • Run the t-test.
  • Examine the confidence interval.
  • Calculate an appropriate effect size.
  • Interpret statistical and practical significance together.
  • Report the result using APA 7 conventions.

Frequently Asked Questions

What is a t-test used for?

A t-test is used to evaluate hypotheses involving a sample mean or a difference between two means. Common applications include comparing two independent groups, comparing paired measurements, and comparing a sample mean with a reference value.

What is the difference between a t-test and a z-test?

Both tests evaluate standardized differences, but a traditional t-test is used when the population standard deviation is unknown and estimated from the sample. The t distribution accounts for the additional uncertainty associated with estimating the standard deviation.

What does a negative t-value mean?

The sign indicates the direction of the difference based on how the groups or measurements were ordered. It does not mean that the result is "bad" or statistically weaker.

Is a t-test only for normally distributed data?

No. The assumptions concern the relevant sampling distribution and data structure rather than requiring every observed score to form a perfectly normal distribution. Moderate departures from normality can often be tolerated, but severe non-normality and outliers warrant investigation.

Can I use a t-test with Likert data?

It depends on the measurement structure and research context. A single ordinal Likert item is distinct from a multi-item scale score treated as approximately continuous. Researchers should consider the measurement properties, distribution, sample size, and research question.

What does p < .05 mean?

It indicates that, under the specified null model and assumptions, a result at least as extreme as the observed statistic would be relatively unlikely. It does not indicate the probability that the hypothesis is true.

Should I report Cohen's d?

For mean comparisons, reporting an effect size such as Cohen's d is generally valuable because it communicates the magnitude of the observed difference independently of the sample-size-driven significance decision.

Should I use Welch's t-test?

Welch's t-test is particularly useful when group variances differ and/or when sample sizes are unequal. It avoids relying on the equal-variance assumption of the pooled-variance test.

How many participants do I need for a t-test?

There is no universal minimum sample size. The required sample depends on the anticipated effect size, variability, desired power, significance level, study design, and allocation between groups. An a priori power analysis is preferable to relying on an arbitrary rule of thumb.

Key Takeaways

The t-test is a family of procedures for testing hypotheses about means.

The three major versions are:

  • One-sample t-test: one sample mean vs. a reference value.
  • Independent-samples t-test: two independent group means.
  • Paired-samples t-test: two related measurements.

For a rigorous analysis:

  • Match the test to the study design.
  • Inspect the data rather than relying only on automated assumption tests.
  • Consider Welch's test when equal variances are questionable.
  • Report the mean difference, uncertainty, t statistic, degrees of freedom, and p-value.
  • Report an effect size where appropriate.
  • Interpret statistical significance alongside practical significance.
  • Avoid causal claims that the study design cannot support.

A well-reported t-test is more than a single p-value. It is a compact statistical argument linking the research question, study design, observed difference, uncertainty, and substantive interpretation.

Recommended Tools

For practical analysis, explore the Psych Research Tools suite:

  • T-Test Calculator for one-sample, independent-samples, and paired-samples t-tests.
  • Cohen's d Calculator for standardized mean differences.
  • Sample Size Calculator for planning adequately powered studies.

Calculate a T-Test
Calculate Cohen's d
Estimate Required Sample Size

References

American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). American Psychological Association.

Cohen, J. (1988). Statistical power analysis for the behavioral sciences (2nd ed.). Lawrence Erlbaum Associates.

Hedges, L. V., & Olkin, I. (1985). Statistical methods for meta-analysis. Academic Press.

Student. (1908). The probable error of a mean. Biometrika, 6(1), 1–25.

Welch, B. L. (1947). The generalization of "Student's" problem when several different population variances are involved. Biometrika, 34(1–2), 28–35.


SEO Summary

Primary keyword: t-test

Secondary keywords:

  • t-test formula
  • independent samples t-test
  • paired samples t-test
  • one sample t-test
  • t-test calculation
  • t-test assumptions
  • t-test APA 7
  • independent t-test APA reporting
  • Cohen's d t-test
  • Welch's t-test
  • t-test interpretation
  • t-test in SPSS

Suggested meta title:
T-Test: Complete Guide to Calculation and APA 7

Suggested meta description:
Learn how to choose, calculate, interpret, and report t-tests in APA 7, with formulas, worked examples, assumptions, effect sizes, and practical guidance.

Suggested URL slug:
/blog/t-test-complete-guide

Suggested internal links:
/tools/t-test-calculator
/tools/cohens-d-calculator
/tools/sample-size-calculator

Suggested FAQ schema questions:

  • What is a t-test?
  • What are the three types of t-tests?
  • What are the assumptions of a t-test?
  • When should I use Welch's t-test?
  • How do I report a t-test in APA 7?
  • What does a t-value mean?
  • What does p < .05 mean?
  • What effect size should I report with a t-test?