the H and P value of standard normal distribution

14 ビュー (過去 30 日間)
yue li
yue li 2018 年 8 月 28 日
編集済み: yue li 2018 年 8 月 28 日
I computed the pdf of a standard normal distribution, with parameters µ equal to 0 and σ equal to 1.
I used lillietest to test whether the norm data is normal distribution or not. Since norm is standard normal distribution, it should has H value=0. Why the H value=1, and p value is 0.0012?
Thanks in advance!
x = [-3:.1:3];
norm = normpdf(x,0,1);
>> [H,P,KSSTAT,CV]=lillietest(norm)
H =
P =
CV =


Brendan Hamm
Brendan Hamm 2018 年 8 月 28 日
The lillietest tests the null hypothesis that the data comes from a normal distribution against the alternative that it does not. You are not passing in data from a normal distribution, but rather the density function values at specified value of the random variable.
data = randn(100,1)
[H,P,KSSTAT,CV] lillietest(data)
  1 件のコメント
yue li
yue li 2018 年 8 月 28 日
編集済み: yue li 2018 年 8 月 28 日
Hello, Brendan Hamm,
Thank you so much for your great help!
I am taking the mean and std of the values on the y axis of the pdf, not the x axis, which is a fairly meaningless statistic.


その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by