kstest and hypothesis rejecting
6 views (last 30 days)
Show older comments
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?
0 Comments
Accepted Answer
Adam Danz
on 4 Oct 2018
Edited: Adam Danz
on 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)
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!