Random Variable Modeling

54 Views Asked by At

I am trying to understand how to model a random variable. So using a biased coin with $P(Head) = q$. If I am to generate a random variable $Y$ that is equally likely to be either a or b depending on the following experiment:

Step $0$: Flip $1$: I flip the coin and record the results

Step $1$: Flip $2$: same as step $0$

Step $2$: if Flip $1 \ =$ flip $2$ then we reboot to step 1..

Step $3$: after two different results, set $P(Y = a) = P(Head \ in \ Flip \ 2)$ and $P(Y = b) = P(Tail \ in \ Flip \ 2)$

I am trying to understand why both probabilities are equal. $i.e. \ P(Y = a) = P(Y = b) = 0.5$

And is there a different way to model $Y$

Thank you

1

There are 1 best solutions below

0
On

This algorithm is attributed to John Von Neuman, and works as follows.

We know that $\mathrm{P(Head)} = q \neq \frac{1}{2}$. Now, let's enumerate the probabilities for the set of 2 flips: $$ \mathrm{P}(HH) = qq\\ \mathrm{P}(HT) = q(1-q)\\ \mathrm{P}(TH) = (1-q)q\\ \mathrm{P}(TT) = (1-q)(1-q)\\ $$

Note that $P(TH) = P(HT)$! Given that Heads then Tails is equiprobable with Tails then Heads, if we decide to pick the first of the set of two as our indicator, we have created an algorithm that picks heads or tails with equal probability notwithstanding the bias of the coin. And since we start the process over if we get 2 in a row, our acceptable sample set only consists of $\{HT, TH\}$ so we will pick Heads and Tails with equal probability 50% of the time. Unlike a fair coin, though, we may need multiple iterations until we get a pair of non-equal observations.