I have some matlab code given from my advisor at university to check if my data is normal distributed:
test_cdf = makedist('tlocationscale','mu',mean(data),'sigma',std(data),'nu',1); [h,p] = kstest(data,'CDF',test_cdf) % h = 0, p = 0.2131
From this he is concluding that the data is NOT normal distributed. I do not understand his reasoning, but he expects me to understand it on my own and I have to write about and explain it. Hours of googling did not help me. :-/
What I understand is that p > 0.05, consequently the null hypothesis cannot be rejected, that is why h = 0. Null hypothesis in this case means that data comes from the Student's t distribution. But why does it mean that data is NOT normal distributed? Is his conclusion correct?
I am especially wondering, since the following seems to imply normal distribution for my data, doesn't it?
test_cdf = makedist('Normal','mu',mean(congru),'sigma',std(congru)); [h,p] = kstest(data,'CDF',test_cdf) % h = 0, p = 0.2952
Thank you very much for your help in advance!
What I can see now is that normal distributed random numbers behave differently with respect to the first code example:
rng(0,'twister'); % normal dist random numbers rnd_data = 4+randn(1,10000); test_cdf = makedist('tlocationscale','mu',mean(rnd_data),'sigma',std(rnd_data),'nu',1); [h,p] = kstest(surdata,'CDF',test_cdf) % h = 1, p = 9.0599e-143
Can it be that rejection of the null hypothesis "data comes from the Student's t distribution" means that the data follows a normal distribution? If yes why?