Given $2000$ families with $4$ children in each family and suppose each sex is equally likely, what is the expected numbers of families having at least one boy?
Hint:
One friend tell me that $X$ is the number of families with at least one boy.
$p=\frac{1}{2}$
$$E(X)=\frac{1}{2}\times2000+\left(\frac{1}{2}\right)^2\times2000+\left(\frac{1}{2}\right)^3\times2000+\left(\frac{1}{2}\right)^4\times2000 =1875$$
Anyone can explain to me why the number expected of families with $i$ boys is $2000\times p^i$?
I think your "friend's" answer might be a fluke. This is because $p = 1/2$ by itself means nothing. If we assume that $p$ is the probability that a family has at least one boy, then this is wrong. The probability that family has at least one boy is $$p = 1-P(\text{A family has no boys}) = 1-\left(\frac12\right)^4 = \frac{15}{16}.$$
Using the method of indicators, I will define $$I_j = \begin{cases} 1, &\text{if $j$th family has at least one boy.}\\ 0, &\text{otherwise.}\end{cases}$$
Recall that $$E[I_j] = P(I_j) = \frac{15}{16}.$$
Finally, I will define $X$ to be the number of families that have at least one boy: $$X = I_1+I_2+\dotsb+I_{2000}.$$
Hence, using the linearity of expectation we have $$E[X] = E[I_1]+\dotsb+E[I_{2000}] = 2000\cdot\frac{15}{16} = 1875.$$
Another way to do this is to calculate $P(I_j)$ directly. You can either recognize that the number of boys a family has follows a binomial distribution, or you can use your preferred counting method, and derive the table: \begin{array}{r|ccccc} k&0&1&2&3&4\\\hline p_k&1/16&4/16&6/16&4/16&1/16 \end{array}
where $p_k$ is the probability family has $k$ boys
Notice that the expectation of $I_j$ is \begin{align*} E[I_j] &= P(I_j) \\ &= \sum_{k = 1}^4 p_k \\ &= \color{red}{\frac{4}{16}+\frac{6}{16}+\frac{4}{16}+\frac{1}{16}}\\ &= \frac{8}{16}+\frac{4}{16}+\frac{2}{16}+\frac{1}{16}\\ &= \frac{1}{2}+\frac{1}{4}+\frac{1}{8}+\frac{1}{16}\\ &=\color{red}{\left(\frac{1}{2}\right)+\left(\frac{1}{2}\right)^2+\left(\frac{1}{2}\right)^3+\left(\frac{1}{2}\right)^4}\\ &=\frac{15}{16}. \end{align*}
We will have \begin{align*} E[X] &= E[I_1]+\dotsb+E[I_{2000}] \\ &= 2000E[I_1]\\ &=2000\color{red}{\left(\frac{1}{2}\right)}+2000\color{red}{\left(\frac{1}{2}\right)^2}+2000\color{red}{\left(\frac{1}{2}\right)^3}+2000\color{red}{\left(\frac{1}{2}\right)^4}\\ &= 2000\cdot\frac{15}{16} \\ &= 1875. \end{align*}
So unless your "friend" was able to cleverly see the relationship in $\color{red}{\text{red}}$, I would say your "friend" got it right for the wrong reasons.