In a given family there are $N$ children, $X$ of them are boys and $Y$ are girls. We define a random variable $T$ as $T=X-Y$. Assuming that the probability of birth of males and females are equal, find the expectation and variance of $T$.
My efforts:
first try is by finding the PDF of $T$:
$P(T=t)=P(X-Y=t)=\sum\limits_{n=0}^{N}P(X-Y=t,Y=n)=\sum\limits_{n=0}^{N}P(X=n+t)=\sum\limits_{n=0}^{N} {N \choose n+t} (\frac{1}{2})^{n+t}(\frac{1}{2})^{N-(n+t)}=\frac{1}{2^N}\sum\limits_{n=0}^{N} {N \choose {n+t}}$ now that's seems a little off because $n+t$ exceeds the summation limit. Also, I can't get a nice closed formula from this expression.second attempt:
$\mathbb E[T]=\mathbb E[X-Y]= \mathbb E[X]-\mathbb E[Y] = 0$, for simmetry reasons (I would like for a better explantion for that, because I'm practicing for an exam. Is it sufficient to say that $X,Y$ has the same range and the same probability?)$\mathbb V[T]=\mathbb E[(X-Y)^2]-\mathbb E[X-Y]^2=\mathbb E[X^2]-2\mathbb E[XY]-\mathbb E[Y^2]=-2\mathbb E[XY]$
that's seem way more off because $X,Y$ and the variance is always non negative, so no reason for $\mathbb E[XY]$ to be negative.
Edit: as stated by lulu on the comments, I miscalculated the variance (actually on the sign of $\mathbb E[Y^2]$)
Any help would be appreciated.
Also keep in mind that I'm interested on finding the PDF, although it's not a part of the original question.
Thanks
This is much too complicated. Rather, note that because $X + Y = N$, then $$T = X - Y = X - (N - X) = 2X - N.$$ Since $N$ is not a random variable but a fixed parameter, we can compute the expectation and variance as $$\operatorname{E}[T] = \operatorname{E}[2X - N] = 2\operatorname{E}[X] - N = 2(N/2) - N = 0,$$
and $$\operatorname{Var}[T] = \operatorname{Var}[2X - N] = \operatorname{Var}[2X] = 4\operatorname{Var}[X] = 4N(1/2)(1-1/2) = N.$$
I should also point out that the expectation calculation in your second attempt is correct: you can justify $\operatorname{E}[X - Y] = \operatorname{E}[X] - \operatorname{E}[Y] = N/2 - N/2 = 0$ because $X$ and $Y$ need not be independent in order for the linearity of expectation to apply. However, in your variance calculation, you must account for the fact that $X$ and $Y$ are dependent--in fact, they are perfectly correlated because $X + Y = N$.
The PDF of $T = 2X - N$ is simply $$\Pr[T = t] = \Pr[X = (t+N)/2] = \binom{N}{(t+N)/2} 2^{-N}, \\ t \in \{-N, -N+2, \ldots, N-2, N\}.$$ This is not a binomial distribution, but a location-scale transformation of one.