Passing thresholds with uniform random variables

353 Views Asked by At

I have encountered a challenging task: I have a bunch of uniform random variables "trying" to pass a certain threshold, and another bunch trying to pass a different threshold, and I need to estimate the difference of the number of successes.

I'll now make it formal.

Settings

Let $n,m\ge 1$ be integers, $a,b\in(0,1)$. For each $i\in[n]$, let $X_i\sim\mathcal{U}([0,1])$ and for each $j\in[m]$ let $Y_j\sim\mathcal{U}([0,1])$. Finally, let $A=\sum_i \mathbf{1}_{X_i\ge a}$ and $B=\sum_j \mathbf{1}_{Y_j\ge b}$.

Simple Question

What is the probability that the first "group" will have at least as many successes as the second group? That is, what is $\mathbb{P}(A\ge B)$?

Difficult Question

What can I say about the moments of $A-B$? At least: what can I say about its mean and variance?

Tests

I've done a few tests. For $a=b=x$ and $m=n$, the function $f_n(x)=\mathbb{P}(A\ge B)$ seems to get its minimum around $x=0.5$, and $f_n(0.5)$ is about $0.75$ for low $n$, and tend to $0.5$ with $n\to\infty$. It also looks like the shape of $f_n(x)$ is sort of parabolic for low $n$, and is tending towards a constant function $f(x)=0.5$ with $n\to\infty$.

1

There are 1 best solutions below

1
On BEST ANSWER

I am assuming all the rv are independent. Since $X_i$ is uniform, $P(X_i \ge a)=1-a.$

Clearly $A$ and $B$ have Binomial distributions so the means are "np":

$E(A)= n(1-a)$ so $E(A-B)=n(1-a)-m(1-b).$

and the variance is "$npq:$" $Var(A)=na(1-a)$ and $Var(A-B)=na(1-a)+mb(1-b).$

$P(A=k)={n \choose k}(1-a)^ka^{n-k} $ and $P(B\le k)=\sum_{i=0}^k{m \choose i}(1-b)^ib^{m-i}. $

If $m\ge n:$

$P(A\ge B)= \sum_{k=0}^n P(B\le k)P(A=k).$

If $m\lt n $ then interchange the roles of $A,B$ and $a,b$ and $n,m.$

For $n,m$ large we can use the normal approximation to the binomial:

$P(A-B\le x)\approx \Phi\left( \frac {x-E(A-B)}{\sqrt{Var(A-B)}} \right)$