Simple probability problem: having exactly $x$ people on the correct seats

103 Views Asked by At

In a cinema, there are $5$ numbered seats. People buy the tickets, but take their seats arbitrarily (not according to their tickets). I want to calculate the probability function for the number of people that sit on their seats. I need to calculate the probabilities that exactly $0, 1, 2, 3, 4$ and $5$ people sit on their seats.

$5$ is easy: $1/5!$

$4$ is easy: $0$

$0$ is easy: $1 -$ all the rest

But how do I calculate exactly $1, 2$ and $3$?

Thanks!

2

There are 2 best solutions below

2
On

As lulu stated, the probabillity that $0$ people are in their correct positions is $\frac{44}{120}$, or $\frac{11}{30}$.

Having $3$ people in their correct seats is equivalent to having all the people in their correct seats, but then switching $2$ people around. The probabilliity is $\binom53\over120$ (Order does not matter), which makes $\frac1{12}$.

The number of possibillities for having $2$ people in their correct seats can mean choosing $2$ people to stay in their correct seats (Also has $\binom53$ possibillities) and multiplying by the possibillities of having the rest being in a derangement (There are only $2$ derangements). Divide by the total amount of possibillities to get $\frac16$.

The chance that one person is in their correct seat is $1-$everything else, which comes to $\frac38$.

1
On

These are partial derangements. The number of partial derangements of a sequence of $n$ numbers with exactly $k$ fixed points is $\binom{n}{k}D_{n - k}$, where $\binom{n}{k}$ is the number of ways of choosing the $k$ fixed points and $D_{n - k}$ is the number of derangements of the remaining $n - k$ elements.

The number of ways exactly $k$ of the five people can sit in their assigned seats is $\binom{5}{k}$. For the remaining $5 - k$ people, the number of ways $i$ of them can sit in their assigned seats and the remaining $5 - k - i$ of them can be seated in the remaining $5 - k - i$ seats is $$\binom{5 - k}{i}(5 - k - i)!$$
Thus, by the Inclusion-Exclusion Principle, the number of ways none of those $5 - k - i$ people sit in their assigned seats is $$D_{5 - k} = \sum_{i = 0}^{5 - k} (-1)^i\binom{5 - k}{i}(5 - k - i)!$$ which means the number of ways exactly $k$ people sit in their assigned seats is $$\binom{5}{k}D_{5 - k} = \binom{5}{k}\sum_{i = 0}^{5 - k} (-1)^i\binom{5 - k}{i}(5 - k - i)!$$

The number of ways none of the five people sit in their assigned seats is \begin{align*} \binom{5}{0}D_5 & = D_5\\ & = \sum_{i = 0}^{5} (-1)^i\binom{5}{i}(5 - k)!\\ & = \binom{5}{0}5! - \binom{5}{1}4! + \binom{5}{2}3! - \binom{5}{3}2! + \binom{5}{4}1! - \binom{5}{5}0!\\ & = 120 - 120 + 60 - 20 + 5 - 1\\ & = 44 \end{align*}

The number of ways exactly one of the five people sits in his or her assigned seat is \begin{align*} \binom{5}{1}D_4 & = \binom{5}{1}\sum_{i = 0}^{4} (-1)^i\binom{4}{i}(4 - i)!\\ & = \binom{5}{1}\left[\binom{4}{0}4! - \binom{4}{1}3! + \binom{4}{2}2! - \binom{4}{3}1! + \binom{4}{4}0!\right]\\ & = 5[24 - 24 + 12 - 4 + 1]\\ & = 5 \cdot 9\\ & = 45 \end{align*} The number of ways exactly two of the five people sit in their assigned seats is \begin{align*} \binom{5}{2}D_3 & = \binom{5}{2}\sum_{i = 0}^{3} (-1)^i\binom{3}{i}(3 - i)!\\ & = \binom{5}{2}\left[\binom{3}{0}3! - \binom{3}{1}2! + \binom{3}{2}1! + \binom{3}{3}0!\right]\\ & = 10[6 - 6 + 3 - 1]\\ & = 10 \cdot 2\\ & = 20 \end{align*} The number of ways exactly three of the five people sit in their assigned seats is \begin{align*} \binom{5}{3}D_2 7 & = \binom{5}{3}\sum_{i = 0}^{2} (-1)^i\binom{2}{i}(2 - i)!\\ & = \binom{5}{3}\left[\binom{2}{0}2! - \binom{2}{1}1! + \binom{2}{2}0!\right]\\ & = 10[2 - 2 + 1]\\ & = 10 \cdot 1\\ & = 10 \end{align*} You have correctly calculated the number of arrangements in which exactly four people sit in their assigned seats and the number of arrangements in which exactly five people sit in their assigned seats. You should check that the formula stated above works in those two cases as well.

Since there are $5! = 120$ possible seating assignments, the probability that exactly $k$ people sit in their assigned seats is $$\Pr(X = k) = \frac{\binom{5}{k}D_k}{k!}$$ so we obtain \begin{align*} \Pr(X = 0) & = \frac{44}{120}\\ \Pr(X = 1) & = \frac{45}{120}\\ \Pr(X = 2) & = \frac{20}{120}\\ \Pr(X = 3) & = \frac{10}{120}\\ \Pr(X = 4) & = \frac{0}{120}\\ \Pr(X = 5) & = \frac{1}{120} \end{align*}