MATLAB: How to check whether the distribution of the data is a right/left skewed normal distribution using kolmogorov-smirnov test

cdfkolmogorov-smirnov testkstestskewed normal distribution

Hi,
The figure below is the histogram of my data:
I want to check that whether the distribution of my data can be a skewed normal distribution or not.
I have already calculated the mean and standarad deviation of the data, and giving those parameters using "cdf" and a normal distribution:
test_cdf = [negativeData',cdf('Normal',negativeData',mu,sigma)];
h = kstest(negativeData','CDF',test_cdf)
"kstest" rejects the null hypothesis, resulting in h=1.
Would you help me with defining a skewed test_cdf that fits the shape of the data's histogram better?

Best Answer

  • If your data points were positive, they would look like Gamma or Chi-square distribution. Type distributionFitter in the command window and to open the distribution fitter app. There you will have options to easily fit multiple distributions and find the right one.