The first three modules were mostly about how to think like a Bayesian: priors, likelihoods, posteriors, a traffic light that might be broken, and a tire warranty sign I still don’t trust. In this module we put that thinking to work and run a Bayesian analysis on real data from beginning to end.
You won’t need to write code or do any math by hand. JASP handles the computation, and your job is mostly to tell it which column is which and then make sense of what comes back. If you’ve used a spreadsheet before, you already have the technical background this module requires.
If you landed here without reading Modules 1 through 3, you can still follow along. I’ve tried to explain everything you need on this page, and I link back to the earlier modules where the longer explanations live.
You’ll need a computer running Windows, macOS, or Linux. Chromebooks can run JASP too with a little extra setup (the download page has instructions), but it’s a desktop program, so phones and tablets won’t work.
You’ll also need JASP itself. JASP is a free, open-source statistics program developed at the University of Amsterdam. If you’ve used SPSS, it will feel familiar, but it costs nothing, and it offers Bayesian versions of most analyses right alongside the classical ones. You can download it from the JASP website: https://jasp-stats.org/download/
The installer is large, so you may want to start the download now and keep reading while it finishes. Once JASP is installed, the rest of this module takes about ten minutes.
Note on Versions
I wrote this tutorial using JASP 0.99. JASP updates a few times a year, and buttons sometimes move or get renamed between versions. If a step doesn’t match your screen exactly, look for the closest label; the analysis itself works the same way.
JASP comes with a library of example datasets, and we’ll use one of them, called Directed Reading Activities.
A teacher believed that a set of directed reading activities would improve elementary students’ reading ability. One class of 21 students did the activities for eight weeks (the Treat group), and a comparison class of 23 students followed the same curriculum without them (the Control group). At the end, all of the students took the same standardized reading test (the DRP). The data appear in several statistics textbooks, including Moore, McCabe, and Craig (2012).
Before any scores were collected, the teacher had a specific prediction: the students who did the reading activities would score higher than the comparison class. That prediction sets up the two hypotheses we’ll compare:
Because this H1 predicts a direction, it’s called a one-sided (or directional) hypothesis. A two-sided hypothesis would predict only that the groups differ, without saying which one comes out ahead. Which kind you test should come from what you predicted before seeing the data, and we’ll look at why that matters near the end of Section 4.
A classical t-test would give us a p-value. As we discussed in Module 1, a p-value tells you how surprising the data would be if H0 were true, but it can’t tell you how strongly the data support either hypothesis. The Bayesian t-test asks a different question: which hypothesis did a better job of predicting the data we actually observed, and by how much? The answer is a number called the Bayes factor, and most of this module is about how to interpret it.
Open > Data Library > 2. T-Tests, with Directed Reading Activities at the top of the list.
The data open in a spreadsheet view with one row per student. Two columns matter for our analysis: group, which records whether each student was in the Control or Treat class, and drp, which holds each student’s reading score. You’ll also see id, a student number, and g, which stores the group as a number. You can ignore both.
The T-Tests menu. Choose Independent Samples T-Test under Bayesian, not Classical.
“Independent samples” means the two groups are made up of different people. If you had measured the same people twice, for example before and after the activities, you would choose the Paired Samples T-Test instead.
An options panel opens on the left, with your variables listed in a box at the top.
drp into the Dependent Variables box. This is the outcome you measured.group into the Grouping Variable box. This is the variable that divides the students into two groups.
drp in Dependent Variables and group in Grouping Variable. The results table on the right appears right away, still using the default two-sided test.
As soon as both variables are in place, a results table appears on the right. JASP recalculates its output automatically whenever you change an option, so with those two drags you’ve technically already run your first Bayesian t-test. You beautiful thing. We still need to tell JASP about the teacher’s prediction, though, so hold off on reading the results for now.
By default, JASP tests a two-sided hypothesis. To test the teacher’s directional prediction instead:
Alternative Hypothesis set to Group 1 < Group 2.
JASP orders the groups alphabetically, so Group 1 is Control and Group 2 is Treat. “Group 1 < Group 2” therefore says that the Control group’s average is lower than the Treat group’s, which is the teacher’s prediction.
By default, JASP reports only the Bayes factor. To get the rest of the output we’ll be interpreting, check these options in the right-hand column of the options panel:
The finished setup, with the results updating on the right.
The Descriptives table summarizes each group:
Control: N = 23, mean 41.52, SD 17.15. Treat: N = 21, mean 51.48, SD 11.01.
JASP also shows each group’s standard error, coefficient of variation, and a credible interval for each group’s mean. You can ignore those columns for now.
On average, the students who did the reading activities scored about 10 points higher than the control class, which is the direction the teacher predicted. Scores within each group vary quite a bit, though, and the classes are small, so the means alone can’t tell us whether a 10-point gap reflects a real effect of the activities or ordinary variation between two classrooms. The Bayes factor is how we weigh that question.
The main results table reports:
BF-0 = 4.328. The note under the table confirms which direction you tested.
The subscript names the two hypotheses being compared. The “−” stands for the one-sided hypothesis that Group 1’s average is lower than Group 2’s (our H1), and the “0” stands for the null. A value of 4.328 means that the observed data are about 4.3 times more likely if the reading activities improved scores than if they had no effect.
If your table shows BF10 instead, go back and check the Alternative Hypothesis setting from Step 4. BF10 is the label JASP uses for the two-sided version of the test.
Written as a formula, the Bayes factor is the probability of the observed data under one hypothesis divided by its probability under the other:
BF10 = P(Data | H1) / P(Data | H0)
These are the same P(Data | Hypothesis) terms you met as likelihoods in Module 2. Because H1 allows a whole range of possible effect sizes, JASP averages that probability over the prior for the effect size, which is why the choice of prior matters (more on that in the robustness check below). BF-0 is the same ratio with the one-sided hypothesis on top.
Because the Bayes factor is a ratio of how well two hypotheses predicted the data, a value of 1 means the data don’t favor either one. Values above 1 favor H1, and values below 1 favor H0. That second possibility is one of the most useful features of the Bayes factor. A p-value can never provide evidence that an effect is absent; a non-significant result only means you failed to reject the null. A Bayes factor, on the other hand, can show that the data are, say, eight times more likely if there is no effect, and that is a finding you can report (Wagenmakers et al., 2018).
Researchers often use the following labels, adapted by Lee and Wagenmakers (2013) from categories proposed by Harold Jeffreys (1961), to describe the strength of a Bayes factor:
| Bayes factor | Evidence for H1 |
|---|---|
| 1 to 3 | Anecdotal (barely worth mentioning) |
| 3 to 10 | Moderate |
| 10 to 30 | Strong |
| 30 to 100 | Very strong |
| Over 100 | Extreme |
For evidence favoring the null, the same labels apply to the reciprocal: a Bayes factor of 1/3 (about 0.33) is moderate evidence for H0, a Bayes factor of 1/10 is strong evidence for H0, and so on.
On that scale, our Bayes factor of 4.3 counts as moderate evidence that the reading activities improved scores.
Note on Labels
Treat these labels as rough guides. Many statisticians argue that p = .05 shouldn’t be treated as a dividing line either. In 2016 the American Statistical Association issued a formal statement warning against drawing conclusions based on whether a p-value crosses a threshold (Wasserstein & Lazar, 2016), and a 2019 editorial in its journal went further, arguing that researchers should stop using the phrase “statistically significant” altogether (Wasserstein et al., 2019). Bayes factors can fall into the same trap. If “BF10 > 3” becomes the new requirement for publication, we will have rebuilt the incentives behind the problems we discussed in Module 1: results sorted into “worked” and “didn’t work,” analyses adjusted until they clear the bar, and weaker results left in the file drawer. A Bayes factor of 2.9 tells you practically the same thing as one of 3.1. Report the actual number and describe what it means, so your readers can judge the strength of the evidence for themselves.
Scroll down to the prior and posterior plot.
The prior (dashed) and posterior (solid) for the one-sided test. The two gray dots mark how high each curve is at zero (no effect). The prior is about 4.3 times higher there than the posterior, which is another way of seeing the Bayes factor.
The plot shows two curves describing beliefs about the effect size, which is the difference between the groups expressed in standard deviation units. JASP calculates the difference as Group 1 minus Group 2 (Control minus Treat), so the effects we predicted, where the Treat group scores higher, show up as negative numbers. An effect size of zero means no difference.
This is the same kind of updating you worked through by hand in Module 2 and explored with the interactive examples in Module 3. The difference is that JASP updates an entire distribution of possible effect sizes at once, which is the part that would require calculus if you tried to do it yourself.
Above the plot, JASP reports the posterior median, about −0.58, and a 95% credible interval running from about −1.18 to −0.09. A credible interval has the interpretation that many people mistakenly give to a confidence interval: given the data and the prior, there is a 95% probability that the true effect size lies within this range. In everyday terms, the activities most plausibly raised scores by somewhere between about a tenth of a standard deviation and a little over one standard deviation, with a bit more than half a standard deviation as the single best estimate.
That interval is quite wide. It’s consistent with a large effect, but also with a fairly small one. With only 44 students in the study, that much uncertainty is to be expected.
Note: Credible Intervals vs. Confidence Intervals
A 95% credible interval means what it sounds like: given the data and the prior, there is a 95% probability that the true value lies inside it. A 95% confidence interval from a classical analysis makes a less direct claim. If you repeated the same study many times and calculated a confidence interval each time, about 95% of those intervals would contain the true value. Any single confidence interval either contains the true value or doesn’t, and the method doesn’t give you a probability for the one in front of you. Many people, researchers included, read a confidence interval as if it were a credible interval. A credible interval lets you make the statement they usually want to make.
The plot also includes a small pie chart that displays the Bayes factor visually. Each slice represents one hypothesis, and the larger slice belongs to the hypothesis the data favor. When the two slices are close to the same size, the evidence is weak.
A reasonable objection to any Bayesian analysis is that the result depends on the prior, and someone else might have chosen a different one. The robustness check addresses this concern by rerunning the analysis across a range of prior widths and plotting the Bayes factor for each. Find the Bayes factor robustness check plot.
The Bayes factor across prior widths. The labels on the right side use the same evidence categories as the table earlier in this module.
For these data, the Bayes factor stays between about 3 and 4.5 across most of the prior widths JASP plots, reaching a maximum of about 4.5 at a width of roughly 0.5. It drops toward 1 only for very narrow priors, which assume in advance that any effect must be tiny. The plot also labels two wider alternatives to the default prior, called “wide” and “ultrawide,” and they give Bayes factors of about 3.9 and 3.2. Because the curve is fairly flat, our conclusion doesn’t depend much on the specific prior we used. If the curve instead swung from strong evidence for H1 at one prior width to evidence for H0 at another, you would need to justify your choice of prior carefully and report that sensitivity in your write-up.
Note on the Default Prior
JASP’s default prior on the effect size is a Cauchy distribution (Rouder et al., 2009) with a width (scale) of 0.707. In its two-sided form, it assumes that before seeing the data there’s a 50% chance the effect size falls between −0.707 and 0.707, while leaving some room for larger effects. For a one-sided test like ours, JASP keeps only the half of the distribution on the predicted side, so the prior says there’s a 50% chance the effect falls between 0 and −0.707. That’s a reasonable starting point for most research in the behavioral and life sciences. You can change it in the Prior section of the options panel, but the default prior combined with a robustness check is a sound approach for most analyses.
Sometimes you won’t have a directional prediction. Earlier research might point both ways, or you might be exploring a question no one has studied. In that case you would test the two-sided hypothesis, which you can see for these data by setting Alternative Hypothesis to Group 1 ≠ Group 2:
BF10 = 2.217
That’s anecdotal evidence, about half as strong as the one-sided result. The two numbers are related in a simple way. The two-sided H1 spreads its prior across both directions, so half of its prediction is spent on effects in the direction that didn’t happen. The one-sided H1 puts all of its prediction on the side the teacher expected. When the data land on that side, the one-sided hypothesis gets credit for the part of the prediction the two-sided version spent elsewhere:
one-sided BF = two-sided BF * (share of posterior in predicted direction) / (share of prior in predicted direction)
For our data, about 97.6% of the two-sided posterior falls on the predicted side, and the prior had 50% there, so 2.217 * 0.976 / 0.5 = 4.33. Since the posterior share can’t go above 100%, a correct directional prediction can at most roughly double the Bayes factor. A wrong prediction is costly in the other direction. If the teacher had predicted that the activities would lower scores (Group 1 > Group 2), the Bayes factor would be about 0.1, which is moderate evidence against that hypothesis.
This is why the choice between a one-sided and a two-sided test has to be made before you look at the data. If you run both and report whichever produces the larger Bayes factor, you’re using the same kind of analytic flexibility we discussed in Module 1, and the number you report no longer means what it claims to. Decide which hypothesis matches your prediction, test that one, and report it.
Here is an example write-up you can adapt for your own analyses:
A Bayesian independent samples t-test (default Cauchy prior, width = 0.707) tested the prediction that students who completed directed reading activities would score higher than controls. The treatment group (M = 51.48, SD = 11.01) scored higher than the control group (M = 41.52, SD = 17.15). The data were about 4.3 times more likely under the hypothesis that the activities improved scores than under the null hypothesis, BF-0 = 4.33, which is moderate evidence for an effect. The posterior median effect size was δ = −0.58, 95% credible interval [−1.18, −0.09], where negative values indicate higher scores in the treatment group. A robustness check showed that this conclusion held across a wide range of prior widths.
The JASP team’s reporting guidelines (van Doorn et al., 2021) are a good model to follow. A complete write-up should include the hypothesis you tested (including its direction), the test and prior you used, the descriptive statistics for each group, the Bayes factor along with a plain-language interpretation, the effect size estimate with its credible interval, and the result of the robustness check.
For your own analyses, you can start from this template and fill in the bracketed parts and the X’s:
A Bayesian independent samples t-test (default Cauchy prior, width = 0.707) tested [the prediction that Group A would score higher than Group B / whether Group A and Group B differ] on [your outcome measure]. Group A (M = X.XX, SD = X.XX) scored [higher / lower] than Group B (M = X.XX, SD = X.XX). The data were about X.X times more likely under the [alternative / null] hypothesis than under the [null / alternative] hypothesis, BF = X.XX, which is [anecdotal / moderate / strong / very strong / extreme] evidence [for an effect / for no effect]. The posterior median effect size was δ = X.XX, 95% credible interval [X.XX, X.XX]. A robustness check showed that this conclusion [held / changed] across a wide range of prior widths.
Label the Bayes factor the way JASP does: BF10 or BF01 for a two-sided test, and BF+0 or BF-0 for a one-sided test. Also remember that JASP’s credible interval is for the effect size (the difference in standard deviation units), not for the raw difference between the group means.
Note: What a Bayes Factor Is Not
A Bayes factor of 4.3 doesn’t mean the odds are 4.3 to 1 that the hypothesis is true. It tells you how much the data should change your beliefs, and where you end up depends on where you started. If you considered both hypotheses equally likely beforehand, a Bayes factor of 4.3 would leave you with about an 81% probability that H1 is true. If you started out skeptical of the reading activities, you would end up less skeptical but possibly still unconvinced. This is Bayes’ theorem again: your prior odds multiplied by the Bayes factor give your posterior odds.
To run this analysis on your own data, set up your file the same way as the example:
Save the file from Excel or Google Sheets in .csv format. In JASP, open the menu, choose Open, then Computer, and browse to your file. From there, follow Steps 2 through 5 above. In Step 4, choose the Alternative Hypothesis option that matches the prediction you made before collecting your data, or leave it at Group 1 ≠ Group 2 if you didn’t predict a direction. Remember that JASP orders your groups alphabetically when you work out which one is Group 1.
Congratulations! If you made it this far, you’ve run a Bayesian analysis on real data and interpreted each part of the output.
You’ve now covered why Bayesian methods are worth learning, how the reasoning works, and how to run an analysis yourself. In Module 5, we’ll look at the many places Bayesian thinking shows up across the life sciences.
JASP Team (2026). JASP (Version 0.99) [Computer software]. https://jasp-stats.org/
Jeffreys, H. (1961). Theory of probability (3rd ed.). Oxford University Press.
Lee, M. D., & Wagenmakers, E.-J. (2013). Bayesian cognitive modeling: A practical course. Cambridge University Press.
Moore, D. S., McCabe, G. P., & Craig, B. A. (2012). Introduction to the practice of statistics (7th ed.). W. H. Freeman.
Rouder, J. N., Speckman, P. L., Sun, D., Morey, R. D., & Iverson, G. (2009). Bayesian t tests for accepting and rejecting the null hypothesis. Psychonomic Bulletin & Review, 16(2), 225-237.
van Doorn, J., van den Bergh, D., Böhm, U., Dablander, F., Derks, K., Draws, T., … Wagenmakers, E.-J. (2021). The JASP guidelines for conducting and reporting a Bayesian analysis. Psychonomic Bulletin & Review, 28, 813-826.
Wagenmakers, E.-J., Marsman, M., Jamil, T., Ly, A., Verhagen, J., Love, J., Selker, R., Gronau, Q. F., Šmíra, M., Epskamp, S., Matzke, D., Rouder, J. N., & Morey, R. D. (2018). Bayesian inference for psychology. Part I: Theoretical advantages and practical ramifications. Psychonomic Bulletin & Review, 25(1), 35-57. https://doi.org/10.3758/s13423-017-1343-3
Wasserstein, R. L., & Lazar, N. A. (2016). The ASA statement on p-values: Context, process, and purpose. The American Statistician, 70(2), 129-133.
Wasserstein, R. L., Schirm, A. L., & Lazar, N. A. (2019). Moving to a world beyond “p < 0.05.” The American Statistician, 73(sup1), 1-19.