One- and two-sample t tests with exact p-values: the test statistic is signal over noise (x̄ − μ₀)/(s/√n), and the p-value is the two-sided tail of the t distribution at your degrees of freedom.
The two-sample mode uses Welch's unequal-variance test by default — the pooled-variance version is only safe when the sample variances agree, and Welch is the honest default modern statistics recommends. Both directions (one- and two-sided) are reported so the choice is visible.
Frequently asked questions
Is p the probability the null is true?
No. It is the probability of data at least this extreme, computed assuming the null is true. It says nothing directly about the hypothesis — only about the data under it.
My p is 0.06 — did I waste the experiment?
No: report the effect size and confidence interval alongside. Non-significance is weak evidence of absence, and the CI shows whether an important effect was ruled out or merely not pinned down.
中文说明
单样本与双样本 t 检验,p 值精确计算:统计量是信号除以噪声 (x̄ − μ₀)/(s/√n),p 值是 t 分布在你自由度下的双侧尾部面积。
双样本模式默认用方差不等时的 Welch 检验——合并方差版本只有在两组方差接近时才可靠,Welch 是现代统计推荐的诚实默认。单侧与双侧结果都给出,让方向选择摆在明面上。
常见问题
p 是“原假设为真”的概率吗?
不是。它是在假定原假设为真的前提下,出现至少这么极端数据的概率。它直接说的是数据在假设下的表现,不是假设本身。
p = 0.06,实验白做了吗?
没有:把效应量与置信区间一起报告。不显著对“没有效应”只是弱证据,置信区间能看出是排除了重要效应、还是只是没测准。