[討論] chi2gof的使用
x=load('datain.txt');
[h1,p1,st1] = chi2gof(x,'cdf',@(z)normcdf(z,mean(x),std(x)),'nbins',2);
[h2,p2,st2] = chi2gof(x,'cdf',@(z)normcdf(z,mean(x),std(x)),'nparams',2);
h1 =
0
p1 =
0.9424
st1 =
chi2stat: 0.0052
df: 1
edges: [-334.4347 -106.7901 120.8544]
O: [23 22]
E: [22.7578 22.2422]
h2 =
0
p2 =
NaN
st2 =
chi2stat: 0.0052
df: 0
edges: [-334.4347 -106.7901 120.8544]
O: [23 22]
E: [22.7578 22.2422]
想請問這兩行程式碼中的nbins和nparams差在哪邊?
使用前者p有值,使用後者p則是NaN
跪求幫忙,感恩不盡!!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.13.134.149