Can this probability mechanic be used in a simulated gambling scenario?

This question is a bit complicated, so please bear with me.

I realized this question after watching this video from the popular Youtube channel Numberphile. This video claims that when two random numbers are selected in a range of numbers, and one is revealed, you can have a higher than uniform chance of guessing whether the other is higher or lower than the original by selecting a third number in the range of numbers, randomly, and making a decision based on that.

If the third number is larger than the first number, there is a larger chance of the second number being larger than the first number, than the second number being smaller than the first number. If the third number is smaller than the first number, the inverse is true.

Allow me to explain an example:

Two integers are selected in the range $[1,100]$. These integers are called $a$ and $b$. $a$ is revealed to be $38$. To determine whether $b$ is greater or less than $a$, I will pick another integer in the range $[1,100]$, calling it $k$. $k$ is determined randomly. $k$ is determined to be $46$. Since $k$ is larger than $a$, there is a better chance for $b$ to be larger than $a$. After making my prediction, $b$ is 89, making my prediction correct.

I doubted this much, but I wrote a Python program to test this simulation. That can be investigated here if you desire.

It turns out that this model is true, in the long run. My simulation found percentages far higher than the predicted 50% margin. It consistently guessed correctly over 60% of the time, nearing 70% on occasion.

My question is if this mechanic could be used in a hypothetical gambling scenario. Consider this:

This game functions in turns. Each turn, a player can select a number $[1,100]$, and predict whether a randomly generated number is larger or smaller than that number. If it is successful, the player regains their bet, plus a percentage of their bet that grows larger based on the odds of your number being correct. This game is a single player, and the random number generated is guaranteed to be uniformly random.

In that hypothetical scenario, assuming an initial seed was used, couldn't a person continue using the result number generated from the last turn, generating $k$ on their own, simply for their calculations.

Would this yield a potential edge in this game?

Why it works

First, to explain why the idea in the video works:

Randomly select $A$, $B$ and $K$ from $\mathbb{R}$ - the probability distribution used for each selection is irrelevant providing that it covers all $\mathbb{R}$; they can be the same or different.

Therefore, there is a non-zero chance $p$ that $K$ falls between $A$ & $B$. If that happens then you will win, if it doesn't happen then you are effectively guessing and have a 50/50 chance of winning. Your overall chance of winning is therefore: $$p+\frac{1-p}{2}$$

This is always greater than $\frac{1}{2}$ for $0<p\le1$.

What you are proposing is not what the video describes.

You are proposing is selection from $U(-[1,1000],[1,1000])$ for which there is obviously a much better algorithm: if $A<0$ bet on $B$ otherwise bet on $A$

Without doing a lot of probability theory, here's my intuition.

Scenario 1: You are not told $a,$ but you are told $k > a.$ That is a bit of a clue that $a$ must be "small," so you'd be wise to guess $b > a.$ In this case $k$ provides useful, if weak, information. People who don't realize $k$ gives some information might be inclined just to ignore $k$ and guess which is bigger-- $a$ or $b.$

Scenario 2 (yours): You are told $a$ and $k,$ but not $b$. If $a < 50,$ you should guess $a < b$ regardless of $k.$ For example, if it happens that $k = 2,$ there is still better than a 50-50 chance $b > a.$ At an extreme, suppose you were told $a = 3$ and $k = 1.$ Are you still going to bet that $b < a?$

Under Scenario 2, I suggest you write a Python problem that pits two strategies against each other. Strategy A: Ignore $k$ and guess $a < b$ if $a < 50.$ Strategy B: Guess $a < b$ if $a < k,$ no matter the size of $a.$

Note: To make your program match your question, shouldn't you be picking a number between 0 and 100, not between -10000 and 10000? You say nothing about 10000 in your question. (It's possible I'm misreading your program; I'm much more familiar with R than with Python.) Also, I see another answer popped up while I was writing mine, and it mentions -1000 to 1000, so I'm not sure who is confused and about what.

Addendum: Here is a program in R that handles only guesses that $a < b,$ but maybe you'll agree it makes my point (which I interpret as similar to that of the other Answer, $\pm$ 1000 notwithstanding).

 m = 10^5  # Nr of games
a = sample(0:100, m, rep=T)
b = sample(0:100, m, rep=T)
k = sample(0:100, m, rep=T)
mean((a < b)[a < 50])  # Fraction correct w/ Strategy A
## 0.7463945
mean((a < b)[a < k])   # Fraction correct w/ Strategy B
## 0.6590369


BTW: Using k in the absence of knowledge about a, although not as good as knowing a, is an important idea. It is similar to strategies used in Monte Carlo integration when the exact probability model can be 'described', but not 'explicitly written' as an formula.

• Will be looking for your first startup venture! Commented Jun 16, 2015 at 1:30
• Yes, you are correct, the program does not model the $[1,100]$ range that the problem describes, I set it on a larger range for more detailed analysis. The probability results are the same with the correct range. Commented Jun 16, 2015 at 14:12