One-Sample t-Test (Mean vs Target)
The third member of the t-test family (with two-sample and paired).
Example
You enter
- Sample mean x_bar 16.1
- Sample SD s 0.3
- Sample size n 25
- Hypothesized / target mean mu0 16
- Tail two
- Alpha 0.05
You get
- T stat 1.667
- Degrees of freedom 24
- P value 0.1086
Details, formula, and sources
Tests whether a sample mean differs from a fixed target or spec value mu0. t = (x_bar - mu0) / (s / sqrt(n)) on n - 1 df, where x_bar and s are the sample mean and SD. The everyday QC question - is the mean fill weight really 16.0 oz, is the mean cure strength really 4,000 psi. A sample of 25 with mean 16.1, SD 0.3 against a 16.0 target gives t = 1.67 on 24 df, two-sided p = 0.109 (not significant at 0.05). Reports t, df, the p-value, and the significance flag, reusing the bundled Student-t CDF; two- and one-sided tails. Small n leans on approximate normality.
t = (x_bar - mu0) / (s / sqrt(n)) on df = n - 1, where x_bar and s are the sample mean and standard deviation and mu0 is the hypothesized/target mean; p from the Student-t CDF.
Per OpenIntro Statistics Chapter 7 (inference for a single mean) - the one-sample t-test, by name; the t-CDF reuses the bundled special-function helper.
Free at openintro.org.
Estimate. AHJ and licensed professional govern.
Field names used by the API: sample_mean, sample_sd, n, hypothesized_mean, tail, alpha, t_stat, df, p_value
- One-sample t t = (x_bar - mu0)/(s/sqrt(n)), df = n - 1OpenIntro Ch. 7
- Target value mu0 is a fixed hypothesized/spec mean, not a second sampleOpenIntro Ch. 7