I want to compare the chi-squared test and the one with continuity correction, in terms of their level and power. My idea is to iterate through Bernoulli distribution from 2 to 1200 samples and 500 times each and then to test chi.squared(correction = true) and chi.squared(correction = false) and to create a result table.
B=500
Array=c(4, 8, 16, 32, 64.....
For n in Array
C1=empty
C2=empty
For i to B
... S1,S2 = two Samples of size n ...
C1.add(chi.squred(S1,S2, correction=true))
C2.add(chi.squred(S1,S2, correction=false))
I don't know is this the right way of doing so and how should I proceed? Thank you in advance.
question from:
https://stackoverflow.com/questions/66046694/comparing-chi-squared-tests 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…