# Expected number of objects chosen by both A and B

Suppose that A and B each randomly, and independently, choose 3 of 10 objects. Find the expected number of objects chosen by both A and B.

solution: Let $$X$$ be the number of objects chosen by both A and B. For $$1≤i≤10$$, let $$X_i=1$$ if object $$i$$ is chosen by A and B, else $$0$$ otherwise

Then $$X=X_1+\ldots+X_{10}$$.

We find $$E[X_i]=0⋅P(X_i=0)+1⋅P(X_i=1)=P(X_i=1)=9/100$$.

By the linearity of expectation, $$E[X]=10⋅E[Xi]=0.9$$

I understand this approach but I can't get the same answer by multiplying the probability of A and B having 1,2,3 objects in common by the values 1,2,3 and adding them, why is this approach concerned wrong ? I assumed x is the number of objects chosen by both thus it takes the values 1,2,3

• What do you get for the probabilities of 1, 2, or 3 objects in common? – paw88789 Feb 22 at 18:06
• The alternate approach you suggest can be correct (though it is often considered far less elegant and is more prone to error or difficulty). The error must be in your calculations themselves, which you have not yet shared. Show us your calculations and we'll tell you where your mistake is. – JMoravitz Feb 22 at 18:09
• $\frac{1}{\binom{10}{3}*\binom{10}{3}}\left [ 1*\binom{10}{1}\binom{9}{2}\binom{9}{2} + 2*\binom{10}{2}\binom{8}{1}\binom{8}{1} + 3*\binom{10}{3} \right ]$ I think I'm over counting somewhere here – Saratcı Feb 22 at 18:56
• @Saratci : disallow selection of the same "uncommon" item. $$\dfrac{\dbinom{10}{1}\dbinom{9}{2}\dbinom{7}{2}+2\dbinom{10}{2}\dbinom 81\dbinom 71+3\dbinom{10}3}{\dbinom{10}3^2}=\dfrac 9{10}$$ – Graham Kemp Feb 23 at 3:53
• Yes you are right, Thanks ! – Saratcı Feb 23 at 22:15