Overview

This analysis illustrates how to fit and report a model where the dependent is continuous, and the predictor is a group factor with two levels (e.g., Group A and Group B). That is, this is the Bayesian equivalent for an independent t-test that is used in frequentist analysis.

Here is an example of what you get:

Untitled

Figure X. Group effect. (A) Scatter plot showing the observations for each group. Regression lines are posterior samples denoting uncertainty in the group effect. Black dots represent group expected values with 90% certainty. (B) Posterior distribution for the group effect, including the posterior median and a 90% credible interval.

Reporting (all valid options):

We found a much larger score for Group A (XX, CI90%[ X, X]) compared with Group B (XX, CI90%[ X, X]; median posterior difference = , CI90%, pd = …).

There is a 99.9% probability that, in the population, the average score of group A is between 1 to 2 times larger compared to group B

There is a 99.81% probability that, in the population, the average of group A is larger in 4 to 8 points compared to the average of group B.

There is a 90% probability that, in the population, the average of group A is larger in 5.66 to 7.37 points compared to the average of group B.

We found a statistically significant results suggesting that in the population the average score of group A is larger compared to group B (t(149) = -5.36, p<.001).

Last updated 29-June-2025

Data

You can simulate data using the generative model: