SPSS command: SPSS BAYES RELATED
Bayesian paired-samples t test in your browser
The Bayesian paired-samples test weighs the evidence that the mean difference between two related measurements is zero against the evidence that it is not, and describes the plausible size of that difference.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS BAYES RELATED procedure on your device for any number of variable pairs, with the same Bayes factor methods and nine posterior priors as the one-sample procedure.
- Whether the before–after (or left–right, rater A–rater B) difference is supported as real, as zero, or neither, through BF10 and BF01.
- The posterior distribution of the mean difference, so you can state a 95% probability range for the true change.
- The means of both variables, the mean and SD of the differences, and the classical paired t test side by side.
When to use it
Use it when
- The same respondents measured twice, such as satisfaction before and after a service change.
- Matched pairs or two ratings of the same item where each row holds both values.
- A small pilot where you want to know whether the evidence already favours "no change" before collecting more data.
Use something else when
- The two scores come from different people: use Bayesian independent samples.
- Three or more repeated measurements: use Bayesian repeated-measures ANOVA.
- Ordinal ratings or differences with heavy outliers: consider the Wilcoxon signed-rank test.
How to run it in Crosstabs
- 01
Open your data
Open a file with one row per person and both measurements as columns, then switch to Statistics mode.
- 02
Build the pairs
In the Bayesian statistics group choose Bayesian paired samples. Pick a First variable and a Second variable and press Add pair; repeat for more pairs. The difference is first − second.
- 03
Set the Bayes factor
Under Bayes factor keep Method = JZS (Rouder), Cauchy scale 1, or choose Fixed g, unknown variance or Known variance and enter g.
- 04
Choose the posterior prior and interval
Under Prior for the posterior keep Diffuse or choose a Jeffreys, conjugate or known-variance prior, and set Credible interval (%).
- 05
Run
Declare an active workspace weight as a frequency weight or run unweighted, then press Run Bayesian paired-samples inference. Each pair uses the rows where both values are valid.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
18 synthetic participants measured twice: typing speed in words per minute before and after a short training course. Each person's two scores share a seeded skill level, so the measurements are correlated as real paired data are.
| Pair | N | Mean (first) | Mean (second) | Mean difference | Std. Deviation | BF01 | BF10 | t | df | Sig. (2-tailed) |
|---|---|---|---|---|---|---|---|---|---|---|
| after - before | 18 | 42.27 | 40.17 | 2.11 | 3.98 | 0.668 | 1.496 | 2.245 | 17 | .038 |
Difference = after − before; JZS prior, Cauchy scale 1.
| Pair | Posterior mode | Posterior mean | Posterior variance | 95% CrI lower | 95% CrI upper |
|---|---|---|---|---|---|
| after - before | 2.106 | 2.106 | 1.1500 | −0.022 | 4.233 |
Diffuse prior; equal-tailed credible interval.
How to read it
Typing speed went from 40.2 to 42.3 words per minute, a mean change of 2.11 (t(17) = 2.25, p = .038). The Bayes factor shows anecdotal evidence for the alternative (BF10 = 1.496). The posterior puts 95% of its probability on a true change between −0.02 and 4.23 words per minute. Here p falls below .05 while the Bayes factor stays weak and the interval still reaches zero: a familiar case where a significant p value overstates the evidence.
Output tables explained
- Bayes Factor Related Sample T-Test
- Per pair: N, mean of the first and second variable, mean difference, SD and standard error of the differences, BF01, BF10, t, df and two-tailed significance.
- Posterior Distribution Characterization for Related-Sample Mean
- Posterior mode, mean, variance and credible interval for the mean difference; the plot shows prior and posterior for each pair.
Assumptions and notes
- Pairs are independent of one another, and the differences are roughly normal.
- Both measurements are on the same scale, so their difference is meaningful.
- Rows with a missing value in either variable are dropped for that pair only.
How the results are validated
Checked against R BayesFactor 0.9.12.4.8 ttestBF(paired = TRUE, rscale = 1), agreeing to a relative 1e-8, and pingouin's paired Bayes factor to 1e-7; the t statistic matches the Python reference to 1e-12 and the credible limit under the diffuse prior to 1e-9. Validation evidence
Questions
Is this just a one-sample test on the differences?
Yes. As in SPSS, each pair is reduced to first − second and tested against 0 with the one-sample machinery, so the Bayes factor methods and priors are the same.
Why is the Cauchy scale 1 and not 0.707?
The JZS option uses a Cauchy(0, 1) prior on the standardized effect, the SPSS definition. JASP and BayesFactor default to √2/2, which gives somewhat larger BF10 for modest effects, so values from those tools can differ.
The p value is below .05 but BF10 is only about 1.5. Which is right?
Both are computed correctly; they answer different questions. A BF10 near 1.5 says the data barely discriminate between the hypotheses, so the effect needs more data before it is convincing.
Can I test several pairs at once?
Yes. Add as many pairs as you need; each gets its own row in both tables and its own plot.
Related procedures
- Paired-Samples T TestT-TEST PAIRS
- Bayesian One-Sample InferenceBAYES ONESAMPLE
- Bayesian Repeated-Measures ANOVABAYES REPEATED
- Wilcoxon Signed-Rank TestNPAR TESTS /WILCOXON
- Bayesian Independent SamplesBAYES INDEPENDENT
- Free SPSS alternative: full coverage list
Run Bayesian Paired Samples on your own data
Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.
SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.