0

I am struggling to solve the following exercise, and I would like to know if there is a simpler way to solve it than the way I chose!

Suppose that in Maryland, on a certain day, N lottery tickets are sold and M win. To have a probability of at least ${\alpha}$ of winning on that day, approximately how many tickets should be purchased?

I started out with a concrete case:

Suppose there are $100$ tickets, and $15$ of them are winning tickets, how many tickets must I buy so that I have at least a 50% chance of winning?

and then I went case by case:

What is the probability of winning by buying $1$ ticket? Clearly the answer is:

$$\frac{15}{100}=0.15$$

Not good enough, how about by buying two tickets?:

$${2\choose{2}}*\frac{15*14}{100*99}+ {2\choose{1}}*\frac{15*85}{100*99}\approx0.279$$

Still not good enough, but I am starting to see a pattern, and so I attempt to generalize to this with:

$$\sum_{i=1}^n {n\choose i}*\frac{{_{15}}P{_i}*{_{85}}P{_{n-i}}}{{_{100}}P{_n}}$$

Now it remains to solve for $n$

$$\sum_{i=1}^n {n\choose i}*\frac{{_{15}}P{_i}*{_{85}}P{_{n-i}}}{{_{100}}P{_n}}\geq 0.5$$

It looks like monstrous calculations are needed to compute this, but then I generalize to the exercise anyway:

$$\sum_{i=1}^n {n\choose i}*\frac{{_{M}}P{_i}*{_{N-M}}P{_{n-i}}}{{_{N}}P{_n}}\geq \alpha$$

First of all, is this correct? and second of all, is there a way to simplify the calculations? I know Poisson can somehow help (so says my book) but I fail to see how, may you please explain how I can convert this into a Poisson approximation? What should I be thinking? ANY help is greatly appreciated, thank you!

BONUS: If you know any python, some tips on how I can brute force calculate this would be great too, otherwise please recommend a program with which i can do this, thank you :)

Kam
  • 707
  • 6
  • 17
  • 1
    Try instead to compute the complement, analogous to the birthday problem. – true blue anil Jul 12 '22 at 16:58
  • In other words, $1-\sum_{i=1}^n \frac{{{N-M}}P{_n}}{{{N}}P{_n}}\geq \alpha$? @trueblueanil I don't know why I didn't think of this, perhaps that the probability had to be greater than something threw me off. Still, this can be potentially heavy to calculate, can you please give me any hints on how to convert this to a Poisson approximation? – Kam Jul 12 '22 at 17:10
  • 1
    You only have to compute until you achieve $(1-p)\leq 0.5$, eg $1- \frac{85848382}{100999897}\approx 0.48$ – true blue anil Jul 12 '22 at 17:24
  • for my case study yes, but for a larger case study things can get very hairy very fast, which is why i inquire if there is faster method, or useful approximation of the result i can use! @trueblueanil either way thank you for your comments, they were helpful! – Kam Jul 12 '22 at 17:29
  • If you purchase $k$ tickets then probability of winning would be $1 -$ probability of losing all which is $0.85^k$ which you want to be smaller than $0.5$. Is this right? I am not from probability statistics background so I am not sure about it. – Rishi Jul 12 '22 at 17:40
  • Does this answer your question? Lottery probability of winning –  Apr 23 '23 at 21:00
  • no because my question includes asking if i was on the right track, and if so is there a generalisation to it, also asked for python code to brute force this, @user1147844 your comment is unnecessary, furthermore the answer to this question is far more complete and easy to understand than the other answer, what was the point of your comment? – Kam Apr 24 '23 at 23:43

1 Answers1

1

We may assume that the number of tickets $N$ and the number of winning tickets $M$ are both large. We can then do our calculations as if we are drawing with replacement (while actually it is a case of drawing without replacement). If we buy $Q$ tickets, the probability that none of them wins a prize is:

$$P = (1-M/N)^Q$$

The prize of winning at least one prize is $1-P$, which we demand to be larger than $\alpha$. Thus we arrive at the following equation, to be solved for $Q$:

$$(1-M/N)^Q < 1-\alpha$$

This is easily done by using logarithms:

$$Q > log(1-\alpha)/log(1-M/N)$$

Compute the right hand side, then round up to the next integer value.

Post Scriptum: As indicated by the OP, there is another approach possible, based on the Poisson distribution. This leads to a similar but slightly different result. It can be derived by writing the exact formula for the chance $P$, then divide each term in the numerator and dominator by $N$, yielding:

$$P =\frac {(1-M/N)(1-(M+1)/N)...(1-(M+Q-1)/N)}{(1)(1-1/N)...(1-(Q-1)/N)}$$

Now assume that $N$ is large compared to $M$ and $Q$. Then each term can be turned into an exponential. Collecting all contributions from numerator and denominator gives:

$$P = e^{-QM/N}$$

[Note that this expression can also be derived by considering $log(P)$ and making a large $N$ approximation.] The criterium that $1-P$ must be larger than $\alpha$ leads to:

$$Q > -(N/M)log(1-\alpha)$$

Numerical tests may be used to see which of the two formulas for $Q$ works best.

M. Wind
  • 4,270
  • That is what I was looking, thank you M. Wind, this works especially well for large N correct? for small N it doesn't work no? my book suggests $1-\frac{e^{-n\frac{M}{N}}(\frac{nM}{N})^0}{0!}$ which gives $n\geq -\frac{Nln(1-\alpha)}{M}$ which seems to be close to your answer, although i suspect the book uses a Poisson approximation, if you could guide me how it uses Poisson that would be fantastic! – Kam Jul 13 '22 at 13:29
  • 1
    Yes, the assumption that $N$ is large is essential. The Poisson approximation should also work fine. I have adjusted by post to include this alternative approach. – M. Wind Jul 14 '22 at 03:41
  • THANK YOU M. WIND :) this is incredibly helpful! – Kam Jul 15 '22 at 08:47