jfaoe / Information-Theory

Stats and Books
0 stars 0 forks source link

Stats matter in Epigenetics #1

Open jfaoe opened 5 years ago

jfaoe commented 5 years ago

reddit quotes ujfarr"Xi square test can sometimes reach below .05 probability and pass"Jfarr contests this.Quote was over Aster statistics.

jfaoe commented 5 years ago
  1. The chi-squared test might give a significant result more than 5% of the time under the null hypothesis due to low egg counts on some researchers (eg torpedorunner post)

Disproved with simulation. I simulated 100000 instances of this experiment, assuming a 40/60 distribution for eggs. R code:

n = 100000

v = c(169,159,147,146,105,98,73,67,58,54,50,49,48,48,48,48,48,47,46,45,44,42,26,20,15,15) t = matrix(nrow=26,ncol=2) a = matrix(nrow=26,ncol=n) p = vector()

for(j in 1:26){ a[j,] <- rbinom(n,v[j],0.4) }

for(i in 1:n){ for(j in 1:26){ t[j,1] = a[j,i] t[j,2] = v[j] - t[j,1] } p[i] <- chisq.test(t)$p.value }

sum(p<0.05)

Only 4778 out of 100000 simulations gave a significant result.