高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
1-

802: 04/29(火)21:05 ID:pY4WJf3b(4/4) AAS
options(warn = -1)

library(RcppAlgos)
N=50
alpha=0.01
cm=comboGeneral(0:N,3,repetition=FALSE)
f=\(x,Yates=FALSE){
n=rep(N,3)
pc=chisq.test(rbind(x,n-x),correct=Yates)$p.value
pps=as.vector(pairwise.prop.test(x,n,correct=Yates,
p.adj="bon")$p.value)
minp=min(pps,na.rm=TRUE)
# pf>0.05 & minp<0.05
c(pc,minp)
}
f(c(18,25,33))

"
re=t(apply(cm,1,f))
ans=cm[apply(re,1,function(x) x[1]>alpha & x[2]<alpha),]
head(ans);tail(ans)
mid=round(nrow(ans)/2)
ans[(mid-3):(mid+3),]
ansp=t(apply(ans,1,f))
head(ansp) ; tail(ansp)
P_all=ansp[,1]
P_pair=ansp[,2]
plot(P_all,P_pair,pch=16,byt='l')
hist(P_all)
hist(P_pair)

summary(P_all)
summary(P_pair)
"
1-
あと 189 レスあります
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.009s