bayesplain.core.normal_t.log_bayes_factor_ttest

bayesplain.core.normal_t.log_bayes_factor_ttest(t, n_effective, df, scale=0.707)[source]

Log JZS Bayes factor for a t statistic.

Parameters:
t : float

The t statistic.

n_effective : float

Sample size entering the effect-size scaling: n for a one-sample or paired test, n1 * n2 / (n1 + n2) for two independent samples.

df : float

Degrees of freedom: n - 1 or n1 + n2 - 2.

scale : float, default 0.707

Width of the Cauchy prior on standardised effect size. Larger values spread prior mass over bigger effects, which costs the alternative when the observed effect is small.

Returns:

log(BF10). Positive favours a difference; negative favours none.

Return type:

float

Notes

The integrand is evaluated relative to the null likelihood so that it stays near unity regardless of t and df, which keeps the quadrature stable for large samples.