pairs with difference k Algorithm

Specific methods for carrying out paired difference tests are, for normally distributed difference t-test (where the population standard deviation of difference is not known) and the paired Z-test (where the population standard deviation of the difference is known), and for differences that may not be normally distributed the Wilcoxon signed-rank test. In statistics, a paired difference test is a type of location test that is used when comparing two sets of measurements to assess whether their population means differ.

pairs with difference k source code, pseudocode and analysis