SPSS command: SPSS NPAR TESTS

One-sample nonparametric tests in your browser

One-sample nonparametric tests compare a single variable with a distribution you specify: equal or custom category shares, a hypothesised proportion, a random sequence, or a normal, uniform, Poisson or exponential curve.

Free · No account · Files stay on your device · Updated 18 October 2026

What it tells you

Crosstabs runs the four classic NPAR TESTS subcommands on your device and reports exact significance where SPSS does.

  • Whether observed category counts depart from equal shares or from expected values you enter (chi-square goodness of fit).
  • Whether the share of cases in group 1 matches a test proportion, with an exact binomial significance.
  • Whether values above and below a cut point (median, mean, mode or your own value) occur in random order.
  • Whether a variable plausibly follows a normal, uniform, Poisson or exponential distribution, via the largest gap D between the empirical and theoretical cumulative curves.

When to use it

Use it when

  • Checking whether a categorical variable (preferred channel, day of week, answer option) is spread evenly or matches known population shares.
  • Testing a yes/no rate against a benchmark, such as a 50% pass rate or a 20% response rate from last year.
  • Screening a scale variable for normality before choosing between a t test and a rank-based test.
  • Checking a sequence recorded in time order (production runs, daily outcomes) for clustering or alternation.

Use something else when

  • Two categorical variables measured on the same cases: use the chi-square test of independence in Crosstabs instead of goodness of fit.
  • Comparing a mean with a target value on roughly normal data: the one-sample t test gives a confidence interval for the difference.
  • Very large samples screened for normality: the K-S test flags trivial departures, so look at a P-P or Q-Q plot as well.

How to run it in Crosstabs

  1. 01

    Open the data in Statistics mode

    Load a .sav, CSV or Excel file in the workspace, switch to Statistics mode and choose Nonparametric tests → One-sample tests (NPAR TESTS).

  2. 02

    Tick the test variables

    Under Test variables, tick one or more numeric variables. Each variable gets its own column in the output; string categories need numeric codes.

  3. 03

    Choose the test

    Under Test pick Chi-square, Binomial, Runs or One-sample Kolmogorov-Smirnov. The options below the choice change with the test.

  4. 04

    Set the test options

    Chi-square: All categories equal or Expected values (one per category in ascending order), optionally Use specified range. Binomial: Get dichotomy from data or a Cut point, plus Test proportion (group 1). Runs: Median, Mean, Mode or Custom cut point. K-S: Normal, Uniform, Poisson or Exponential, with parameters estimated from the data or specified.

  5. 05

    Handle missing values and run

    Choose Exclude cases test-by-test or Exclude cases listwise, then click Run test. A workspace weight must first be declared as a frequency weight; a sampling weight blocks these tests.

Worked example

Computed by the Crosstabs engine from the synthetic data below when this page was built — not typed in.

Try with example data

Data

120 synthetic support tickets with two variables: the contact channel (1 = email, 2 = chat, 3 = phone, 4 = social) drawn with unequal shares, and minutes to first reply drawn from a right-skewed distribution. A fixed seed makes every build identical.

Frequencies: channel
ItemObserved NExpected NResidual
1 Email4630.016.0
2 Chat3130.01.0
3 Phone2630.0−4.0
4 Social1730.0−13.0
Total120
Test Statistics (chi-square)
Itemchannel
Chi-Square14.733
df3
Asymp. Sig..002

0 cells have expected frequencies less than 5. The minimum expected cell frequency is 30.0.

One-Sample Kolmogorov-Smirnov Test
Itemreply
N120
Normal Parameters — Mean26.75
Normal Parameters — Std. Deviation14.08
Most Extreme Differences — Absolute0.137
Most Extreme Differences — Positive0.137
Most Extreme Differences — Negative−0.097
Test Statistic0.137
Asymp. Sig. (2-tailed), Lilliefors<.001

Parameters calculated from the data, so the significance uses the Lilliefors correction.

How to read it

The channel counts differ from an even four-way split: χ²(3) = 14.73, p = .002; the residuals show which channels are over- or under-used. For reply time the largest gap between the sample and a fitted normal curve is D = 0.137, Lilliefors p < .001, so the skewed reply times should be summarized with medians or analysed with rank-based tests.

Output tables explained

Frequencies
For the chi-square test: observed N, expected N and the residual (observed − expected) for every category. Large positive residuals show where the excess lies.
Test Statistics
Chi-square, df and asymptotic significance, with a footnote counting cells whose expected frequency is below 5 and giving the minimum expected frequency.
Binomial Test
Category, N and observed proportion for groups 1 and 2, the test proportion and the exact significance: two-tailed when the test proportion is 0.5, one-tailed otherwise.
Runs Test
Test value, cases below and at or above it, number of runs, Z (continuity-corrected under 50 cases) and both asymptotic and exact two-tailed significance.
One-Sample Kolmogorov-Smirnov Test
Distribution parameters, the most extreme absolute, positive and negative differences, the test statistic D, Kolmogorov-Smirnov Z and its significance. Normal parameters estimated from the data use the Lilliefors correction.

Assumptions and notes

  • Cases are independent; for the runs test their file order must be the order that matters (time or production sequence).
  • Chi-square goodness of fit needs adequate expected counts: the footnote warns when expected frequencies fall below 5.
  • The binomial test needs exactly two observed values, or a cut point that splits the data into two groups.
  • With parameters estimated from the data, the plain K-S significance is too lenient; only the normal case is corrected (Lilliefors, which needs at least 5 cases).

How the results are validated

The one-sample engines are tested against independent reference values computed with SciPy 1.18.1, statsmodels 0.15.0, pingouin 0.7.0 and scikit-posthocs 0.17.1: scipy.stats.chisquare, binomtest and kstest, statsmodels runstest_1samp and lilliefors, with exact runs probabilities from enumeration. Statistics and p-values agree within 1e-9 (relative to the larger of 1 and the reference value); the Smirnov asymptotic p for Kolmogorov-Smirnov Z is held to 2e-6 because it uses the three-term series rather than SciPy's exact kstwobign. A separate test reproduces the Lilliefors interpolation worked example from the IBM SPSS Statistics Algorithms manual (n = 20, D = 0.170, p = 0.1321469). Validation evidence

Questions

How do I enter custom expected proportions for the chi-square test?

Choose Expected values and type one number per category in ascending order of the category codes, separated by commas. Counts, percentages or proportions all work because they are rescaled to the total.

Why is my binomial significance one-tailed?

When the test proportion is not 0.5 the exact significance is the smaller of P(X ≤ n₁) and P(X ≥ n₁), which is one-tailed. With a test proportion of 0.5 the distribution is symmetric and a two-tailed exact value is reported.

Which group is group 1 in the binomial test?

With Get dichotomy from data, group 1 is the first value encountered in file order. With a Cut point, cases at or below the cut point form group 1.

Is the K-S test the same as a Shapiro-Wilk normality test?

No. Both test normality, but Shapiro-Wilk is usually more powerful in small samples. Shapiro-Wilk is reported by Explore (EXAMINE) in Crosstabs; this procedure gives the Lilliefors-corrected K-S test.

Can I test several variables at once?

Yes. Tick several test variables and each becomes a column of the same test table. Choose Exclude cases listwise if every column must use the same cases.

Run One-Sample Nonparametric Tests on your own data

Open a .sav, CSV or Excel file. Everything runs in your browser; the file never leaves your device.

Open the workspace

SPSS is a trademark of IBM Corp. Crosstabs is not affiliated with or endorsed by IBM.