SPSS command: SPSS CTABLES /COMPARETEST TYPE=MEAN
Means, medians and column means tests in banner tables
CTABLES summary statistics put a scale variable's mean, median, spread and counts under each banner column of a table, and COMPARETEST TYPE=MEAN marks which column means differ.
Free · No account · Files stay on your device · Updated 18 October 2026
What it tells you
In Crosstabs you add these rows from the Summary stats control in Table mode or from the Table designer in a tab book; the column means test uses pooled or pairwise variance, Bonferroni, Holm or Benjamini–Hochberg adjustment, and letters that stay in every export.
- The level of a rating, spend or age in each banner column: mean, median, mode and any percentiles you list, next to the Total column.
- How spread out the values are per column: standard deviation, variance, standard error of the mean, minimum, maximum and range.
- How much of the total each column contributes (sum and row % of sum), and how many answers the figures rest on (valid N and total N, which also counts missing answers).
- Which column means are significantly higher than which others: each mean carries the letters of the columns it beats, uppercase at the strict level and lowercase at the looser level.
When to use it
Use it when
- A tracker or tab book where every banner (region, age band, segment) needs the mean score of a rating question beneath the category percentages.
- Reporting medians and quartiles of skewed measures such as spend or time, column by column.
- Flagging, in a client-ready table, which banner columns have a higher mean than others, with the same letters as the column proportions test.
Use something else when
- You need an overall test of whether any group mean differs, effect sizes or post hoc confidence intervals: CTABLES has no omnibus test, so use one-way ANOVA or Compare Means.
- Data with sampling weights or a stratified, clustered design: the summary rows give weighted point estimates only and the means test is withheld, so use Complex Samples Descriptives or GLM for design-based standard errors.
- More than 12 banner columns: the column means test is limited to 12 columns, so split the banner or compare the groups in Statistics mode.
- A categorical rating you want as a distribution: show the category percentages and the column proportions test instead of a mean.
How to run it in Crosstabs
- 01
Build the table in Table mode
Open your file in the workspace, switch to Table mode and assign a Row and a Col variable. The column variable is the banner the summary rows are split by.
- 02
Open Summary stats and pick the scale variable
Click Summary stats (Σ) in the table toolbar and choose a numeric variable under Scale variable; the weight variable is not offered. Mean, Std. deviation, Std. error of mean and Valid N are ticked by default with the column means test on.
- 03
Choose statistics and percentiles
Under Statistics, tick any of Mean, Median, Mode, Std. deviation, Variance, Std. error of mean, Minimum, Maximum, Range, Sum, Row % of sum, Valid N and Total N. Type extra percentiles in Percentiles (comma-separated), for example 25, 75.
- 04
Set the column means test
Under Column means test choose All columns (variance pooled across every column, the SPSS default), Each pair (variance from the two compared columns only) or Off. In Table mode the test uses 95% and 90% tiers, Bonferroni and a minimum base of 30 unweighted respondents; Display → Column comparisons switches between Letters, Arrows, Color and Off.
- 05
Change the correction in a tab book
To use Holm or Benjamini–Hochberg, save the table to a tab book, open Tab book mode (specialist workspace) and edit it in the Table designer: the Summary statistics section holds the same editor, and Base & Tests sets the strict and loose confidence, Multiplicity (Bonferroni, Holm, Benjamini–Hochberg or None), Test minimum base, Test base and Markers.
- 06
Read and export
The block titled Summary statistics: <variable> appears under the category rows, aligned with the banner columns and Total, with its footnotes. The rows, letters and notes are kept in CSV, Excel, PowerPoint, Word and PDF exports.
Worked example
Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.
Data
174 synthetic respondents rate overall satisfaction from 0 to 10; the banner is region (North, Central, South). Scores are drawn from seeded normal distributions, rounded and clipped to 0–10, and each answer has a 6% chance of being "Don't know" (missing; 14 here), so Valid N and Total N differ. Settings match the Table-mode defaults: column means test with variance pooled across all columns, Bonferroni, uppercase letters at p < .05 and lowercase at p < .10, minimum base 30.
| Item | North (A) | Central (B) | South (C) | Total |
|---|---|---|---|---|
| Mean | 6.30 | 6.90 | 7.59 A | 6.89 |
| Median | 6.00 | 7.00 | 8.00 | 7.00 |
| Percentile 25 | 5.00 | 6.00 | 6.00 | 6.00 |
| Percentile 75 | 8.00 | 8.00 | 9.00 | 8.00 |
| Mode | 5.00 | 7.00 | 7.00 | 7.00 |
| Std. deviation | 1.86 | 1.59 | 1.81 | 1.84 |
| Std. error of mean | 0.24 | 0.23 | 0.25 | 0.15 |
| Minimum | 1.00 | 2.00 | 3.00 | 1.00 |
| Maximum | 10.00 | 10.00 | 10.00 | 10.00 |
| Valid N | 61 | 48 | 51 | 160 |
| Total N | 64 | 58 | 52 | 174 |
Letters on the mean mark the columns whose mean is significantly lower (uppercase p < .05, lowercase p < .10, Bonferroni-adjusted). Percentiles use the averaged empirical definition.
| Pair | t | df | p (unadjusted) | Bonferroni | Holm | Benjamini–Hochberg | Bonferroni, each-pair variance |
|---|---|---|---|---|---|---|---|
| A–B: North vs Central | −1.763 | 157 | .080 | .239 | .106 | .080 | .231 |
| A–C: North vs South | −3.860 | 157 | <.001 | <.001 | <.001 | <.001 | <.001 |
| B–C: Central vs South | −1.950 | 157 | .053 | .159 | .106 | .079 | .140 |
t and df use the variance pooled across all columns; the last column re-runs the test with the variance pooled from each compared pair only.
How to read it
South has the highest mean satisfaction (7.59 against 6.89 overall), and 14 "Don't know" answers are excluded from every statistic except Total N. With Bonferroni correction the column means test finds North vs South (adjusted p < .001) significant at p < .05, so South's mean carries the letter A. Holm and Benjamini–Hochberg change the adjusted p values but not which pairs are significant at p < .05. Under Benjamini–Hochberg, North vs Central (adjusted p = .080) and Central vs South (adjusted p = .079) would reach the lowercase 90% tier that Bonferroni does not. Pooling the variance from each pair instead of all columns leaves the conclusions unchanged here.
Output tables explained
- Summary statistics: <variable>
- One row per requested statistic, with one value per banner column and the Total. Percentile rows follow the median. Valid N counts answers with a valid scale value; Total N also counts user- and system-missing ones. Row % of sum is each column's share of the total sum.
- Column means test letters
- On the Mean row, each cell lists the letters (A, B, C…) of the columns whose mean is significantly lower: uppercase below the strict alpha, lowercase below the loose one. Arrows or color can replace the letters.
- Summary notes
- Footnotes state that missing values are excluded and percentiles use the averaged empirical definition, describe the test (variance option, correction, alpha tiers, minimum base), and explain why a test was not run: sampling weights, too many columns, fewer than two testable columns or zero pooled variance.
Assumptions and notes
- The test compares column means with two-sided t tests; with small columns it relies on the scale variable being roughly normal within each column.
- All columns assumes similar variances across columns; when spreads differ, Each pair uses only the two compared columns' variance.
- Columns with a weighted base below 2, or below the test minimum base, are not compared; with All columns the pooled variance still uses every column whose base is at least 2.
- A frequency weight is treated as case counts, with weighted bases rounded for the test; a sampling weight gives weighted point estimates only, without standard errors or the means test.
- Percentiles and the median use the averaged empirical (AEMPIRICAL) definition used by CTABLES, which can differ from FREQUENCIES' default; a tied mode reports the smallest value.
How the results are validated
The summary rows and the column means test are checked against five reference scenarios (unweighted and frequency-weighted; pooled and pairwise variance; Bonferroni, Holm, Benjamini–Hochberg and no adjustment; a column dropped by the minimum base) generated independently with NumPy 2.5.4, SciPy 1.18.1 and statsmodels 0.15.0: averaged_inverted_cdf percentiles, scipy.stats.mode, ttest_ind for pairwise variance, an OLS residual mean square for pooled variance and multipletests for the adjustments. Statistics, t and df agree to a relative tolerance of 1e-10, and raw and adjusted p values to 1e-12. Validation evidence
Questions
What is the difference between All columns and Each pair?
All columns pools the within-column variance across every column with a base of at least 2 (SPSS MEANSVARIANCE=ALLCATS, the default), which gives more degrees of freedom. Each pair uses only the two columns being compared (TESTEDCATS), which is safer when the columns' spreads differ.
Which multiple-comparison correction should I use?
Bonferroni, the default, is the most conservative. Holm controls the same family-wise error but flags at least as many pairs. Benjamini–Hochberg controls the false discovery rate and is the most liberal, suited to large tab books screened for leads.
Why is there no ANOVA p value under the table?
CTABLES reports pairwise column comparisons only, and Crosstabs does the same. For an omnibus F test, Welch's test or effect sizes, run One-Way ANOVA in Statistics mode with the banner variable as the factor.
Why does my median differ from FREQUENCIES?
CTABLES computes percentiles with the averaged empirical definition, while FREQUENCIES defaults to a weighted-average definition. On discrete scores such as 0–10 ratings the two can differ by a fraction of a point.
Why are some columns left without letters?
A column is not compared when its base is below 2 or below the test minimum base (30 unweighted respondents in Table mode). The footnote states the base rule, and the test is withheld entirely with sampling weights or more than 12 banner columns.
Is my data uploaded to compute the means?
No. The table, summary rows and column means test are computed in your browser, and the file is not sent to Crosstabs servers.
Related procedures
- Crosstabs StatisticsCROSSTABS /STATISTICS
- MeansMEANS
- One-Way ANOVAONEWAY
- DescriptivesDESCRIPTIVES
- Complex Samples DescriptivesCSDESCRIPTIVES
- ExploreEXAMINE
- Free SPSS alternative: full coverage list
Run CTABLES Summary Statistics 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.