t-Statistic Calculator
Enter the sample mean, hypothesised mean, standard deviation and sample size to compute the t statistic for a mean hypothesis test.
📐 计算公式
t 统计量(本页代码口径):t=(样本均值 x̄−假设均值 μ)÷(s÷√n);标准误 SE=s÷√n;自由度 df=n−1。左尾 p=P(T≤t)、右尾 p=P(T≥t)、双侧 p=2×min(左尾,右尾)。校验:x̄、μ、s、n 经输入守卫必填且合法;s>0、n 为 ≥2 的整数。前提:独立观测、总体近似正态或 n 较大;单侧方向须在查看数据前确定。
输入样本均值 x̄、假设均值 μ、标准差 s、样本量 n 与备择方向,求 t 统计量及对应尾概率;结果附独立性与分布前提说明。
Assumptions: independent observations and sample size n (df = n − 1); the population is approximately normal, or n is large enough for the CLT. The 95% CI corresponds to the two-sided p; for a pre-specified left- or right-tail alternative, use the matching tail p rather than halving the two-sided p.
Formula & Standard References
| Item | Formula / Note | Source / Standard |
|---|---|---|
| t statistic | t = (xbar - mu0) / (s / sqrt(n)) | Student (1908), The probable error of a mean, Biometrika 6(1) |
| Difference from z | When sigma is unknown, s replaces sigma and the statistic follows a t distribution | Student (1908); NIST/SEMATECH e-Handbook §1.3.5.2 |
| Degrees of freedom | df = n - 1 | NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.2 |
| Limiting behavior | As n grows, the t distribution converges to the standard normal | NIST/SEMATECH e-Handbook of Statistical Methods, t distribution |
📌 计算说明
- 单样本 t 检验的核心量。
- (105−100)/(10/5) → 2.5。