Skip to content
Tutorials Center
My learning

Topics

Lesson 17 of 39 Β· Descriptive Statistics

SPSS Explore: Outliers, Confidence Intervals, Boxplots and Normality Tests

Use SPSS Explore to examine distributions by group: confidence interval of the mean, trimmed mean, outliers, boxplots, stem-and-leaf, Q-Q plots, and Shapiro-Wilk and Kolmogorov-Smirnov tests.

Before you test anything, you should look at the data you are about to test. Explore is the SPSS procedure made for that. For one or more numeric variables, optionally split by a grouping variable, it gives a rich descriptive table, a confidence interval for the mean, the extreme values, several plots and tests of normality. Many later procedures (t tests, ANOVA, regression) assume the data, or the residuals, are roughly normal and free of wild outliers. Explore helps you check.

The dialog

Analyze > Descriptive Statistics > Explore...

  • Dependent List: the numeric variables to examine.
  • Factor List: optional grouping variables. Explore repeats everything for each group, which is ideal for "does the distribution look similar in each group?".
  • Label Cases by: a variable (such as id) used to name outliers in plots.
  • Display: Both, Statistics or Plots.

Statistics...

Option Gives you
Descriptives Mean, confidence interval (default 95%), trimmed mean, median, variance, SD, min, max, range, IQR, skewness, kurtosis
M-estimators Robust measures of center (Huber, Tukey, Hampel, Andrews)
Outliers The five largest and five smallest values with case numbers
Percentiles 5, 10, 25, 50, 75, 90, 95 (Weighted Average, plus Tukey's hinges)

Plots...

  • Boxplots: Factor levels together (one box per group in the same chart) or Dependents together.
  • Descriptive: Stem-and-leaf and Histogram.
  • Normality plots with tests: normal Q-Q plot, detrended Q-Q plot, and the normality tests.
  • Spread vs Level with Levene Test: group-variance checks (see Chapter 5 later).

Options...

Missing Values: Exclude cases listwise (default: a case needs valid data on all dependent variables), Exclude cases pairwise, or Report values (shows missing as a category). The syntax:

TEXT
EXAMINE VARIABLES=score BY group
  /ID=id
  /PLOT=BOXPLOT STEMLEAF HISTOGRAM NPPLOT
  /STATISTICS=DESCRIPTIVES EXTREME(5)
  /CINTERVAL 95
  /MISSING=LISTWISE
  /NOTOTAL.

/NOTOTAL leaves out the overall total when you have a factor.

Reading the Descriptives table

For each variable (and group) you get:

  • Mean with its Std. Error, and the 95% Confidence Interval for Mean (lower and upper bound).
  • 5% Trimmed Mean: the mean after discarding the top and bottom 5% of cases. If it differs a lot from the mean, outliers or skew are pulling the mean.
  • Median, Variance, Std. Deviation, Minimum, Maximum, Range.
  • Interquartile Range: Q3 minus Q1.
  • Skewness and Kurtosis with standard errors.

The confidence interval is a range of plausible values for the population mean. A 95% interval is mean +/- t * SE, where t is the critical value of the t distribution with n - 1 degrees of freedom. It gets narrower as the sample grows.

Python Stand-in: mean, confidence interval and trimmed mean

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The stand-in trims 10% from each end (with only 12 cases a 5% trim would remove nothing). SPSS trims 5% and may treat partial cases slightly differently on small samples, so do not expect the last decimals to match.

Outliers and the boxplot

With Outliers ticked, the Extreme Values table lists the five highest and lowest values, each with a case number (and your label). The boxplot shows them visually. Review cleaning and validating data for the box-length rules: a circle is 1.5 to 3 box lengths beyond the box, an asterisk is more than 3.

A stem-and-leaf plot is a text histogram. The stem is the leading digits and the leaves the last digit of each value, so you can read the actual values.

Questions to ask of a boxplot:

  1. Is the median line in the middle of the box? If not, the distribution is skewed.
  2. Are the whiskers the same length? Unequal whiskers also mean skew.
  3. Are the boxes of different groups of similar height? If not, group variances differ.
  4. Are there outliers, and do they make sense?

Testing normality

Many procedures work best when data (or model residuals) are roughly normally distributed. Check this three ways: look at a histogram, look at the Q-Q plot and read the tests.

Normal Q-Q plot

The plot compares your sorted values to the values a normal distribution would give. If the points fall close to the diagonal line, the data are approximately normal. An S shape means skew, ends that curve away mean heavy tails. The detrended version shows the vertical distance from the line, so patterns are easier to see.

Tests of Normality table

SPSS reports two tests:

  • Kolmogorov-Smirnov with the Lilliefors significance correction, and
  • Shapiro-Wilk, generally more powerful, especially for small and medium samples. It is the one to prefer for n up to a few thousand.

For both, the null hypothesis is that the data are normal:

  • Sig. > .05: no evidence against normality.
  • Sig. <= .05: the data deviate from normal.

Do not read a test in isolation. With a large sample (hundreds of cases), tiny, harmless departures are significant, and with a small sample (below about 20) the tests cannot detect real problems. Use them together with the Q-Q plot and histogram, and remember that for means, the Central Limit Theorem makes many procedures robust once groups are reasonably large.

Python Stand-in: Shapiro-Wilk on normal and skewed data

Press Run (or Ctrl + Enter) to see the result here.

Program input Β· what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The normal sample should pass and the exponential sample should fail, which is what the SPSS table would show with a Sig. below .05 for the skewed variable. The exact numbers depend on the random numbers; the point is the pattern.

What to do about non-normality

  1. Check for errors and outliers first.
  2. Large samples (say 30+ per group) make tests of means fairly robust.
  3. Transform the variable (log, square root) with Compute Variable when it is right-skewed, then check again.
  4. Use nonparametric tests (Chapter 5) or bootstrapping, which many SPSS dialogs offer through a Bootstrap button when the module is licensed.
  5. For regression, check residuals, not the raw variable.

By group

Put a categorical variable into Factor List and Explore produces one block of output per group: separate descriptives, boxplots side by side and a normality test per group. That is the right check before a t test or ANOVA, because the assumption applies within groups. If you have a long list of groups, remember that more tests mean more chances for a false alarm.

Common mistakes

  • Reading Sig. < .05 in a normality test as "good".
  • Relying only on the test and ignoring the plot.
  • Checking normality of the whole sample when the test compares groups.
  • Deleting every flagged outlier.
  • Confusing the confidence interval of the mean with the range in which most individual cases fall.

Check your understanding

Quick check Β· 4 questions

of 4 answered You scored / 4 Β· perfect!

  1. 1. In the Shapiro-Wilk test, Sig. = .21. What do you conclude?

    A large Sig. means you cannot reject normality. It is not proof of normality.
  2. 2. Which Explore option lists the five largest and smallest values with case numbers?

    The Outliers option produces the Extreme Values table.
  3. 3. What does a 95% confidence interval for the mean describe?

    It is an estimate of the population mean, not a range for individual values.
  4. 4. Points on a normal Q-Q plot lie close to the diagonal line. What does this suggest?

    Close agreement with the line means the quantiles match a normal distribution.

Summary

  • Explore combines descriptives, confidence intervals, outliers, plots and normality tests, with an optional grouping variable.
  • Compare the mean, trimmed mean and median to detect skew and outliers.
  • Read boxplots for symmetry, spread and flagged cases; use Q-Q plots for shape.
  • Shapiro-Wilk and Kolmogorov-Smirnov (Lilliefors) test normality; Sig. > .05 means no evidence of non-normality, and the tests depend on sample size.
  • If data are far from normal, check errors, transform, use larger samples or choose nonparametric methods.

Next: Crosstabs and Chi-Square