Search code examples
matlabnormalizationnormal-distribution

why my boxcox transformation does not result a normal data?


I am trying to deseasonalize a set of monthly water quality data consisting of 10 years. Since Box-Cox transformation may be required to rectify the anomalies like heteroscedasticity and non-normality of the residuals, I tried to this transformation before deseasonalization. I applied the transformation (boxcox function in MATLAB) on each month data sets separately and I used Kolmogorov-Smirnov test (kstest function in MATLAB) to check if it follows normal distribution. but even after the transformation the p value is very small and the hypothesis of kstest is rejected!! So my question is this: Do I do it the right way (applying the transformation and kstest on each month separately? why I don't get a normal data-set after boxcox? Thanks


Solution

  • Boxcox transforms the data in order to reduce the nonnormality:

    boxcox transforms nonnormally distributed data to a set of data that has approximately normal distribution.

    However, this is unfortunately not the same as that it can take any dataset and transform it to a perfectly normal dataset.

    My guess is that your data is too messy, so even after using boxcox it still cannot pass the kolmogorov-smirnov test.