# The expectation of the number of people getting their correct hats in the hat check problem, using linearity of expectations. n persons receive n hats

The expectation of the number of people getting their correct hats in the hat check problem, using linearity of expectations.
n persons receive n hats in a random fashion.
Formula used: By linearity of expectation function,
If ${X}_{1},{X}_{2},...,{X}_{n}$ are random variables, then
$E\left({X}_{1},+{X}_{2}+,...+{X}_{n}\right)=E\left({X}_{1}\right)+E\left({X}_{2}\right)+...+E\left({X}_{n}\right)$ (2)
You can still ask an expert for help

• Questions are typically answered in as fast as 30 minutes

Solve your problem for the price of one coffee

• Math expert for every subject
• Pay only if we can solve it

Let ${X}_{i}$, denote the random variable which assumes the value 1 if the person i receives his own hat and the value 0 if he doesnt.