A problem is given:
$322$ mathematicians walk into a bar, numbered from $1$ to $322$, each picks someone other than himself at random and writes down his number on a piece of paper. The barman names the first mathematician, he orders a beer for the one he has written on the slip, then the next mathematician in line comes to the barman who has not yet been ordered a beer, orders the one he has written on the slip and so on. How many mathematicians will be left without beer in the expectation?
My attempt at a solution:
Let's denote by $X_i$ a random variable that equals 1 if the $i$th mathematician did not get a beer, and equals 0 if the $i$th mathematician got a beer. We want to find the mathematical expectation of the number of mathematicians who will remain without beer $$\mathbb{E}\left [ \sum_{i=1}^{322}X_i \right ]=\sum_{i=1}^{322}\mathbb{E}[X_i]$$ Now we need to find the mathematical expectation of $X_i$. Consider the $i$th mathematician. The chance that he won't get a beer is equal to the probability that his name won't be written on a piece of paper by someone else. The probability that $i$th mathematician will not be chosen by $j$th mathematician is $\frac{321}{321}$ (since $j$ cannot choose himself). The probability that $i$-th mathematician will not be chosen by any of the other $321$-mathematicians is equal to: $$\left ( 1-\frac{1}{321} \right )^{321}$$ We can now find the mathematical expectation of $X_i$: $$\mathbb{E}[X_i]=1\cdot \left ( 1-\frac{1}{321} \right )^{321}+0\cdot \left ( 1-\left ( 1-\frac{1}{321} \right )^{321} \right )\approx 0,368$$ On average about $0,368 \cdot 322 \approx 118,6$ of maths will be left without beer. The answer is $\boxed{119}$
I'm not at all sure about the decision. Could you tell me if I have solved it correctly ?
I presume that when the $k-1$-th mathematician is called for beer, and the number which she has written is in the set of the first $(k-2)$ mathematicians, the process stops. Assuming each chooses a number at random uniformly and independently from the set of $(N-1)$ possible ones (where $N=322$), the conditional probability that $k$-th will be not the last one (given she has been chosen), is $1-\frac{k-2}{N-1}$. Hence if $X$ denotes the number of mathematicians who got bear, then $$ \mathbb{P}(X\ge k)=\left(1-\frac1{N-1}\right)\left(1-\frac2{N-1}\right)...\left(1-\frac{k-2}{N-1}\right) =\frac{(N-2)(N-3)...(N-(k-1))}{(N-1)^{k-2}} =\frac{(N-2)!}{(N-k)!\,(N-1)^{k-2}} $$ for $k\ge 3$, and $\mathbb{P}(X\ge 1)=\mathbb{P}(X\ge 2)=1$. Hence $$ \mathbb{E}(X)=\sum_{k=1}^{N}\mathbb{P}(X\ge k)=2+\sum_{k=3}^{N}\left(1-\frac1{N-1}\right)\left(1-\frac2{N-1}\right)...\left(1-\frac{k-2}{N-1}\right)=23.12737336. $$