The random variables are $N,X_1,X_2,..$ are independent,$N \in po(\lambda)$ and $X_k \in Be(1/2)$, $k \geq 1$.
Set $Y_1 = \sum\limits_{k=1}^{N}X_k $ and $Y_2 = N - Y_1$. Here $Y_1 = 0$ for $N = 0$. Show that $Y_1$ and $Y_2$ are independent, and determine their distributions.
My idea, as for the independency,
Pr($Y_1 = z , N-Y_1 = k$ ) = Pr($Y_1 = z, N = z + k $ ) = Pr($\sum\limits_{k=1}^{z+ k}X_k = z , N = z + k$) = Pr($Y_1 = z)Pr(N - Y_1 =k)$ , the last equality because $N$ and $X_1,X_2,...$ are independent so are $N$ and $g(X_1,X_2,...)$ for any real function $g$ , the last statement i can't prove maybe someone could show me?. anyhow Iam a bit unsure about my reasoning since $N$ is poissonian $Y_2 = N-Y_1$ could take on values that $Y_1$ cannot ( e.g any fraction ) , but then this: $Pr(Y_1 = z , N-Y_1 = k ) = Pr(Y_1 = z)Pr(N - Y_1 =k)$ only holds for integer values $z$. Is there anyone how could clarify these things further?
For $Y_1$, $Y_2$ to be independent it must hold $\mathbb{P}(Y_1=k_1,Y_2=k_2) = \mathbb{P}(Y_1=k_1) \mathbb{P}(Y_2=k_2)$, i.e., the joint distribution is equal to the product of marginal distributions.
We know the following: \begin{equation} \mathbb{P}(N=n)=e^{-\lambda}\frac{\lambda^n}{n!},\; n=0,1,\ldots, \end{equation}
and \begin{equation} \mathbb{P}(Y_1=k_1|N=n) = {n \choose k_1}p^{k_1}(1-p)^{n-k_1},\; k_1 = 0,1,\ldots,n, \end{equation} with $p=1/2$.
Now, \begin{align} \mathbb{P}(Y_1=k_1,Y_2=k_2)&=\mathbb{P}(Y_1=k_1,N-Y_1=k_2)\\ &=\mathbb{P}(Y_1=k_1,N=k_1+k_2)\\ &=\mathbb{P}(Y_1=k_1|N=k_1+k_2)\mathbb{P}(N=k_1+k_2) \end{align}
From this point on you should be able to find (after some algebra) that $Y_1$, $Y_2$ are indeed independent as well as their marginal distributions.
Remark: The above result is a special case of a more general result concerning homogeneous Poisson point processes (HPPPs) which states that when the points of a HPPP of intensity $\lambda$ are independently ''marked'' (selected) with probability $p$, the result is two independent HPPPs of intensities $\lambda p$ and $\lambda (1-p)$, respectively.