# How to calculate the “unfairness” for repeated random selection?

Assume there are 16 people in a group, and each day 11 people are randomly selected from the group. Over a year, some people will be selected more times than other people.

The question is, assume the person selected most often was selected $M$ times, and the person selected least often was selected $m$ times, what is the distribution (or the expected value) of the quantity $M/m$?

-
The expected value is clearly not even defined since there is a positive probability that $m = 0$. Furthermore, $M > 182$ with probability one (trivially). –  cardinal Dec 28 '11 at 13:13
Nevertheless, @Cardinal, there is a distribution for $(m,M)$ and, by defining "$M/m$" in some suitable way for the cases where $m=0$, one can derive a distribution for $M/m$. The definition of $M/0$ really does not matter practically because the chance of this occurring is approximately $10^{-184}$. The expectation of this distribution will be sensitive to the value chosen for $M/m$. One simple way to resolve the problem is to consider a closely related random variable such as $(M+1)/(m+1)$. –  whuber Dec 28 '11 at 16:24
@whuber Or simply $m/M$ which is well-defined and in $[0,1]$. –  Elvis Dec 28 '11 at 16:51
@whuber: Yes, I agree. I was simply trying to show a very quick way to answer one of the OP's specific questions. I have found it helpful in my own learning to see simple arguments that elucidate such edge cases. I agree with Elvis that if one's interest lies in ratios, then $m/M$ is a little bit more sensible choice. –  cardinal Dec 28 '11 at 17:27

An exact computation could be written but this will be rather tedious... moreover the final result will surely be ugly, involving discrete summations requiring the help of a computer to evaluate... and to be honest I feel lazy!

However, the use of brute force is easy :) Here is a piece of R code. The function f generates a particular value of $M/m$ :

f <- function()
{
x <- matrix(0, ncol=16,nrow=365)
for(i in 1:365)
x[ i, sample(1:16,11) ] <- 1;
a <- colSums(x);
return( max(a)/min(a) );
}


Then we compute 10000 such values :

> q <- numeric(10000)
> for(i in 1:length(q)) q[i] <- f()


Using length(unique(q)) we remark that only 559 values were taken. None of this values is Inf (which has a very low probability)...

Here are some quantiles :

> round(quantile(q, seq(0,1,0.1)),3)
0%   10%   20%   30%   40%   50%   60%   70%   80%   90%  100%
1.049 1.100 1.110 1.119 1.127 1.135 1.143 1.152 1.163 1.179 1.316


And an histogram:

> hist(q, breaks=30, freq=FALSE)


Note that as suggested by cardinal you could be interested in $m/M$ as well:

> round(quantile(1/q, seq(0,1,0.1)),3)
0%   10%   20%   30%   40%   50%   60%   70%   80%   90%  100%
0.760 0.848 0.860 0.868 0.875 0.881 0.887 0.894 0.901 0.909 0.953

> mean(q)
[1] 0.8796803
> sd(1/q)
[1] 0.02403925

> hist(1/q, breaks=30, freq=FALSE)


Edit I computed $10^5$ values. 842 different values are taken. The histograms look very similar. Here are the quantiles.

> round(quantile(q1, seq(0,1,by=0.05)),3)
0%    5%   10%   15%   20%   25%   30%   35%   40%   45%   50%
1.041 1.091 1.100 1.105 1.111 1.115 1.120 1.123 1.128 1.131 1.136
55%   60%   65%   70%   75%   80%   85%   90%   95%  100%
1.140 1.143 1.148 1.153 1.158 1.164 1.171 1.180 1.195 1.322

> round(quantile(1/q1, seq(0,1,by=0.05)),3)
0%    5%   10%   15%   20%   25%   30%   35%   40%   45%   50%
0.756 0.837 0.847 0.854 0.859 0.864 0.868 0.871 0.875 0.877 0.881
55%   60%   65%   70%   75%   80%   85%   90%   95%  100%
0.884 0.887 0.890 0.893 0.897 0.900 0.905 0.909 0.916 0.961


The distribution of $m/M$ is well approximated by a Beta distribution with parameters $\alpha = 57.9482$ and $\beta = 21.68629$. See on the following figure the empirical cdf of $m/M$ using $10^5$ simulated values, in black, and the cdf of this Beta distribution, in dotted red. Now I would be curious to see a theoretical approach to the question! (still too lazy and pessimistic to try)

-