MATLAB: Does KSTEST not reject the null hypothesis when the P-value is less than the significance level in Statistics Toolbox 6.2 (R2008a)

Statistics and Machine Learning Toolbox

The KSTEST is not rejecting the null hypothesis alhough the P-value received is less than the significance level. I have set the significance level of 0.05 and received a P-value of 0.03, but the null hypothesis was not rejected.

Best Answer

The function KSTEST by default, performs a two-tailed test. In case of such tests, if the significance level is alpha (0.05 by default), the null hypothesis is rejected if the P-value is less than alpha/2. To account for the tail in the computations, you have to specify the 4th input to the KSTEST function ('tail').