# Type 1 and 2 errors for binomial

Printable View

• June 9th 2013, 09:31 AM
Shakarri
Type 1 and 2 errors for binomial
I am working on a research project this summer and I'm a bit confused about type 2 errors. The actual scenario I am testing is nonsense to most people so I'll rephrase the problem in a way that makes more sense.

There is a bag containing many green balls and 1 red ball. A boy comes to play a game where he picks out balls with replacement and if he picks the red ball he loses. I was not watching the bag before he started playing and he may have put some extra green balls into the bag before beginning to lower his chances of losing.
Even though he might have cheated I let him play anyway until he picks a red ball. After picking the red ball the game is over so no more trials are conducted.

The notation I'm using is this
$\mu\text{ the true chance of picking the red ball before the boy had a chance to interfere (expected to be less than 1/5000)}$
$\bar{x}\text{ the chance of picking a red ball based on trials done by other children who didn't cheat (sample size over 100000)}$
$\theta\text{ the true chance of the boy picking a red ball given that he may have added green balls}$
I mention approximate numbers in case they enable some assumptions to be made.

So far the boy has picked out n balls and has gotten no red ball.
The null hypothesis is that he has not cheated so $\mu=\theta$, the alternative hypothesis is that he has cheated so $\theta < \mu$ I would like to know the probability of type 1 and type 2 errors if I was to either accept or reject the null hypothesis.

My idea on how to do this is the following:

Type 2 error, I decide he has played too long without getting a red ball and has cheated. The probability of him getting this lucky streak is $(1-\mu)^n$, I approximate this with
$(1-\bar{x})^n$. When $(1-\bar{x})^n$<0.05 his sample is suspicious and I consider excluding the boy's sample from the study.

Type 1 error, given that I'm considering excluding the boy's sample there is a chance I will make a type 1 error. My idea was to use a t test for this, I would be comparing $\bar{x}$ to the boy's sample which has mean 0 and sample size n. If the probability that $\mu=\theta$ is below 0.05 then I can safely assume he is cheating and reject the null hypothesis

Could I get some feedback on these tests? I'm not sure if they are the right way to go about it.
• June 9th 2013, 05:44 PM
chiro
Re: Type 1 and 2 errors for binomial
Hey Shakarri.

The Type II error corresponds to rejecting the alternative when you should have retained it.

Basically you need to have a distribution for the alternative (which will be a binomial or a normal approximation given enough data) and you need to find the probability of rejecting the alternative given that its true.

In other words, find the complementary probability where theta > mu and this will be your Type II error in the same way that theta != mu (for a two-sided test) will give you your Type I error.

Its a lot easier to understand if you think in terms of each hypothesis test having its own distribution, test statistic and probability value. Trying to understand it in any other way usually leads to confusion.
• June 13th 2013, 02:40 PM
Shakarri
Re: Type 1 and 2 errors for binomial
Thank you for your help chiro. I think my 2 tests were finding the probability of a type 1 error twice. Most tests seem to be designed at finding the probability of a type 1 error. The way you suggest looking at it makes a lot of sense, it fits in with the rest of statistics