Probability of uniform random subset 
Let $X$ be a uniform random subset of $\left \{ 1, 2, ..., n \right \}$ (i.e, $\forall A \subseteq X, \mathbb{P}(X=A)=2^{-n})$
And similarly $Y$ a uniform random subset of $X$.
a. For $n=9$, what is the probability of $|X|$ being even?
b. For any $n$, what is the probability that $|X|=|Y|$

For a. we can notice there is combinatorial symmetry between $0 \sim 9, 1 \sim 8, ... ,4 \sim 5$ and therefore the answer is $\frac{1}{2}$. But if someone could show how to solve it in a more technical way it would help me.
For b. we can notice that given some $|X|$, $\mathbb{P}(|Y|=|X|)=\mathbb{P}(Y=X) = 2^{-|X|}$ but I'm not sure how to continue from here, help would be appreciated.
 A: Hint: Formulate the questions in terms of binomial coefficients.
Especially for a., there is a one-line proof using the binomial theorem.
 Edit: Forgot to write, $\mathbb{P}[|Y| = |X|]$ is not the same as $\mathbb{P}[Y = X]$ (maybe you are considering the case when $X = \{1,\ldots,n\}$). (This is wrong as pointed out in the comment by OP below. However, the earlier part of the answer stands. Use the binomial thoerem.)
A: For (a), another approach (which works for any $n$) is to realise that if we go through each element in order to decide whether we include it in $X$ or not, the parity of $|X|$ is determined by whether $n\in X$, so the probability is $\frac{1}{2}$.
More explicitly: let $p$ be the probability that a random subset of $\{1,\dots,n-1\}$ has even size. If $n\in X$, we need $|X\cap[n-1]|$ to be odd; else $n\not\in X$, so $|X\cap[n-1]|$ must be even. Then the probability we seek is $\frac{1}{2}\cdot(1-p)+\frac{1}{2}\cdot p=\frac{1}{2}$.

For (b), we can say using the law of total probability
$$\mathbb P(|X|=|Y|)=\sum_{k=0}^n\mathbb P(X=Y\mid |X|=k)\cdot\mathbb P(|X|=k)=\sum_{k=0}^n2^{-k}\cdot\mathbb P(|X|=k).$$
Can you finish from here?
