单样本 t 检验计算器

t = (x̄ − μ₀) / (s/√n), df=n−1

Enter sample data (or mean, standard deviation and size) to test a sample mean against a hypothesised population mean when the population SD is unknown, returning t, df and p.

📐 计算公式
单样本 t 检验(本页代码口径,calcTool 主算与增强面板挂接共存):t=(x̄−μ₀)÷(s÷√n)、df=n−1、双尾 p=betai(df÷2,0.5,df÷(df+t²))(不完全贝塔函数数值解);增强量:标准误 se=s÷√n、Cohen d=(x̄−μ₀)÷s、95% 区间=x̄±t_crit×se,t_crit 查表(df≤30 逐值,31–40→2.021、41–60→2.000、61–120→1.980、>120→1.960)。校验:四项空值即提示并中止;增强另要求 s>0 且 n≥2。判据:|t|>t_crit 判显著(α=0.05 双尾);|d|≥0.8 大 / ≥0.5 中 / ≥0.2 小 / 其余可忽略;n<15 附正态性提示。

总体标准差未知时,用样本标准差检验均值偏离。

📌 计算说明
  • σ 未知时改用 t 检验。
  • df=n−1。

📚 深度解析:单样本 t 检验

💡 常见使用场景

均值检验
x̄=105、m0=100、s=15、n=25:t=5/(15/5)=5/3≈1.667,df=24。临界 t(0.05,24)≈2.064,未达显著(p≈0.108)。
显著情形
x̄=112:t=12/3=4.0,远超临界,显著(p<0.001)。

❓ 常见问题(FAQ)

为何用 t 而非 z?
σ 未知用样本 s 估计,小样本下 s 波动使 t 分布更胖尾,比 z 保守。
p 值怎么得?
由 t 与 df 查 t 分布,双尾 p=2×P(T>|t|);本工具内置 erf/betai 计算。

Formula & Standard References

Item Formula / Note Source / Standard
t statistict = (x̄ − μ0) ÷ (s ÷ √n) with df = n − 1Student (Gosset) 1908, Biometrika
Normality conditionFor n<30 the population should be near-normal; check with Shapiro-WilkShapiro & Wilk 1965, Biometrika
Two-tailed critical valuesTwo-tailed α=0.05: ±2.262 at df=9, ±2.045 at df=29, →1.960 as df→∞Standard t-distribution tables
Effect-size pairingReport d and CI alongside p; significance alone is insufficientAPA Publication Manual (2020) reporting standards