when testing to see if things happen 10% of the time I test it between a 1000 times and if it happens in a range of 50 to 150 times then the test should pass. However there are times where the test does fail because it might be alittle then than 50 or alittle more than 150. How can we be accurately tested on this?
If you’ve done it properly, there’s a 99.99997% chance that it falls between 50 & 150, so it’s super super unlikely you lose the mark if it’s truly a 10% chance
To calculate that number, you can use R:
pbinom(150, 1000, 0.1) - pbinom(50, 1000, 0.1) – again, this is not really within the scope of CSC207
More technical details:
X ~ Binom(n = 150, p = 0.1)
P(50 < X < 150) ~ 0.9999997