24小时热门版块排行榜    

北京石油化工学院2026年研究生招生接收调剂公告
查看: 2758  |  回复: 9
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

monitor2885

至尊木虫 (职业作家)

队长

[求助] 数据是否符合正态分布

s=[1.43;1.48;1.15;1.57;1.96;3.46;3.49;1.35;2.17;2.4;2.43;2.68;2.38;1.43;1.42;1;1.24;1.59;1.67;1.32;2.43];
kurtosis(s)/std(s)
ans =
    4.0153

百度上说,峰度系数与其标准误的比值用来检验正态性。如果该比值绝对值大于2,将拒绝正态性。但是经过kstest测试,数组s符合正态分布呀。请问,怎么回事?
回复此楼
Retirement
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lijinfeng042

木虫 (小有名气)

Matlab

【答案】应助回帖

★ ★ ★
monitor2885(金币+5): CDF是什么呢? 2011-08-06 11:09:00
臭水沟(金币+3): 谢谢应助~~ 2011-08-06 13:15:17
>> s=[1.43;1.48;1.15;1.57;1.96;3.46;3.49;1.35;2.17;2.4;2.43;2.68;2.38;1.43;1.42;1;1.24;1.59;1.67;1.32;2.43];
>> p_judge(s,0.05)

H1 =

     0


s1 =

    0.3186

该数据源服从正态分布。

H2 =

     0


s2 =

    0.4848

该数据源服从γ分布。

H3 =

     1


s3 =

  4.4963e-004

该数据源不服从泊松分布。

H4 =

     1


s4 =

    0.0011

该数据源不服从指数分布。

phat =

    1.4361


pci =

    1.1841
    1.8253


H5 =

     0


s5 =

    0.1979

该数据源服从rayleigh分布。
>>
进一步的看看
>> [h,p,istat,cv]=lillietest(s,0.05)

h =

     1


p =

    0.0253


istat =

    0.2013


cv =

    0.1877


很明显拒绝原假设;即 数据在0.05的置信水平下不是正态分布;承认原假设的概率为2.53%左右
>> subplot(211)
>> normplot(s)
>> subplot(212)
>> hist(s)

由图形可以明显看出,不服从分布检验的

所以我去查看了kstest 的帮助文档 终于知道为什么了:这个函数本来就不适合做正态分布的检验.原文是:
The Kolmogorov-Smirnov test requires that CDF be predetermined. It is not accurate if CDF is estimated from the data. To test x against a normal distribution without specifying the parameters, use lillietest instead.
工作了,偶尔会上来~可以关注新浪微博 @云是风的梦_Matlab
3楼2011-08-06 09:23:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 10 个回答

lijinfeng042

木虫 (小有名气)

Matlab

【答案】应助回帖


monitor2885(金币+2): 2011-08-06 11:29:09
臭水沟(金币+1): 谢谢应助~~ 2011-08-06 13:15:57
附图
工作了,偶尔会上来~可以关注新浪微博 @云是风的梦_Matlab
4楼2011-08-06 09:40:38
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

monitor2885

至尊木虫 (职业作家)

队长

The Kolmogorov-Smirnov test requires that CDF be predetermined. It is not accurate if CDF is estimated from the data. To test x against a normal distribution without specifying the parameters, use lillietest instead.

给翻译一下呗,CDF啥意思呢?什么情况下kstest可以检测数据是否正态分布?
Retirement
5楼2011-08-06 11:12:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

lijinfeng042

木虫 (小有名气)

Matlab

【答案】应助回帖

★ ★ ★
臭水沟(金币+3): 谢谢应助~~ 2011-08-06 13:19:00
monitor2885(金币+3): 2011-08-06 14:03:38
引用回帖:
5楼: Originally posted by monitor2885 at 2011-08-06 11:12:31:
The Kolmogorov-Smirnov test requires that CDF be predetermined. It is not accurate if CDF is estimated from the data. To test x against a normal distribution without specifying the parameters, use  ...

呃 兄弟不是吧 偶的英语啊 惨不忍睹啊
help kstest 就可以看见具体的了
更进一步的解释是
The function KSTEST by default, performs a two-tailed test. In case of such tests, if the significance level is alpha (0.05 by default), the null hypothesis is rejected if the P-value is less than alpha/2. To account for the tail in the computations, you have to specify the 4th input to the KSTEST function ('tail').
默认的是5%水平的双边检验 在缺省条件下, 如果P值小于α/ 2,零假设被拒绝...CDF啊,那个是一个分布概率啊 你看看kstest的用法就明白了
CODE:
A=A(:);
[mu,sigma]=normfit(A);
p1=normcdf(A,mu,sigma);
[H1,s1]=kstest(A,[A,p1],alpha)

工作了,偶尔会上来~可以关注新浪微博 @云是风的梦_Matlab
6楼2011-08-06 13:16:48
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 一志愿大连理工大学材料求调剂 +5 Gymno 2026-03-30 5/250 2026-03-31 04:18 by fmesaito
[考研] 材料科学与工程调剂 +10 深V宿舍吧 2026-03-30 11/550 2026-03-31 04:12 by fmesaito
[考研] 307求调剂 +18 超级伊昂大王 2026-03-24 20/1000 2026-03-31 01:16 by BruceLiu320
[考研] 070300化学279求调剂 +3 哈哈哈^_^ 2026-03-31 5/250 2026-03-31 01:07 by 拿破龙
[考研] 085602化工求调剂(331分) +8 111@127 2026-03-30 8/400 2026-03-30 21:23 by 研究僧导导
[考研] 085600 286分 材料求调剂 +11 麻辣鱿鱼 2026-03-27 12/600 2026-03-30 19:33 by Wang200018
[考研] 295材料工程专硕求调剂 +10 1428151015 2026-03-27 10/500 2026-03-30 19:00 by 源_2020
[考研] 材料学硕333求调剂 +14 北道巷 2026-03-24 14/700 2026-03-30 18:59 by 源_2020
[考研] 105500药学求调剂,一志愿山东大学药学,348分 +3 gr哈哈哈 2026-03-28 3/150 2026-03-30 18:56 by 源_2020
[考研] 287求调剂 +14 land xuxu 2026-03-26 14/700 2026-03-30 18:38 by 544594351
[考研] 283求调剂(080500) +14 A child 2026-03-27 14/700 2026-03-30 12:06 by 探123
[考研] 311求调剂 +10 lin0039 2026-03-26 10/500 2026-03-30 10:26 by herarysara
[考研] 材料与化工304求B区调剂 +4 邱gl 2026-03-26 7/350 2026-03-30 08:39 by 探123
[考研] 295求调剂 +5 wei-5 2026-03-26 5/250 2026-03-30 08:34 by 探123
[考研] 一志愿南昌大学324求调剂 +5 hanamiko 2026-03-29 5/250 2026-03-29 16:46 by 学员8dgXkO
[考研] 327求调剂 +6 汲亦昊 2026-03-29 6/300 2026-03-29 13:40 by peike
[考研] 315调剂 +4 0860求调剂 2026-03-26 5/250 2026-03-27 11:23 by wangjy2002
[考研] 材料求调剂 +5 .m.. 2026-03-25 5/250 2026-03-27 11:08 by 不吃魚的貓
[硕博家园] 北京林业大学硕导招生广告 +6 kongweilin 2026-03-26 8/400 2026-03-27 10:18 by FF_16
[考研] 求b区院校调剂 +4 周56 2026-03-24 5/250 2026-03-25 17:12 by yishunmin
信息提示
请填处理意见