# What is the expected number of correct matches that the medium will make (by chance)?

In a test of ‘psychometry’ the car keys and wrist watches of 5 people are given to a medium. The medium then attempts to match the wrist watch with the car key of each person. What is the expected number of correct matches that the medium will make (by chance)?

I am stuck with this problem. I know that to obtain the expected number of matches, I need to first obtain the probability of getting a match. But the probability of getting a match is different after every guess the medium takes. So for example the probability of making a match for the first guess is $$1/5$$ since there is $$1$$ watch out of the $$5$$ that matches the corresponding key. And then after that guess the probability of a match is $$1/4$$ and so on. But how do I get a general probability? Am I reasoning about this problem the wrong way?

• I think you need to define the number of "trials" to answer your question. You may also need to determine if your probability problem is with replacement or without replacement. Oct 3, 2021 at 18:31
• @Sympa That's the only information I got from the textbook Oct 3, 2021 at 18:32
• You are correct that the matches are not independent. But that does not matter for expectation. So the expectation that my key and watch are matched is apparently $\frac15$ (counting $1$ for a match and $0$ for a non-match), and similarly a match for your key and watch, and so on for the other three people. You can then add up the expectations Oct 3, 2021 at 21:22
• This is the a slightly disguised version of the 'problem of derangements' or 'item matching problem'. I googled and got several potentially useful hits, but could find no duplicates on this site. Oct 3, 2021 at 21:47
• Cross-post: math.stackexchange.com/q/4266888/321264 Oct 4, 2021 at 6:14

Let $$I_i = 1$$ if person $$i$$'s keys and watch are correctly matched, $$I_i = 0,$$ otherwise. Then $$P(I_i = 1) = 1/5, E(I_i) = 1/5,$$ and then number $$X$$ of matches among the five is $$E(X) = 1,$$ by adding expectations of the five $$I_i$$'s. Remarkably, if there are $$n = 1, 2, \dots$$ people instead of $$n=5,$$ then the expected number of matches remains $$1.$$

It is also true that $$V(X) = 1,$$ for any number of participants, but this is more difficult to prove because the indicator variables $$I_i$$ are not mutually independent.

If the number of participants is $$n=10$$ or more the number of matches is approximately $$X \sim \mathsf{Pois}(1).$$ The approximation is not perfect because $$P(X = n-1) = 0$$ and $$P(X > n) = 0.$$

By inclusion-exclusion methods, one can show that $$P(X = 0) = 1/2! - 1/3! +- \cdots + (-1)^n/n!.$$

set.seed(2021)
n = 10
x = replicate(10^6, sum(sample(1:n)==1:n))
mean(x);  sd(x)
[1] 0.999755    # aprx E(X) = 1
[1] 0.9989144   # aprx SD(X) = 1


The histogram below (blue) shows the simulated number of matches among ten people. Open circles (red) show the distribution of $$\mathsf{Pois}(1).$$

cutp = (-1:n)+.5
hdr = "Item Matches Compared with POIS(1)"
hist(x, prob=T, br=cutp, col="skyblue2", main=hdr)
k=0:10;  pdf = dpois(k, 1)
points(k, pdf, col="red")