It’s time for a random number duel! You and I will both use random number generators, which should give you random real numbers between $0$ and $1.$ Whoever’s number is greater wins the duel!
There’s just one problem. I’ve hacked your random number generator. Instead of giving you a random number between $0$ and $1,$ it gives you a random number between $0.1$ and $0.8.$
What are your chances of winning the duel?
N.B. - Upon reading this question prompt, I was reminded by Twain's story in A Tramp Abroad of acting as a second in a French duel and suggesting the combatants use brick-bats at a distance of three-quarters of a mile. It seems to me, that if only black box random number generators were readily available at the time, that this would have served as a much more suitable sarcastic dueling method for Twain's predicament, but alas!
Anyway, since you seem to have the dastardly ability to tamper with my RNG, let's solve the general case that you have provided me with a uniform random number generator on some generic interval $(a,b) \subsetneq [0,1].$ In this case, let's say that my distribution is $X \sim U(a,b)$ and yours is $Y \sim U(0,1).$ Then, my survival probability (this is to the death, Schroedinger's cat-style, yes?) is \begin{align*}\mathbb{P} \{ X > Y \} &= \int_0^1 \mathbb{P} \{ X > y \mid Y = y \} \,dy \\ &= \int_0^a \mathbb\{ X > y \} \,dy + \int_a^b \mathbb{P} \{X > y \} \,dy + \int_b^1 \mathbb{P} \{ X > y \} \,dy \\ &= a + \int_a^b \frac{b-y}{b-a} \,dy + 0 = a + (b-a) \int_0^1 t \, dt \\ &= a + \frac{b-a}{2} = \frac{a+b}{2}.\end{align*}
So in this particular case, your subtle tampering has left me with only a $\frac{0.1 + 0.8}{2} = 45\%$ chance of winning our random number duel.
No comments:
Post a Comment