E? Kolmogorov-Smirnov te X ■+■
^ © fil€y//CvUsers/A/Doajments/KSmimov/Kolmogorov-Smunov%20test.ptłf £Q Tf
a x
5- 55 & •••
% Output arguments
% h is the output of the nuli hypcthesis
I nuli hypothesis is that the datJ^is normally distributed % p returns the observed p-value P, ć k the observed Kolraogorov-Smirnov statistic KSSTAT % c the cutoff value CV for determining if KSSTAT is significant
[h,p,k,c] = kstest(Z, [],.05,0)
% here h is the outcome h=0 means we have no reason to reject Ho % here p = 0.6805 (we are testing at 5% ) So we are well over the 5%
% here k = 0.1954
% here the critical value is 0.3754
% The K value .1954 is much less than the CV of .3754 % Plot the empirical cumulative distribution function (cdf) and the % standard normal cdf for a visual comparison. sprintf('We accept the nul hypothesis as h - c"3.2f’,h) sprintf('The returned p value is - fc3.4f'/p)
88 P O m & m & s a \ ~ W <m £ 4» m 16rt)5/2016