SPSS command: SPSS BAYES ONESAMPLE
Bayesian one-sample inference in your browser
Bayesian one-sample inference asks how strongly the data support a test value for a mean, a proportion or a count rate, and what values of that parameter remain plausible.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
Crosstabs runs the SPSS BAYES ONESAMPLE procedure on your device for normal, binomial and Poisson data, reporting BF10 and BF01 next to the classical t test and an equal-tailed credible interval.
- How many times more likely the data are under the alternative than under the test value (BF10), or the reverse (BF01).
- Whether the data actively support the test value — a BF01 above 3 is evidence for the null, which a non-significant p value never is.
- The posterior mode, mean and variance of the mean, proportion or rate, with a credible interval at the level you choose.
- For binary data, the observed proportion of the success category and how the Beta posterior updates the prior.
When to use it
Use it when
- Comparing a scale variable with a benchmark, target or published norm (satisfaction against 7, weight against a label value).
- Testing whether a yes/no rate differs from a reference proportion, such as a 50% preference or a 5% defect rate.
- Count data per unit (complaints per day, errors per page) tested against an expected Poisson rate.
- You want to state evidence for "no difference from the benchmark", not only fail to reject it.
Use something else when
- Two measurements on the same people: use Bayesian paired samples, which tests the mean of the differences.
- Two separate groups compared with each other: use Bayesian independent samples.
- Data collected with a survey design weight: the panel refuses a sampling weight, so use Complex Samples or report unweighted results.
How to run it in Crosstabs
- 01
Open your data
Open a .sav, CSV or Excel file in the workspace and switch to Statistics mode. Nothing is uploaded.
- 02
Pick the distribution
In the Bayesian statistics group open Bayesian one-sample inference and set Distribution to Normal (mean), Binomial (proportion) or Poisson (rate). Then tick the Test variables and enter the Test value, Test proportion or Test rate.
- 03
Set the Bayes factor
For a mean, choose the Method: JZS (Rouder), Cauchy scale 1, Fixed g, unknown variance, or Known variance. For a proportion or rate, set the Null hypothesis to a point value or a Beta/Gamma prior (a0, b0) and give the alternative's a1 and b1.
- 04
Choose the prior for the posterior
Under Prior for the posterior pick one of nine priors for a mean (diffuse, two Jeffreys forms, conjugate and known-variance options) or a preset such as Uniform Beta(1, 1), Jeffreys Beta(0.5, 0.5) or Jeffreys (a0 = 0.5, b0 = 0) for a rate. Binary variables also need Success is: last category, first category, midpoint or a cutoff.
- 05
Run and read
Set Credible interval (%) and press Run Bayesian one-sample inference. If a workspace weight is active, first declare it as a frequency weight or run unweighted. Each test variable uses its own valid cases.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
Two synthetic variables from a fixed seed: rating, a 0–10 checkout score from 24 shoppers tested against a benchmark of 7, and converted, a 0/1 outcome for 40 trial users tested against a proportion of 0.5.
| Variable | N | Mean | Std. Deviation | BF01 | BF10 | t | df | Sig. (2-tailed) |
|---|---|---|---|---|---|---|---|---|
| rating | 24 | 7.88 | 1.17 | 0.038 | 26.076 | 3.664 | 23 | .001 |
JZS prior of Rouder et al. (2009), Cauchy scale 1; test value = 7.
| Variable | Posterior mode | Posterior mean | Posterior variance | 95% CrI lower | 95% CrI upper |
|---|---|---|---|---|---|
| rating | 7.875 | 7.875 | 0.0690 | 7.355 | 8.395 |
Diffuse prior; equal-tailed credible interval.
| Variable | Success | N | Successes | Observed proportion | BF01 | BF10 | 95% CrI |
|---|---|---|---|---|---|---|---|
| converted | 1 | 40 | 11 | 0.275 | 0.086 | 11.600 | 0.161 – 0.429 |
H0: π = 0.5 against H1: π ~ Beta(1, 1); posterior from a uniform Beta(1, 1) prior.
How to read it
The mean rating is 7.88 against the benchmark of 7, t(23) = 3.66, p = .001. The JZS Bayes factor gives strong evidence for the alternative (BF10 = 26.076), and the 95% credible interval for the mean runs from 7.36 to 8.39. For conversion, 11 of 40 users converted (0.275); against π = 0.5 the binomial test gives strong evidence for the alternative (BF10 = 11.600), with the posterior proportion between 0.161 and 0.429.
Output tables explained
- Bayes Factor One-Sample T-Test
- N, mean, standard deviation and standard error, BF01 and BF10, and the classical t, df and two-tailed significance against the test value.
- Posterior Distribution Characterization for One-Sample Mean
- Posterior mode, mean, variance and the equal-tailed credible interval for the mean under the chosen prior; a plot overlays prior and posterior.
- Bayes Factor One-Sample Binomial Test
- The success category, N, number of successes, observed proportion, and BF01/BF10 for the point or Beta null against the Beta(a1, b1) alternative.
- Posterior Distribution Characterization for Binomial Proportion
- The Beta(a + successes, b + failures) posterior summarized by mode, mean, variance and credible interval; an anti-mode or flat posterior is flagged.
- Bayes Factor One-Sample Poisson Test
- N, total count, observed rate and the Bayes factors for the point or Gamma null against a Gamma alternative; the companion posterior table summarizes the Gamma(a + total, b + N) rate.
Assumptions and notes
- Cases are independent draws from one population; a frequency weight must hold whole case counts and counts each case that many times.
- The normal option assumes a roughly normal variable; the Bayes factor is driven by the t statistic, so it shares the t test's sensitivity to outliers in small samples.
- The Poisson option needs non-negative whole-number counts whose mean and variance are similar.
- Bayes factors depend on the alternative's prior: a wider prior on the effect favours the null more, so report the method and settings.
How the results are validated
Checked against an independent Python reference (mpmath 30-digit quadrature of the BAYES formulas, SciPy, pingouin) and R BayesFactor 0.9.12.4.8: the JZS factor matches ttestBF(rscale = 1) to a relative 1e-8 and pingouin to 1e-7; fixed-g, known-variance, binomial and Poisson factors match to 1e-12; posteriors under all nine normal priors match to 1e-11 with credible limits to 1e-9; frequency weights reproduce replicated cases. Validation evidence
Questions
How do I read BF10 and BF01?
BF10 = 5 means the data are five times more likely under the alternative than under the test value; BF01 is its reciprocal. Values between 1/3 and 3 are usually called anecdotal, 3–10 moderate, 10–30 strong.
Why does the Bayes factor disagree with my p value?
A p value just under .05 often corresponds to a Bayes factor near 1–3, because it ignores how plausible the observed effect is under the alternative. In large samples a tiny effect can be significant while the Bayes factor favours the null.
Which prior for the posterior should I choose?
The default Diffuse prior (flat in mean and variance) gives a slightly wider interval than the classical t interval; Jeffreys, p(σ²) ∝ 1/σ² reproduces the classical interval numerically. Use a conjugate normal prior only when you can justify its mean and spread from earlier data.
Which category counts as a success in the binomial test?
By default the last category in sort order, as SPSS does. You can switch to the first category, values at or above the midpoint, or values at or above a cutoff; the output names the success category.
Is my data uploaded?
No. The file is parsed and the Bayes factors are computed in your browser; the data is not sent to Crosstabs servers.
Related procedures
- One-Sample T TestT-TEST
- Bayesian Paired SamplesBAYES RELATED
- Bayesian Independent SamplesBAYES INDEPENDENT
- ProportionsPROPORTIONS
- One-Sample Nonparametric TestsNPAR TESTS
- Free SPSS alternative: full coverage list
Run Bayesian One-Sample Inference 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.