Suppose we have students: A,B,C,D and packets A,B,C,D. Each student picks up a packet randomly. What is the probability that at least two students have picked up the right packet?
I solved this using Inclusion–exclusion principle.
$$p = \frac{\binom{4}{2}(4-2)! - \binom{4}{3}(4-3)! + \binom{4}{4}}{4!} = \frac{12-4+1}{24} = \frac{9}{24} = \frac{3}{8}$$
while the correct answer is $7/24$.
This question is a lot similar to the Derangement question. In the Derangement question, we calculate the number of ways that at least one (not two) student picks up the right packet using Inclusion–exclusion principle. but I don't get why it is not working here.
The method lulu suggested in the comments is optimal.
Exactly two students receive their own packet: There are $\binom{4}{2}$ ways to select which two students will receive their own packet and one way to distribute the other two packets to the other two students so that each receives the other's packet. Hence, there are $\binom{4}{2}$ such distributions.
Since it is not possible for exactly three students to receive their own packet, the only other case is that all four students receive their own packets, which can occur in one way.
Hence, the number of ways at least two of the four students can receive their own packets is $$\binom{4}{2} + \binom{4}{4}$$
Why didn't your Inclusion-Exclusion Principle argument work?
You treated the Inclusion-Exclusion Principle argument as if you had at least one student who received his/her own packet rather than at least two such students.
Two students receive their own packets: There are $\binom{4}{2}$ ways to select the students who receive their own packets and $2!$ ways to distribute the remaining packets to the remaining students so that each student receives one. Thus, there are $\binom{4}{2}2!$ such distributions, as you found.
However, we have counted each case in which three students receive their own packet three times, once for each of the $\binom{3}{2}$ ways we could have designated two of those three students as the pair of students who each received their own packets. We only want to count such cases once. Therefore, we must subtract twice the number of distributions in which three students receive their own packets.
Three students receive their own packets: There are $\binom{4}{3}$ ways to select the three students who receive their own packets and one way to distribute the remaining packet to the remaining student. Hence, there are $\binom{4}{3}$ such distributions.
However, if we subtract twice this amount from the total, we will have subtracted too much, because will have first counted the case in which all four students receive their own packets six times, once for each of the $\binom{4}{2}$ ways we could designate a pair of students as the pair that received that received their own packets, then subtracted this case eight times, twice each for each of the $\binom{4}{3}$ ways of designating three of the four students as the trio of students who received their own packets. Therefore, we will have counted the case in which all four students receive their own packets $-2$ times. Therefore, we need to add the case in which all four students receive their own packets three times.
All four students receive their own packet: This can occur in one way.
Hence, the number of favorable cases is $$\binom{4}{2}2! - 2\binom{4}{3}1! + 3\binom{4}{4}0!$$ which agrees with the result we obtained above.