🧪inference

One-Sample T-Test Statistic

t = (x̄ - μ₀) / (s / √n)

The one-sample t-test statistic measures how far the sample mean is from a hypothesized population mean, in units of the estimated standard error. It follows a t-distribution with n - 1 degrees of freedom and is used when the population standard deviation is unknown.

Variables

t=T-Statistic

The test statistic following a t-distribution with n - 1 degrees of freedom

=Sample Mean

The observed mean of the sample data

μ₀=Hypothesized Mean

The population mean under the null hypothesis

s=Sample Standard Deviation

The standard deviation computed from the sample

Example Calculation

Scenario

A manufacturer claims a cereal box contains 500 g on average. A sample of 25 boxes has mean 496 g and standard deviation 10 g. Test the claim at α = 0.05.

Given Data

:496 g
μ₀:500 g
s:10 g
n:25

Calculation

t = (x̄ - μ₀) / (s/√n) = (496 - 500) / (10/√25) = -4 / 2

Result

t = -2.0 with df = 24

Interpretation

The t-statistic of -2.0 with 24 degrees of freedom gives a two-tailed p-value of approximately 0.057. At α = 0.05, we fail to reject the null hypothesis. The data does not provide sufficient evidence that the true mean weight differs from 500 g.

When to Use This Formula

  • Testing whether a population mean equals a specific value when σ is unknown
  • Comparing a sample mean to a known standard or target
  • Quality control testing when the process standard deviation must be estimated from data
  • Any hypothesis test about a single mean using small to moderate samples

Common Mistakes

  • Using the z-test instead of the t-test when the population standard deviation is unknown
  • Forgetting to check assumptions: random sample, approximate normality, and no extreme outliers
  • Confusing a one-tailed test with a two-tailed test and misinterpreting the p-value
  • Using the wrong degrees of freedom (should be n - 1 for a one-sample test)

Calculate This Formula Instantly

Snap a photo of any problem and get step-by-step solutions.

Download StatsIQ

FAQs

Common questions about this formula

A z-test is used when the population standard deviation (σ) is known, producing a test statistic from the standard normal distribution. A t-test is used when σ is unknown and must be estimated by s, producing a test statistic from the t-distribution. The t-distribution has heavier tails than the normal, which accounts for the extra uncertainty from estimating σ.

In a one-sample t-test, degrees of freedom equal n - 1. They reflect the number of independent pieces of information available to estimate the standard deviation. As degrees of freedom increase, the t-distribution approaches the standard normal distribution.

More Formulas