SPSS tutorials website header logo SPSS TUTORIALS BASICS ANOVA REGRESSION FACTOR CORRELATION

Confidence Intervals for Means in SPSS

Confidence intervals for means are among the most essential statistics for reporting. Sadly, they're pretty well hidden in SPSS. This tutorial quickly walks you through the best (and worst) options for obtaining them. We'll use adolescents_clean.sav -partly shown below- for all examples.

SPSS Adolescents Data Variable View

Assumptions for Confidence Intervals for Means

Computing confidence intervals for means requires

  1. independent observations and
  2. normality: our variables must be normally distributed in the population represented by our sample.

1. A visual inspection of our data suggests that each case represents a distinct respondent so it seems safe to assume these are independent observations.
2. Second, the normality assumption is only required for small samples of N < 25 or so. For larger samples, the central limit theorem ensures that the sampling distributions for means, sums and proportions approximate normal distributions. In short, our example data meet both assumptions.

Any Confidence Level - All Cases I

If we want to analyze all cases as a single group, our best option is the one sample t-test dialog.

SPSS Analyze Compare Means One Sample T-Test

The final output will include confidence intervals for the differences between our test value and our sample means. Now, if we use 0 as the test value, these differences will be exactly equal to our sample means.

SPSS Confidence Intervals For Means From One Sample T-Test

Clicking Paste results in the syntax below. Let's run it.

*Obtain 99% CI's for means of iq to wellb over all cases.

T-TEST
/TESTVAL=0
/MISSING=ANALYSIS
/VARIABLES=iq depr anxi soci wellb
/CRITERIA=CI(.99).

Result

SPSS Confidence Intervals For Means From One Sample T-Test Output

Any Confidence Level - All Cases II

An alternative -but worse- option for obtaining these same confidence intervals is from Analyze SPSS Menu Arrow Descriptive Statistics SPSS Menu Arrow Explore We'll discuss these dialogs and their output in a minute under Any Confidence Level - Separate Groups II. They result in the syntax below.

*Obtain 95% CI's for means of iq to wellb over all cases.

EXAMINE VARIABLES=iq depr anxi soci wellb
/PLOT NONE
/STATISTICS DESCRIPTIVES
/CINTERVAL 95
/MISSING PAIRWISE /*IMPORTANT!*/
/NOTOTAL.


*Minimal syntax - returns 95% CI's by default.

examine iq depr anxi soci wellb
/missing pairwise /*IMPORTANT!*/.

95% Confidence Level - Separate Groups

In many situations, analysts report statistics for separate groups such as male and female respondents. If these statistics include 95% confidence intervals for means, the way to go is the One-Way ANOVA dialog.

SPSS Analyze Compare Means One Way ANOVA

Now, sex is a dichotomous variable so we compare these 2 means with a t-test rather than an ANOVA -even though the significance levels are identical for these tests. However, the dialogs below result in a much nicer -and technically correct- descriptives table than the t-test dialogs.

SPSS Confidence Intervals Means Via Oneway ANOVA

Descriptives includes 95% CI's for means but other confidence levels aren't available.
Clicking Paste results in the syntax below. Let's run it.

*Obtain 95% CI's for means of iq to wellb by sex.

ONEWAY iq depr anxi soci wellb BY sex
/STATISTICS DESCRIPTIVES .

Result

SPSS Confidence Intervals For Means From One Way ANOVA Output

The resulting table has a nice layout that comes pretty close to the APA recommended format. It includes

As mentioned, this method is restricted to 95% CI's. So let's look into 2 alternatives for other confidence levels.

Any Confidence Level - Separate Groups I

So how to obtain other confidence intervals for separate groups? The best option is adding a SPLIT FILE to the One Sample T-Test method. Since we discussed these dialogs and output under Any Confidence Level - All Cases I, we'll now just present the modified syntax.

*SPLIT FILE -succeeding output is created for males and females separately.

sort cases by sex.
split file layered by sex.

*Obtain 95% CI's for means of iq to wellb.

T-TEST
/TESTVAL=0
/MISSING=ANALYSIS
/VARIABLES=iq depr anxi soci wellb
/CRITERIA=CI(.95).

*Switch off SPLIT FILE for succeeding output.

split file off.

Any Confidence Level - Separate Groups II

A last option we should mention is the Explore dialog as shown below.

SPSS Analyze Descriptive Statistics Explore

We mostly discuss it for the sake of completeness because SPSS’ Explore dialog is a real showcase of stupidity
and poor UX design.
Just a few of its shortcomings are that

For these reasons, I personally only use Explore for

These tests are under Plots -the very last place you'd expect them.

But anyway, the steps shown below result in confidence intervals for means for males and females separately.

SPSS Confidence Intervals For Means Via Examine

Clicking Paste generates the syntax below.

*Obtain 95% CI's for means of iq to wellb for males and females separately.

EXAMINE VARIABLES=iq depr anxi soci wellb BY sex
/PLOT NONE
/STATISTICS DESCRIPTIVES
/CINTERVAL 95
/MISSING PAIRWISE /*IMPORTANT!*/
/NOTOTAL.

*Minimal syntax - returns 95% CI's by default.

examine iq depr anxi soci wellb by sex
/missing pairwise /*IMPORTANT!*/
/nototal.

Result

SPSS Confidence Intervals Means From Examine Output

Bonferroni Corrected Confidence Intervals

All examples in this tutorial used 5 outcome variables measured on the same sample of respondents. Now, a 95% confidence interval has a 5% chance of not enclosing the population parameter we're after. So for 5 such intervals, there's a (1 - 0.955 =) 0.226 probability that at least one of them is wrong.
Some analysts argue that this problem should be fixed by applying a Bonferroni correction. Some procedures in SPSS have this as an option as shown below.

SPSS Bonferroni Correction Example in ANOVA

But what about basic confidence intervals? The easiest way is probably to adjust the confidence levels manually by $$level_{adj} = 100\% - \frac{100\% - level_{unadj}}{N_i}$$

where \(N_i\) denotes the number of intervals calculated on the same sample. So some Bonferroni adjusted confidence levels are

and so on.

Well, I think that should do. I can't think of anything else I could write on this topic. If you do, please throw us a comment below.

Thanks for reading!

Tell us what you think!

*Required field. Your comment will show up after approval from a moderator.

THIS TUTORIAL HAS 7 COMMENTS: