Let's say we have n dice. We roll all of them at the same time. $Z$ denotes the sum of the number of dice that had the same result. For example, if we have rolled 5 dice at the same time, 2 of them yield 1 and 2 of them yield 6, and the last one yields 4, then $Z$ will equal $2+2 =4$. What is the expectation of $Z$?
I write the probability that each die will show a specific number. with a probability of $1/6$, each die shows the number $i$ (from 1 to 6) and with a probability of $5/6$ it does not show the rest of the numbers, this has a binomial distribution but I'm not sure how to use it to calculate $E(Z)$.
I understood that $Z$ denotes the number of dice that show a number that also appears on another die. The chance that the number on die $k$ will not repeat on any of the other dice is $(5/6)^{n-1}$, so $$E(Z)=n-n(5/6)^{n-1}\,.$$