When one does a kstest in matlab and the h=0, what does that mean? The null hypothesis has failed? What about when h=1?

 Réponse acceptée

Adam Danz
Adam Danz le 4 Oct 2018
Modifié(e) : Adam Danz le 4 Oct 2018
When in doubt, use help()
help kstest
kstest Single sample Kolmogorov-Smirnov goodness-of-fit hypothesis test.
H = kstest(X) performs a Kolmogorov-Smirnov (K-S) test to determine if
a random sample X could have come from a standard normal distribution,
N(0,1). H indicates the result of the hypothesis test:
H = 0 => Do not reject the null hypothesis at the 5% significance
level.
H = 1 => Reject the null hypothesis at the 5% significance
level.
The null hypothesis depends on your inputs. Again, from the documentation using doc(ktest):
Test the null hypothesis that the data comes from a normal distribution with
a mean of 75 and a standard deviation of 10. Use these parameters to center
and scale each element of the data vector since, by default, kstest tests for
a standard normal distribution.
x = (test1-75)/10;
h = kstest(x)

2 commentaires

no one
no one le 4 Oct 2018
Thanks!
Adam Danz
Adam Danz le 4 Oct 2018
Glad it was helpful.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by