Find formula that produces desired graph

51 Views Asked by At

Let's say we have an urn of balls of size $n$, Each ball has probability $p$ of being red.

I take a sample from this urn without replacement and calculate the probability of having at least a majority of balls that are red using the cumulative binomial distribution:

$$P_n=\sum_{i=n/2}^{n}\binom{n}{i}p^i(1-p)^{n-i}$$

If I calculate this for different sample sizes i get the following figure:

https://dl.dropboxusercontent.com/u/22681355/fig1.png

I would like to modify the above formula to produce the inverse of this figure which would look like this:

https://dl.dropboxusercontent.com/u/22681355/fig2.pdf

I'm sure there is an obvious change to this formula that will produce the second figure but I was not able to figure it out.

I tried $1$ minus the formula but that does not produce the desired result.

Any ideas? Any other formula that has an interpretation in terms of sampling from an urn and probability of choosing correct AND produces figure2 is fine.