Answer:
List of outcomes:
{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3}, {1, 4, 3, 2},
{2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1}, {2, 4, 1, 3}, {2, 4, 3, 1},
{3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4}, {3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1},
{4, 1, 2, 3}, {4, 1, 3, 2}, {4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}
pmf:
0: 9/24, 1: 8/24, 2: 6/24, 3: 0, 4: 1/24
Explanation:
It works out nicely to let a math program list the permutations and count the numbers that are in the right place. (See below.) This can be done by hand, but is tedious and prone to error.
(Note that it is not possible for exactly 3 students to receive the correct book.)