底辺私立医大を卒業し ..
[2ch|▼Menu]
27:卵の名無しさん
18/05/22 01:24:35.65 pgTq+n72.net
Even if the P value from the first experiment is 0.001, you can be far from sure that the repeat experiment will have a P value less than 0.05.
It turns out that that probability is only 78% or 91%(the two values differ because two methods were used to compute.)
前者のGoodmanの論文はabstractしか入手できず、後者の上記論文でプログラムした。
このスレの趣旨の問題にするとこんな感じ。
帰無仮説:ド底辺シリツ医大の合格者と入学者の偏差値の平均値は等しいが、
無作為抽出比較でp=0.01で棄却された。
この実験での平均値の差が母集団の平均値の差を表していると仮定して同じ実験を繰り返したときに得られるp値が0.05未満になる確率はいくらか?
答. t検定だと77%、(z検定だと73%)
URLリンク(i.imgur.com)
URLリンク(i.imgur.com)
# calculate probability of repeat experiment is significant
p2p2 <- function(p.value,n1=10,n2=10,sd1=1,sd2=1,alpha=0.05){
p=p.value/2 # two.sided comparison
z=qnorm(p)
d.z=z*sqrt(sd1^2/n1+sd2^2/n2) # difference of means by z.test
p2.z=pnorm(-qnorm(alpha/2)+z,lower=FALSE)
df=n1-1+n2-1
t=qt(p,df)
d.t=t*sqrt((1/n1+1/n2)*((n1-1)*sd1^2+(n2-1)*sd2^2)/((n1-1)+(n2-1)))
p2.t=pt(-qt(alpha/2,df)+t,df,lower=FALSE)
data.frame(p2.t,p2.z,d.t,d.z)
}


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

644日前に更新/511 KB
担当:undef