Written and maintained by CASRAI Editorial Board
Published
On this page
Statistical inference is the set of methods for drawing conclusions about a population from a sample, with the uncertainty of that step stated explicitly. This page is for researchers who have sample data and need to estimate a population quantity or test a claim about it. It covers the definition, the core formulas, one worked example with every step of arithmetic, how to read the result, how to report it in APA style, and short code for Excel, R and Python.
What is statistical inference? Definition in one paragraph
Statistical inference uses a statistic (a number describing a property of a sample) to learn about a parameter (a numerical characteristic of the whole population). OpenStax defines a population as “a collection of persons, things, or objects under study” and a parameter as “a numerical characteristic of the whole population that can be estimated by a statistic”; it calls the formal methods for this “inferential statistics.” Inference has two main forms: estimation (a point estimate, or an interval such as a confidence interval) and hypothesis testing (deciding whether the data are consistent with a stated claim about the parameter). For the difference between describing a sample and inferring beyond it, see descriptive vs inferential statistics; for the underlying distinction between the two groups, see population vs sample.
Statistical inference formula
No single formula defines inference; the formulas depend on the parameter. The most widely taught case is inference about one population mean when the population standard deviation is unknown. The NIST/SEMATECH e-Handbook of Statistical Methods gives the one-sample t statistic:
T = (Ȳ − μ₀) / (s / √N)
- Ȳ: the sample mean (the statistic).
- μ₀: the hypothesized population mean under the null hypothesis H₀: μ = μ₀.
- s: the sample standard deviation.
- N: the sample size. The quantity s/√N is the estimated standard error of the mean.
The null hypothesis is rejected at significance level α (two-sided) if T < t(α/2, N−1) or T > t(1−α/2, N−1), where N−1 is the degrees of freedom. The matching confidence limits are:
Ȳ ± t(1−α/2, N−1) × s/√N
When the population standard deviation σ is known, NIST gives the interval Ȳ ± z(1−α/2) × σ/√N; NIST also notes that in practice population standard deviations are usually not known and must be estimated from the data, which is why the t version is the one used in most applied work.
Statistical inference example: a worked calculation
Suppose a lab’s assay is calibrated so a reference sample should read 100 units on average. Ten independent measurements of the reference sample give: 102, 98, 105, 110, 95, 108, 101, 99, 107, 104 (an illustrative dataset constructed for this page, not real measurements). The question: is the assay’s long-run mean different from 100? The parameter is the true mean μ; H₀: μ = 100; Hₐ: μ ≠ 100; α = .05.
Step 1: describe the sample
- Sum = 1029, N = 10, so Ȳ = 1029 / 10 = 102.9.
- Deviations from the mean: −0.9, −4.9, 2.1, 7.1, −7.9, 5.1, −1.9, −3.9, 4.1, 1.1. Their squares sum to 204.9.
- Sample variance = 204.9 / (10 − 1) = 22.767; s = √22.767 = 4.771.
- Standard error = 4.771 / √10 = 4.771 / 3.162 = 1.509.
Step 2: the test
T = (102.9 − 100) / 1.509 = 2.9 / 1.509 = 1.92 with 9 degrees of freedom. The critical value is t(0.975, 9) = 2.262. Because |1.92| < 2.262, H₀ is not rejected at α = .05. The two-sided p-value for T = 1.92 with 9 df is about .087.
Step 3: the interval (estimation)
Margin of error = 2.262 × 1.509 = 3.413. The 95% confidence interval is 102.9 ± 3.413 = [99.49, 106.31]. The interval contains 100, which agrees with the test: at the same α, a two-sided test rejects μ₀ exactly when μ₀ falls outside the (1 − α) interval.
Step 4: effect size
The standardized difference is (102.9 − 100) / 4.771 = 0.61 (Cohen’s d for a one-sample design), a moderate-sized observed deviation that this small sample cannot distinguish from chance.
How to interpret the result
| Quantity | In the example | What it tells you | What it does not tell you |
|---|---|---|---|
| Point estimate (Ȳ) | 102.9 | The best single estimate of μ from this sample | How close it is to μ |
| Standard error | 1.509 | How much sample means would vary from sample to sample at N = 10 | The spread of individual measurements (that is s) |
| p-value | .087 | The probability of a T this extreme or more if H₀ were true and the assumptions held | The probability that H₀ is true |
| 95% CI | [99.49, 106.31] | The range of μ values the data do not rule out at α = .05 | That μ lies in this interval with 95% probability; the 95% describes the procedure over repeated samples |
| Not rejecting H₀ | T = 1.92 < 2.262 | The data are compatible with μ = 100 | That μ equals 100; with N = 10 the interval is also compatible with values up to about 106 |
Assumptions and common mistakes
- Representative sampling. Inference only generalizes to the population the sample was drawn from. Non-random or biased samples break the link; see sampling errors.
- Independent observations. The one-sample t formulas assume the ten measurements do not influence each other. Repeated readings of the same tube are not independent draws.
- Approximately normal data, or a large enough sample. The exact t procedure assumes normally distributed data; with small N, check a plot of the data.
- Reading p as the probability the null is true. It is a statement about the data given H₀, not about H₀ given the data.
- Treating “not significant” as “no effect.” Here the interval is wide; the honest conclusion is imprecision, not equivalence.
- Choosing the test after seeing the data. Decide H₀, Hₐ and α before analysis.
Frequentist inference, used above, is one of two main frameworks; Bayesian inference instead updates a prior distribution to a posterior and reports probabilities about parameters directly. For a research-context comparison, see the frequentist vs Bayesian clinical trials comparison.
How to report it (APA example)
Report the test statistic, degrees of freedom, exact p-value, the confidence interval and an effect size. An example sentence in APA style:
The assay mean (M = 102.9, SD = 4.77) did not differ significantly from the reference value of 100, t(9) = 1.92, p = .087, 95% CI [99.49, 106.31], d = 0.61.
For the full reporting conventions, see reporting statistics in APA style; for the related two-group test, see the independent-samples t-test guide.
How to calculate it in Excel, R or Python
Excel
With the ten values in A1:A10:
Mean: =AVERAGE(A1:A10) -> 102.9 SD: =STDEV.S(A1:A10) -> 4.771 SE: =STDEV.S(A1:A10)/SQRT(COUNT(A1:A10)) -> 1.509 t statistic: =(AVERAGE(A1:A10)-100)/(STDEV.S(A1:A10)/SQRT(10)) -> 1.922 p-value: =T.DIST.2T(ABS(1.922),9) -> 0.087 Margin: =T.INV.2T(0.05,9)*1.509 -> 3.413
R
x <- c(102,98,105,110,95,108,101,99,107,104) t.test(x, mu = 100, conf.level = 0.95) # t = 1.922, df = 9, p-value = 0.08678 # 95 percent confidence interval: 99.48672 106.31328
Python
from scipy import stats x = [102,98,105,110,95,108,101,99,107,104] res = stats.ttest_1samp(x, popmean=100) print(res.statistic, res.pvalue) # 1.922, 0.0868 print(res.confidence_interval(0.95)) # (99.487, 106.313)
Frequently asked questions
What is statistical inference?
Statistical inference is the process of using data from a sample to draw conclusions about a population, through estimation (point and interval estimates) and hypothesis testing, while quantifying the uncertainty involved.
What is the formula for statistical inference?
There is no single formula. For a population mean with unknown standard deviation, the test statistic is T = (Ȳ − μ₀)/(s/√N) and the confidence interval is Ȳ ± t(1−α/2, N−1) × s/√N, as given in the NIST/SEMATECH handbook.
What are examples of statistical inference?
Estimating a population mean from a sample mean with a confidence interval, and testing whether a mean equals a reference value (worked above with N = 10), are two standard examples. Other examples include comparing two group means and testing a proportion.
What is the difference between estimation and hypothesis testing?
Estimation reports how large a parameter probably is, with a range; hypothesis testing asks whether the data are compatible with a specific value. As shown above, a two-sided test at level α and a (1 − α) confidence interval give consistent answers.
Is statistical inference the same as inferential statistics?
In practice yes: “inferential statistics” is the textbook name for the formal methods of statistical inference.
Sources
- NIST/SEMATECH e-Handbook of Statistical Methods, one-sample t-test and confidence intervals for the mean (read 2026-11-08).
- OpenStax, Introductory Statistics 2e, section 1.1, Definitions of Statistics, Probability, and Key Terms (read 2026-11-08).
The worked example data are illustrative and were constructed for this page; the arithmetic was computed by hand and checked against SciPy.







