Bayesian T Test Calculator

Test means with Bayesian evidence and transparent priors. Switch designs, inspect diagnostics, and interpret evidence. Export tables, reports, and charts for practical decisions today.

Calculator

Use 0 for no mean difference.
Default prior belief is balanced at 0.50.
Used for the interval around the estimate.

Raw data entry

Separate values with commas, spaces, tabs, or new lines.

Summary statistics entry

Provide n, mean, and standard deviation. Paired mode uses mean and SD of differences.

Example Data Table

Scenario Example Input Suggested Setup
One-sample 12, 15, 14, 16, 18, 17, 13, 19 Null mean = 14, raw data mode
Paired Before: 42, 44, 45, 43, 47
After: 39, 40, 42, 41, 43
Null difference = 0, raw paired mode
Independent groups Group 1: 22, 24, 23, 25, 26
Group 2: 19, 20, 18, 21, 17
Null difference = 0, equal variances first
Summary mode n = 20, mean = 5.4, SD = 1.1 Useful when raw observations are unavailable

Formula Used

This calculator estimates Bayesian evidence from the t statistic by using a BIC-style approximation. It supports one-sample, paired, and independent mean comparisons.

1) t statistic

One-sample: t = (x̄ − μ₀) / (s / √n)

Paired: t = (d̄ − δ₀) / (sd / √n)

Independent equal variances: t = ((x̄₁ − x̄₂) − δ₀) / (sp √(1/n₁ + 1/n₂))

Pooled SD: sp = √((((n₁−1)s₁² + (n₂−1)s₂²) / (n₁+n₂−2)))

Welch mode: t = ((x̄₁ − x̄₂) − δ₀) / √(s₁²/n₁ + s₂²/n₂)

2) Bayes factor approximation

log(BF01) ≈ 0.5 ln(n) − (n / 2) ln(1 + t² / df)

BF10 = 1 / BF01

3) Posterior model probability

Posterior odds = Prior odds × BF10

P(H1 | data) = Posterior odds / (1 + Posterior odds)

4) Interval around the estimate

Estimate ± tcritical × Standard error

The interval and density plot are practical approximations for reporting and visualization.

How to Use This Calculator

  1. Select the correct test design: one-sample, paired, or independent.
  2. Choose raw data mode or summary statistics mode.
  3. Enter the null value you want to test against.
  4. Set the prior probability for H1 if needed.
  5. Adjust the interval level for the estimate summary.
  6. Paste values or enter summary metrics carefully.
  7. Click Calculate Bayesian Evidence.
  8. Review BF10, BF01, posterior probabilities, effect size, and the graph.
  9. Export the output as CSV or PDF when required.

Frequently Asked Questions

1) What does BF10 mean?

BF10 compares evidence for the alternative model against the null model. A value above 1 favors H1. Larger values indicate stronger support for a real mean difference or effect.

2) What does BF01 mean?

BF01 is the reverse comparison. It shows support for H0 relative to H1. When BF01 is larger than 1, the data lean toward the null model.

3) Can I use summary statistics instead of raw values?

Yes. Choose summary mode, then enter sample size, mean, and standard deviation. In paired mode, enter the mean and SD of the paired differences.

4) When should I choose Welch mode?

Choose Welch mode for independent groups when standard deviations or sample sizes differ noticeably. It provides a more flexible standard error and degrees-of-freedom estimate.

5) What is the null value field for?

The null value defines the reference mean or difference under H0. Use 0 for most difference tests, or enter another benchmark when theory requires it.

6) Does a small effect size always mean weak evidence?

No. Evidence strength depends on effect size, variability, and sample size together. A small effect can still receive strong support when the data are precise.

7) Why is there a posterior probability for H1?

It combines your prior belief with the Bayes factor. This gives a direct probability-like summary of how plausible H1 is after seeing the data.

8) What does the Plotly graph show?

The graph shows an approximate smooth density around the estimated parameter. It helps you compare the observed estimate with the null value visually.

Related Calculators

posterior predictive checkbayes rule calculatorbayesian logistic regressiondeviance information criterionprior probability calculatorrandom effects bayesianinverse gamma posteriorconjugate prior calculatorbayesian hypothesis testbayesian cross validation

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.