SPSS command: SPSS BAYES CORRELATION
Bayesian Pearson correlation in your browser
Bayesian Pearson correlation tests whether two scale variables are linearly related and gives a posterior distribution for the population correlation ρ.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS BAYES CORRELATION procedure on your device for every pair of the variables you choose, computing the posterior moments and the highest-density interval by deterministic quadrature rather than sampling.
- For every pair, the Bayes factor for a correlation (BF10) against no correlation (BF01).
- The posterior mode, mean and variance of ρ and a highest-density interval: the narrowest range holding the chosen probability.
- Positive evidence that two variables are unrelated, when BF01 is large.
When to use it
Use it when
- Two or more scale variables whose pairwise linear association you want to quantify, such as study time and grades.
- Replication studies where demonstrating the absence of a correlation matters as much as finding one.
- Small samples where a credible interval for ρ communicates uncertainty better than a p value.
Use something else when
- Ordinal or heavily skewed variables: the classical Spearman correlation is more appropriate.
- You need to control for a third variable: use partial correlation or Bayesian linear regression.
- The relationship is clearly curved: Pearson's ρ only measures linear association.
How to run it in Crosstabs
- 01
Open your data
Open the file, switch to Statistics mode and choose Bayesian Pearson correlation in the Bayesian statistics group.
- 02
Choose the variables
Tick at least two numeric variables under Variables (at least two). Every pair is analysed with its own complete cases.
- 03
Pick the Bayes factor
Choose JZS (Wetzels & Wagenmakers) or Fractional (Kang et al.) and, for the fractional factor, set Fraction b between 0 and 1.
- 04
Set the prior on ρ
Under Prior on ρ keep Uniform (c = 0), choose Jeffreys-type (c = −1.5), or enter a Custom c; the prior is proportional to (1 − ρ²)^c.
- 05
Run
Set Credible interval (%), declare any workspace weight, and press Run Bayesian correlation.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
30 synthetic students with weekly study hours, an exam score built to rise with study time, and commute minutes generated independently of both, all from a fixed seed.
| Pair | N | Pearson correlation | BF10 | Posterior mean | 95% HDI lower | 95% HDI upper |
|---|---|---|---|---|---|---|
| study × exam | 30 | 0.485 | 5.482 | 0.442 | 0.153 | 0.710 |
| study × commute | 30 | −0.113 | 0.168 | −0.101 | −0.439 | 0.243 |
| exam × commute | 30 | 0.072 | 0.152 | 0.064 | −0.280 | 0.405 |
JZS Bayes factor of Wetzels & Wagenmakers (2012); uniform prior on ρ (c = 0).
How to read it
Study hours and exam score correlate at r = 0.485, with moderate evidence for the alternative (BF10 = 5.482); the 95% highest-density interval for ρ is 0.153 to 0.710. For study hours and commute time (r = −0.113) the factor gives moderate evidence for the null (BF01 = 5.940) — a Bayes factor below 1 is positive evidence for no correlation, which a non-significant p value cannot provide.
Output tables explained
- Bayesian Pearson Correlations
- One row per pair: N, Pearson correlation, BF01, BF10, posterior mode, mean and variance of ρ, and the lower and upper bounds of the highest-density interval. Footnotes name the Bayes factor, the prior exponent c and the pairwise missing-value rule.
- Prior and posterior of ρ
- A plot per pair overlays the prior and posterior density of ρ; a selector switches between pairs.
Assumptions and notes
- Each pair of variables is roughly bivariate normal and linearly related.
- Cases are independent; missing values are excluded pair by pair, so N can differ between rows.
- No Bayes factor or posterior is reported when |r| = 1, and the fractional factor needs b × N > 1.
How the results are validated
For every pair of a three-variable reference dataset, the JZS factor matches 30-digit mpmath quadrature to a relative 1e-8 and pingouin's bayesfactor_pearson(method = "wetzels") to 1e-7; posterior mode, mean, variance and interval bounds match the mpmath reference to 1e-8 under the uniform and c = −1.5 priors, and the fractional factor matches to 1e-8. Validation evidence
Questions
Why a highest-density interval instead of an equal-tailed one?
The posterior of ρ is skewed when the correlation is far from zero, so the highest-density interval is the narrowest range with the chosen probability and never excludes a more probable value in favour of a less probable one.
Will my numbers match SPSS exactly?
The Bayes factors use the same formulas. For the posterior, SPSS samples from a Fisher-z approximation, while Crosstabs integrates the posterior density directly, so posterior summaries can differ slightly from SPSS output in the later decimals.
What does the prior exponent c do?
With c = 0 every value of ρ between −1 and 1 is equally likely a priori. Negative c puts more weight near ±1; positive c concentrates the prior around zero. It affects the posterior, not the Bayes factor.
Can I get Spearman or Kendall correlations here?
No. This procedure covers Pearson's ρ only. Use Bivariate Correlations for Spearman's rho and Kendall's tau-b.
Related procedures
- Bivariate CorrelationsCORRELATIONS
- Partial CorrelationPARTIAL CORR
- Bayesian Linear RegressionBAYES REGRESSION
- Bayesian One-Sample InferenceBAYES ONESAMPLE
- Free SPSS alternative: full coverage list
Run Bayesian Pearson Correlation 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.