# How to Win the Lottery

Imagine a slot machine. đ°

Letâs say you have exactly 1% chance of winning every time you play. And letâs say youâre allowed to play only *once* a year.

Well, you donât have to imagine, because that game already exists. Itâs called the U.S. Diversity Visa, commonly known as the *green card lottery*. It is essentially what it sounds like: A lottery. Every year, people from certain countries can apply and they are randomly selected to qualify to become permanent residents of the United States. Although it varies based on the country of origin, every applicant has about **1%** chance.

The lottery recently came to publicâs attention, partly because President Trump wants to eliminate it due to its randomness.

There is no limitation on the number of attempts. An individual has the right to try every year, until he or she wins.

So, it got me thinking: How likely are you to win this lottery within your lifetime? You can keep trying every year. But which year should you *expect* to finally win? In other words: **How many times do you need to apply until you have over 50% chance of winning?**

Use your intuition! Whatâs the first answer that comes to your mind?

Intuitively, you might say 50 times. After all, you have a 1% chance of winning for every 1 attempt. So, if you make 50 attempts, would that make 50%?

No.

## Probability Over Repeated Attempts

If 50 attempts actually gave you 50% chance of winning, then, what would 100 attempts give you? A 100% chance? By the same logic, 150 attempts should give you 150% chance of winning. That doesnât make sense.

Our intuition is misleading us. Somehow, our natural tendency is to add up the probabilities:

**(1/100) + (1/100) + ...**

Clearly, this is wrong. These are independent events. This question is a frustrating one because it seems like the solution should be simple and intuitive, but itâs not. A quick Google search reveals a lot of people are confused with these types of problems.

From redditâs ELI5 subreddit:

Another one from Ask Metafilter:

There happens to be a simple and intuitive way to approach this problem.

When we think about these multiple attempts, we tend to imagine the entire experience as a series of failures and then finally, a win. But you donât begin a task by planning to attempt a specific number of times. You merely end up attempting it N times, because thatâs how many attempts it took. You will keep playing until you win. Because *all you need is one win*.

## Losing Every Single Time

So, the idea is actually simple. Think about the *negation* of the probability we are trying to calculate. It is **losing every single time!** That is the only case we want to exclude.

Once we calculate that, subtracting that probability from 1 will obviously give us the probability of winning at least once.

**1 - (1 - P)**

^{N}**P**= probability of winning

**N**= number of attempts

In the case of the green card lottery, the probability of winning (P) is **0.01**. Therefore, the probability of losing (1 - P) is **0.99**.

If we attempt **20** times, **0.99 ^{20} = 0.82** is the probability of losing every single time.

Subtract that from 1 and you will get the probability of NOT losing every single time.

1 - 0.82 = **0.18**

This means you have only about **18%** chance of winning even if you play this lottery **20** times. Yikes.

Alright. Everyone gets it. Itâs time to play around!

Probability (%):

# of attempts:

**đ° Chance of winning:** { result }

An interesting observation is that you have to play a whopping 69 times in order to *expect* to win. đ˛ Thatâs way more trials than our intuition would suggest.

So, the next one will be more fun. This time, given a probability of success, we are calculating how many attempts it would take to put our odds at 50%+.

Probability (%):

**đ° You should try { result } so you can expect to win.**

Thank you for reading (and playing).