The Kolmogorov-Smirnov is used to test whether or not a
certain sample follows normal distribution. This test is preferred for samples ≥
50. This test can be done by R programming using the following function: “ks.test()”.
We can illustrate this test by numerical examples. In the below figure, we will generate 70 numbers from Poisson distribution with lambada = 3, then we will test the generated data.
In order to perform the test, assume the null hypothesis (Ho):
the data follows normal distribution; however, the alternative hypothesis (H1):
the data does not follow the normal distribution.
Using the ks.test function, as per the below results, it can be seen that P-value (2.2e-16) < 0.05; thus, we neglect (Ho) and accept (H1). We can conclude that the data are not following normal distribution.

We will illustrate the test for the second time by generating 70 numbers following the normal distribution as shown below.
As per the previous example, the data are tested using the
function “ks.test()”. According to the below, the p-value ≥ 0.05.
Thus, the data follows normal distribution.
From the previous, we can conclude that, the Kolmogorov-Smirnov test can be used to check whether the sample or not is following normal distribution. This test is crucial before performing other statistical testing.
0 Comments