What is the expected number of boys? If the probability that a child is a boy is $p$,  find the expected number of boys in a family with $n$ children given that there is at least one boy?
My answer:
My friend says the answer is $np+q$ but my answer is $np/(1-q^n)$. I found my answer through conditional probability by finding the $P(X=k/X>0)$  .
My friend tells that we can find the answer by finding the expected number of boys for $n-1$ children and then add $1$ to the expectation.  Which one is right? 
 A: Let $X$ represent the number of boys $($successes$)$ out of $n$ children $($trails$)$.
So, $X$ follows the binomial distribution.
The expected number of boys in a family with $n$ children given that there is at least one boy is $$E(X/X\ge 1)=\sum_{x}x\cdot P(X=x/X\ge1)$$$$=0+\sum^n_{x=1}x\cdot\dfrac{P(X=x)}{P(X\ge1)}$$
$$=\sum^n_{x=1}\dfrac{x\cdot P(X=x)}{1-P(X<1)}$$
$$=\sum^n_{x=1}\dfrac{x\cdot P(X=x)}{1-P(X=0)}$$
$$=\sum^n_{x=1}\dfrac{x\cdot P(X=x)}{1-^nC_{0}P^0q^{n-0}}$$
$$=\dfrac{1}{1-q^n}\sum^n_{x=1}x\cdot P(X=x)$$
$$=\dfrac{1}{1-q^n}E(X)$$
Therefore, $$E(X/X\ge1)=\dfrac{1}{1-q^n}np=\dfrac{np}{1-q^n}$$
A: You can use the law of total expectation.
$$\mathbb E(X)=\mathbb E(X|X=0)\cdot P(X=0)+\mathbb E(X|X>0)\cdot P(X>0)$$
It should be obvious that $E(X|X=0)=0$. Thus
$$\mathbb E(X|X>0)=\frac{\mathbb E(X)}{P(X>0)}$$
Now we use the converse probability: $P(X>0)=1-P(X=0)=1-(1-p)^n$. Consequently 
$$\mathbb E(X|X>0)=\frac{n\cdot p}{1-(1-p)^n}$$
A: Others have already explained why your answer is correct.  This answer hopefully illustrates why your friend is wrong.  Your friend probably has the following common confusion on what conditional probability means -- I had the same confusion 30+ years ago. :)
Let $n=2, p=1/2$.  There are 4 cases $\{BB, BG, GB, GG\}$ where the first letter denotes the sex of the older child, and the second letter denotes the sex of the younger child.  Each case has equal probability $1/4$.


*

*Problem stmt: "given there is at least one Boy" means condition on the event $E= \{BB, BG, GB\}$.  The expected number of Boys is ${1 \over 3} (2 + 1 + 1) = {4 \over 3}$.

*Now consider a different problem stmt: "given the older child is a Boy".  This would condition on the event $E'=\{BB, BG\}$ and the expected no. of Boys $={1\over 2} (2 + 1) = {3 \over 2}$.  This is your friend's answer.  
Basically your friend is counting a "sure thing" (the $1$) and then assuming that the sure thing does not affect the distribution of "the rest" (the $(n-1)p$).  If the "sure thing" is the older boy, then indeed that does not affect the distribution of the rest of the kids.  But if the "sure thing" is "at least one boy" then it does affect the distribution of the rest of the kids, because who constitutes "the rest" may change depending on who constitutes the "sure thing".
A simpler version of this example: Flip 2 fair coins -- and for dramatic effect use 2 distinguishable coins (e.g. a quarter + a dime, if American).  If there is at least 1 Head, what is the probability the other coin is also Head?  The correct answer is $1/3$, while your friend would wrongly answer $1/2$.  If your friend insists, I suggest you offer 50-50 odds and bet on the other coin being Tail (correct prob $2/3$).  Remember to physically illustrate the meaning of conditional probability as follows: whenever the result is 2 Tails (i.e. not at least 1 Head), then it's a do-over and you reflip both coins.  Play this 20 times, win some money, and convince your friend.
