08/09/2021

Probability n’ Chips

We will see a little bit about:

  • Probability
  • Programming
  • Simulations

Pogs

Lay’s

In terms of probabilities, which questions can we draw from this situation?

Questions about the pogs collection

  • How much money does one have to spend on potato chips so as to complete the entire collection?

  • If it’s not possible find an exact solution for the previous question, how close can we get to an answer? Do we have some kind of threshold?

  • Those questions are not deterministic, but rather probabilistic.

Basic concepts

  • What is a probability?

  • Event

  • Random Variable

  • Distribution of a random variable

  • Expectancy

Event - Equality

Let X be the event “Result of rolling a non-biased dice”.

What is the probability of \(X=1\)?

\[ P(X=1) = P(Side = 1) = \frac{1}{6} \]

Event - Inequality

Let X be the event “Result of rolling a non-biased dice”.

What is the probability of \(X<3\)?

\[ P(X<3) = P(X=1) + P(X=2) = \frac{2}{6} = \frac{1}{3} \]

Random variable and its distribution

  • Random Variable

X: “Result of rolling a dice”

  • Distribution
x 1 2 3 4 5 6
p(x) 1/6 1/6 1/6 1/6 1/6 1/6

Expectancy or Expected Value

  • weighted average(or mean), where the weights are the possible outcomes of the random variable.

  • For a dice roll the weights are 1, 2, … 6.

  • So, \(E[X] = 1\times\frac{1}{6} + 2\times\frac{1}{6} + ... + 6 \times\frac{1}{6}\)

Pogs problem

  • Lets choose a random variable:

“number of bags of chips we need to buy to complete the pogs collection, given that there are 20 unique pogs”.

  • It’s not easy at all to find a distribution for this random variable.

  • So what can we do now?

Simulation

  • Repeat the experiment multiple times with a computer program.

  • For each iteration, write the outcome(number of bags purchased) to a list.

  • Calculate the mean of the written outcomes.

Obs: Statistical inference guarantees that the mean we calculated is close enough to the real mean(expected value).

What conclusions can we take?

  • With the random variable expected value, we can find an upper bound for the occurrence of an event.

  • We will use a result from probability theory known as Markov’s inequality.

  • \[P(X \geq k) \leq \frac{E[X]}{k}, k > 0\]

Markov’s inequality

  • Given that X: “number of bags of chips we need to buy to complete the pogs collection, given that there are 20 unique pogs”

  • And given that E[X] = 72

  • In the worst case scenario, what is the probability that we buy 100 or more bags of chips to collect all pogs?

  • \[P(X \geq 100) \leq \frac{72}{100} = 0.72\]

Conclusions

  • We found out that it is possible to say something about a random variable without its distribution.