Bayesian Statistics calculator

Bayesian t-test calculator

Calculate Bayes Factor (BF₁₀ / BF₀₁), Cauchy prior scaling, and posterior distribution estimates for two-sample mean comparisons.

Run this test live in StatLab npm i @statlab/core

When to use it

Use when you want to distinguish between "no effect" (evidence for null) vs "insufficient data" (inconclusive).

Required Inputs

  • Group A numeric values
  • Group B numeric values
  • Cauchy prior scale r (e.g. 0.707 medium)

Mathematical Formula

BF₁₀ = p(Data | H₁) / p(Data | H₀), integrated under Cauchy(0, r) prior.

Reporting Cautions

  • Bayes factors are sensitive to the width of the prior scale parameter r.
  • A BF₁₀ between 0.33 and 3.0 represents weak/anecdotal evidence.

Code Snippets (Python, R, TypeScript)

Python (SciPy / Statsmodels)
import pingouin as pg
res = pg.bayesfactor_ttest(t=2.85, nx=30, ny=30, r=0.707)
print(f"BF10 = {res:.4f}")
R Language
library(BayesFactor)
ttestBF(x = group_a, y = group_b)
TypeScript (@statlab/core)
import { bayesFactorT } from '@statlab/core';
const bf = bayesFactorT(groupA, groupB, { r: 0.707 });

Developer Use Cases & Production Integrations

  • Quantifying evidence *in favor of the null hypothesis* (e.g., proving two microservices have indistinguishable latency).
  • Assessing model equivalence in VoxelAssurance AI benchmark regressions.

VoxelPulse Telemetry Control Plane

Continuous A/B testing, statistical telemetry analysis, and automated feedback loops for live backend services.

Explore VoxelPulse →

VoxelAssurance Release Readiness

Fixed-price AI release-readiness sprints, automated regression testing, and reliability statistical benchmarks.

Explore VoxelAssurance →

Related Statistical Test Calculators

Explore static calculators across the StatLab inference engine suite.