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?

 채택된 답변

Adam Danz
Adam Danz 2018년 10월 4일
편집: Adam Danz 2018년 10월 4일

1 개 추천

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

no one
no one 2018년 10월 4일
Thanks!
Adam Danz
Adam Danz 2018년 10월 4일
Glad it was helpful.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

질문:

2018년 10월 4일

댓글:

2018년 10월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by