Probability of guessing a student's handwriting The aim of a study is to determine whether a teacher recognizes the handwriting of his students. The teacher gets 3 tests and 3 names of students and has to place the test with the correct student. In order to judge the teacher's performance, we need to know how many correct assignments to expect by chance.
What is the probability of having 0, 1, 2 and 3 right guessess?
Edit: I do know how to solve this by writing down all possibilities and looking at them, but I'd like to know if there is a way to compute this.
Edit 2: This is the answer in my book:
$$\begin{align*}
P(x=0) &= 2/6;\\
P(x=1) &= 3/6;\\
P(x=2) &= 0;\\
P(x=3) &= 1/6\\
\end{align*}$$
 A: Comments:
Famous problem, usually for $n > 3.$
If $X$ is the number of correct matches
it is easy to $E(X) = 1,$ regardless of $n,$ by using indicator functions. Also $Var(X) = 1,$ but somewhat more difficult to prove because the indicator functions aren't independent.
Inclusion-exclusion method is one way to
find $P(X = i),$ for $0, 1, \dots, n.$
Obviously, $P(X = n-1) = 0.$ See texts by Feller or Ross or this page.
$P(X = 0) = 1/2! - 1/3! +- \cdots + (-1)^n/n!.$
For $n > 10, X \stackrel{aprx}{\sim}\mathsf{Pois}(1),$ except $P(X=n-1) = P(X>n)=0.$
For $n=3, P(X = 0) = 1/3.$
i = 0:3; sum((-1)^i/factorial(i))
[1] 0.3333333  # P(X = 0) = 1/3.

By simulation for $n = 3,$ we have the following
approximations, correct to about 3 places.
stu = 1:3
set.seed(620)
x = replicate(10^6, sum(sample(stu)==stu))
table(x)/10^6
x
       0        1        3 
0.333705 0.499747 0.166548 
mean(x); sd(x)
[1] 0.999391
[1] 0.9999488

Results are in substantial agreement with answers provided
in your question and earlier statements in
this Answer.
A: The teacher guesses one student for every test, this is like guessisng a permutation of {1,2,3}.
There are six permutations of {1,2,3}:
{{1,2,3}, {1,3,2}, {2,1,3}, {2,3,1}, {3,1,2}, {3,2,1}}
I will assume WLOG that the correct permutation is {1,2,3}.
There are two permutaions that "have zero matches" with {1,2,3}, these are {2,3,1}, {3,1,2} - so the probability of zero right guesses is ${2/6=1/3}$.
Simililarly you can count permutations with one, two or three matches to get the full answer.
