高校数学の質問スレ(医者・東大卒専用) Part438 (991レス)
前次1-
抽出解除 レス栞

リロード規制です。10分ほどで解除するので、他のブラウザへ避難してください。
213: 2024/08/31(土)10:17:02.47 ID:OqrM+pGd(1) AAS
そもそも小学生にすら相手にされてない電卓チンパンだしなぁ
517
(1): 01/08(水)20:27:57.47 ID:SKdwPI7I(2/4) AAS
>>513
1000万回のシミュレーション
画像リンク

画像リンク

805: 04/30(水)05:14:16.47 ID:wedVH8wl(3/10) AAS
options(warn = -1)
alpha=0.05
sim=\(N=100){
A=sample(1:(N-2),1) # Ensure A leaves enough room for B and C
remaining = N - A
if(remaining > 1){
B=sample(1:(remaining-1),1) # Ensure B is at least 1
C=N-A-B
ABC=c(A,B,C)
abc=sapply(ABC,\(x) if(x > 0) sample(1:x,1) else 0) # Handle case where a group size might be 0 (though unlikely with the new A and B sampling)
x=abc
n=ABC
contig=rbind(s=x,f=n-x)
pg=chisq.test(contig,correct=FALSE)$p.value
minpp=min(as.vector(
pairwise.prop.test(x,n,correct=FALSE,p.adj="bon")$p.value),na.rm=TRUE)
list(pg=pg,minpp=minpp,x=x,n=n)
} else {
# If A is too large, return NULL or some indicator of an invalid simulation
return(NULL)
}
}

res = sim()
while(is.null(res) || res$pg < alpha | res$minpp > alpha) {
res = sim()
}
res

res = sim()
while(is.null(res) || res$pg > alpha | res$minpp < alpha) {
res = sim()
}
res
前次1-
スレ情報 赤レス抽出 画像レス抽出 歴の未読スレ

ぬこの手 ぬこTOP 0.034s