<s>[INST] Probability of almost correct order Let's say I'm a teacher handing tests back to seven students. 
If I do it with my eyes closed, what's the probability I hand exactly 5 of the tests back to the correct students? 
There are many possible ways this could happen, and if my understanding of probability is correct, the sum of the individual probabilities of all possibilities where I hand exactly 5 back to the correct student yields the answer I'm looking for. 
One such probability (hand out the first two tests incorrectly): 
$$\frac{6}{7}\cdot\frac{5}{6}\cdot\frac{1}{5}\cdot\frac{1}{4}\cdot\frac{1}{3}
\cdot\frac{1}{2}\cdot\frac{1}{1} $$
Another probability (hand out the last two tests incorrectly): 
$$\frac{1}{7}\cdot\frac{1}{6}\cdot\frac{1}{5}\cdot\frac{1}{4}\cdot\frac{1}{3}
\cdot\frac{1}{2}\cdot\frac{1}{1} $$
One more: 
$$\frac{1}{7}\cdot\frac{1}{6}\cdot\frac{4}{5}\cdot\frac{1}{4}\cdot\frac{2}{3}
\cdot\frac{1}{2}\cdot\frac{1}{1} $$
We can simplify these probabilities to: 
$$\frac{6\cdot5}{7!}, \frac{1\cdot1}{7!}, \frac{4\cdot2}{7!} $$
More generally, we can think about all possible times when the two incorrect letters might occur, and deduce that the sum of all possible probabilities is: 
$$\frac{6(5+4+3+2+1)+5(4+3+2+1)+4(3+2+1)+3(2+1)+2(1)+1(1)}{7!}$$
Is this really the answer? I really feel like I missed something that would simplify this answer. 
 [/INST] There are $$\binom{7}{2}$$ ways to choose the $2$ students who receive the wrong tests. Obviously, the only way for this to happen is if their tests are switched. 
There are $7!$ total ways to hand back the tests, so the probability is
$$\frac{\binom{7}{2}}{7!} = \frac{1}{2 \cdot 5!} = \boxed{\frac{1}{240}}$$
A related question would be: what is the probability that you hand back no tests to the correct students? If this interests you, you should read about derangements. 
</s>