1

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*}$$

shoteyes
  • 1,425
tomcajot
  • 55
  • 6
  • 1
    Welcome to stackexchange. You are more likely to get help rather than downvotes or votes to close if you [edit] the question to show us what you tried and where you are stuck. This is not a "do this for me" website. – Ethan Bolker Jun 19 '21 at 14:15
  • What have you tried? For small problems like this, if you don't know what else to do, you can just list out all of the possibilities. – Joe Jun 19 '21 at 14:16
  • 1
    Have you ever heard of the "linearity of expectation"? What is the probability that the teacher gets the first person's test correct, ignoring whether or not we get any others correct? What about the second person's test ignoring whether or not we get any others (including the first) correct? It is the same, right? Now, if we were to apply linearity of expectation, how do we combine all of the results for all students into one result? – JMoravitz Jun 19 '21 at 14:20
  • The probability of having 0 correct guess is related to derangements. – Jean-Claude Arbaut Jun 19 '21 at 14:21
  • Can the teacher guess the same student for each test? – JMP Jun 19 '21 at 14:23
  • @JMP irrelevant for the question of expected value, so long as all students are equally likely to be picked for each test. Both distributions yield the same expected value via the same method. – JMoravitz Jun 19 '21 at 14:25
  • @Jean-ClaudeArbaut Irrelevant. If you want to go through the effort of keeping track of conditional probabilities, go ahead. It will be tedious and it will give the same final result after massive algebraic and arithmetical challenges (if you could even successfully simplify everything). The whole point of linearity of expectation is that $E[X+Y]=E[X]+E[Y]$ regardless whether or not the RVs are dependent or independent. – JMoravitz Jun 19 '21 at 14:27
  • 1
    Fair. I read from the post "we need to know how many correct assignments to expect by chance." I incorrectly assumed this was where the actual problem ended and that the OP incorrectly assumed that this implies that we should need to calculate the probabilities for 0,1,2,3 individually when in reality this is unnecessary information to finish the problem of calculating the expected value. The OP should clarify/confirm that he truly wants the probability distribution of the number of correct guesses as opposed to more simply just the expected number of correct guesses. – JMoravitz Jun 19 '21 at 14:28
  • @JMoravitz Oh. Actually, you may be right about the interpretation. The OP should clarify that. – Jean-Claude Arbaut Jun 19 '21 at 14:29
  • 1
    For counting the number of permutations of $n$ elements with exactly $k$ fixed points, see here that it is $!(n-k)\binom{n}{k}$. For the far simpler question of just finding the expected value, see here. One of these is surely a duplicate. Which one is dependent on the exact question OP is asking. – JMoravitz Jun 19 '21 at 14:34

2 Answers2

1

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.

BruceET
  • 51,500
0

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.

  • "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." - op – JMoravitz Jun 19 '21 at 14:46
  • @JMoravitz I didn't pay attention to this edit. I still thnk this permutations view can help him get a direction for calculating the results so I'll leave it here. – Amit Keinan Jun 19 '21 at 15:13