# Kolmogorov–Smirnov test (/docs/analyses/kolmogorov-smirnov)



## When to use it [#when-to-use-it]

The two-sample test asks whether two numeric columns could come from the same distribution. The normality option is an assumption check. On that option Tensr runs Shapiro–Wilk and labels the result `normality_shapiro`. For the Lilliefors correction, use [Lilliefors K-S](/docs/analyses/lilliefors-ks). For Shapiro–Wilk by name, use [Shapiro–Wilk](/docs/analyses/shapiro-wilk).

## Assumptions [#assumptions]

Two-sample mode needs two numeric columns. Normality mode needs one numeric column with at least three values and at most 5000.

## Running it in Tensr [#running-it-in-tensr]

<Steps>
  <Step>
    Analyze → Nonparametric Tests → K-S. In chat: “Kolmogorov–Smirnov test of lecture versus workshop.”
  </Step>

  <Step>
    Test type starts at two_sample. Set it to normality to check one column.
  </Step>
</Steps>

## Options [#options]

<TypeTable
  type="{
  test_type: {
    type: 'two_sample | normality',
    description: 'Two-sample compares two columns. Normality runs Shapiro–Wilk on column A.',
    default: 'two_sample',
  },
  column_a: { type: 'string', description: 'First sample, or the only column in normality mode.' },
  column_b: {
    type: 'string',
    description: 'Second sample. Required for two_sample.',
  },
  decimal_places: {
    type: '0–6',
    description: 'Report output. Decimal places.',
    default: '3',
  },
  apa_format: {
    type: 'boolean',
    description: 'Report output. APA-style p-values.',
    default: 'true',
  },
  include_charts: {
    type: 'boolean',
    description: 'Report output. Shared chart switch.',
    default: 'true',
  },
}"
/>

## Reading the output [#reading-the-output]

Two tutorial groups of 40, each drawn from a normal curve near 70 with the same spread. The columns are the two groups.

No significant difference between the distributions of `score_a` and `score_b` (two-sided K–S: D = 0.1, p = .990; n = 40, 40). Critical D at α = .05 = 0.304. The primary result is not significant (p = .990). This is not large enough to treat the comparison this page is about as a reliable association. The result is non-significant: the data are still compatible with no effect. Metrics: D statistic = 0.1; p-value = .990; n (score\_a) = 40; n (score\_b) = 40; Critical D (α = .05) = 0.304.

## Reporting (APA 7) [#reporting-apa-7]

No significant difference between the distributions of `score_a` and `score_b` (two-sided K–S: D = 0.1, p = .990; n = 40, 40). Critical D at α = .05 = 0.304. This result is not significant (p = .990). Report the estimate with that p, and do not describe the pattern as a reliable effect.

## Coming from SPSS [#coming-from-spss]

Analyze → Nonparametric Tests → 1-Sample K-S, or 2 Independent Samples with the K-S box. SPSS’s one-sample K-S against a normal distribution uses the Lilliefors correction when the mean and SD are estimated from the data. Tensr’s normality option does not. Use Lilliefors K-S for that check.
