This tool will perform a two-sample Kolmogorov-Smirnov (K-S) test to evaluate whether a significant statistical difference exists between the frequency distributions of two rasters. The null hypothesis is that both samples come from a population with the same distribution. Note that this test evaluates the two input rasters for differences in their overall distribution shape, with no assumption of normality. If there is need to compare the per-pixel differences between two input rasters, a paired-samples test such as the paired_sample_t_test or the non-parametric wilcoxon_signed_rank_test should be used instead.

The user must specify the name of the two input raster images (`input1` and `input2`) and the output report HTML file (`output`). The test can be performed optionally on the entire image or on a random sub-sample of pixel values of a user-specified size (`num_samples`). In evaluating the significance of the test, it is important to keep in mind that given a sufficiently large sample, extremely small and non-notable differences can be found to be statistically significant. Furthermore statistical significance says nothing about the practical significance of a difference.

## See Also

`KSTestForNormality`, paired_sample_t_test, wilcoxon_signed_rank_test

## Function Signature

`def two_sample_ks_test(self, raster1: Raster, raster2: Raster, output_html_file: str, num_samples: int) -> None: ...`

## Project Links

WbW Homepage User Manual Support WbW