Probability when only one student receives their own textbook Problem: At the end of an exam, four textbooks are left behind. At the beginning of the next lecture, the four texts are randomly returned to the four students. Let X be the number of students who receive their own book. Obtain the pmf of X. 
The answer key for P(x=1) is $\frac{{4 \choose 1} \times 2}{24}$
Why there's a 2 in there? What does that mean?
 A: If exactly one student receives his or her own text, then no other student receives his or her own text, which means we have a derangement of the other three texts.
Suppose the students are Angela, Brian, Claire, and David.  Suppose David has received his own text.  Let's denote Angela's text by $A$, Brian's text by $B$, and Claire's text by $C$.  In the table below, items are marked in red if a student receives his or her own text.  As the table shows, there are two ways for none of the other students to receive their own texts if David receives his own texts.  Hence, there are two derangements on a set of three elements, denoted $D_3 = 2$.
\begin{array}{c c c}
\text{Angela} & \text{Brian} & \text{Claire} \\ \hline
\color{red}{A} & \color{red}{B} & \color{red}{C}\\
\color{red}{A} & B & C\\
B & A & \color{red}{C}\\
B & C & A\\
C & A & B\\
C & \color{red}{B} & A
\end{array}
A distribution of the texts in which only one of the four students receives his or her own text is an example of a partial derangement of four items in which there is exactly one fixed point.  There are four ways to choose the person who receives his or her own text (our fixed point) and two ways to derange the remaining recipients of the texts.  Hence, there are $$D_{4, 1} = \binom{4}{1}D_3 = 4 \cdot 2 = 8$$ ways to distribute the four texts to the four students so that only one student receives his or her own text.
Since there are $4!$ ways the four texts could be distributed so that each student receives one of them, the probability that exactly one of the four students receives his or her own text is
$$\Pr(X = 1) = \frac{D_{4, 1}}{4!} = \frac{\binom{4}{1}D_3}{4!} = \frac{\binom{4}{1} \cdot 2}{24} = \frac{4 \cdot 2}{24} = \frac{8}{24} = \frac{1}{3}$$
