Thursday, July 7, 2022
The Inverse Sum Theorem
Wednesday, May 18, 2022
Expected values with Bertrand's Paradox
Candles and Cake problem - Probabilities with Bertrand's Paradox
Sunday, April 24, 2022
The Problem of points - Without Replacement
Consider an Urn with $A$ green balls and $B$ red balls. Two players A and B play a game where they draw balls from this Urn one at a time (without replacement). If the drawn ball is green, Player A gets a point. Else, Player B gets a point.
If Player A needs $a$ points to win the game whereas Player B needs $b$ points, the question that we address in this post concerns the probability that Player A wins the match.
As the title says, this is just the Problem of points but without replacement. We've already encountered the problem in our blog in the post titled A note on Partial fractions where we saw how Pascal and Fermat independently solved the problem with different reasoning.
Interestingly, Pascal reasoning involves the (CDF of) Neg. Binomial distribution whereas Fermat's idea involves the (CDF of) Binomial distribution. The central insight in both their ideas is in realising that we'll need a maximum of $a+b-1$ games to conclude the match.
Let's consider the original Problem for points for a moment. If we let $p$ and $q$ represent the probability of A and B winning a single game, then using Pascal's idea,
$\displaystyle \mathbb{P}(\text{A wins the match})=\sum_{k=0}^{b-1}\binom{k+a-1}{k}p^aq^k$
where the individual terms are probabilities from the Neg. Binomial distribution, $NB(a,p)$.
Using Fermat's idea,
$\displaystyle \mathbb{P}(\text{B wins the match})=\sum_{k=b}^{a+b-1}\binom{a+b-1}{k}q^kp^{a+b-1-k}$
where the individual terms are probabilities from the Binomial distribution, $B(a+b-1,p)$.
Now using our discussion about the Neg. Hypergeometric distribution in the previous case and Pascal's idea, we could solve the Without-Replacement case of the Problem of points. Or we could go for simplicity and use the Hypergeometric distribution and Fermat's idea.
Either way, let $P(A,a,B,b)$ be the probability Player A winning the game in the setup described at the start of the post and $M$ be a very large number. It should be clear the classical case can be derived out of this setup as $P(pM,a,qM,b)$ with $p+q=1$.
Obviously, when $A=B$ and $a=b$, either player has an equal chance of winning because of symmetry. Similarly, when $A=B$ and $a<b$, Player A has an advantage. Same goes when $a=b$ and $A>B$.
But consider $p(50,25,40,20)$. Player A has 10 more balls than Player B but needs 5 more points to win the game. It isn't immediately clear whether this is advantageous to Player A or not? In this case, the probability of Player A winning the match is only (approx.) 49.07%.
Naturally, we might think as we break symmetry, the match skews towards one way. Perhaps the most surprising result about the Without-Replacement case of Problem of points is the one family of parameters that form an exception.
Consider $p(21, 11, 19, 10)$. Player A has two more balls than Player B but needs one extra point to win the match. Surprisingly, this match is evenly poised. Not just this, for positive integer $n$,
$\displaystyle p(2n+1,n+1,2n-1,n)=\frac{1}{2}$
Clearly, the parameters that define the game lacks symmetry. Still the game is evenly poised between the two players. I could neither come up with a reason nor a simple explanation of why this should be the case? If you can, please post it in the comments below.
pp[A_, a_, B_, b_] := (A / (A + B)) Binomial[A - 1, a - 1] Sum[Binomial[B, j] / Binomial[A + B - 1, j + a - 1], {j, 0, b - 1}];
p[A_, a_, B_, b_] := Sum[Binomial[j + a - 1, j] Binomial[A - a + B - j, B - j], {j, 0, b - 1}] / Binomial[A + B, B];
k = 2;
ListPlot[Table[p[2n + k, n + k, 2n - k, n], {n, 100}]]
p[50, 25, 40, 20]
N[%]
p[21, 11, 19, 10]
N[%]
p[26, 13, 22, 12]
N[%]
Yours Aye
Me
Saturday, April 23, 2022
Expected distance between two points inside a Sphere
Expected distance between two points on the Surface of a sphere
Wednesday, March 23, 2022
Notes on the Hypergeometric Distribution and its Negative
I wanted to create a post about the Hypergeometric distribution, one of the most important distributions in probability theory, as a prelude to my next post.
The probability mass function of a Hypergeometric distribution with parameters $N$, $K$ and $n$ is given by
$\displaystyle f(k;N,K,n)=\mathbb{P}(X=k)=\frac{\binom{K}{k}\binom{N-K}{n-k}}{\binom{N}{n}}$
The distribution has several symmetries which will be the key content of this post.
To start with, the role of successes and failures could be swapped. In terms of probability, this means that $f(k;N,K,n)=f(n-k;N,N-K,n)$. The binomial coefficients in the numerator of $f(k;N,K,n)$ gets swapped with this transformation.
In the next setup, the role of drawn and not drawn elements could be swapped. In terms of probability, this gives $f(k;N,K,n)=f(K-k;N,K,N-n)$. This amounts to invoking the symmetry of the binomial coefficient $^nC_k=^nC_{n-k}$.
Finally, the role of drawn elements and successes could be swapped as well. In probability terms, this becomes $f(k;N,K,n)=f(k;N,n,K)$. In other words,
$\displaystyle \mathbb{P}(X=k)=\binom{n}{k}\frac{\binom{N-n}{K-k}}{\binom{N}{K}}$
I find this pretty for two reasons. Firstly, there are two 'nCk' terms with the lowercase pair in the numerator and the uppercase in the denominator which gives it a nice structure. Secondly, and most importantly, this brings out the parallel with the Binomial distribution.
Comparing the probability of $k$ successes which we have above with that of a $\text{Bin}(n,k)$, we have,
$\displaystyle \frac{\binom{N-n}{K-k}}{\binom{N}{K}} \approx \left(\frac{K}{N}\right)^k\left(1-\frac{K}{N}\right)^{n-k}$
where $N \gg n$ and ratio of $K$ and $N$ is finite. This can be seen as an asymptotic expression for the ratio of two binomial coefficients.
To make better use of this asymptotic expression, let $K=pN$ and $p+q=1$. Then, the above can be rewritten as
$\displaystyle p^iq^j \approx \frac{\binom{N-i-j}{K-i}}{\binom{N}{K}}$
Lastly, all the above symmetries can be brought under a single umbrella by using beautiful idea from Duality and Symmetry in the Hypergeometric distribution. Surprisingly, this idea is relatively unknown. The authors show that the probability associated with the Hypergeometric distribution can also be written as,
$\displaystyle \mathbb{P}(X=k)=\binom{N}{k,n-k,K-k}\bigg/ \binom{N}{n}\binom{N}{K}$
where the numerator should be understood as the multinomial coefficient.
Finally, we come to visit the lesser known relative of the Hypergeometric distribution - the Negative Hypergeometric distribution. Just like the Hypergeometric parallels the Binomial, the Neg. Hypergeometric parallels the Neg. Binomial distribution.
We could use the exact idea of Neg. Binomial to derive the probability expression for Neg. Hypergeometric. But considering what we've seen so far, we could do better.
Let $Y$ be a Neg. Binomial variable that counts number of failures encountered until the $r$th success and $W$ be the corresponding Neg. Hypergeometric variable. We know that
$\displaystyle \mathbb{P}(Y=k)=\binom{k+r-1}{k}p^rq^k$
Now we just have to make use of the asymptotic expression above to derive the same for the Neg. Hypergeometric case. We have,
$\displaystyle \mathbb{P}(W=k)=\binom{k+r-1}{k}\frac{\binom{N-k-r}{K-r}}{\binom{N}{K}}$
Neat, isn't it?
Yours Aye
Me


