\begin{center}
{\large\bf Exercise sheet 02 -- 11.04.2024}
\end{center}
\hrule
\bigskip

\setcounter{bsp}{6}	% gleich der Nummer des letzten Beispiels des letzten Übungszettels

\begin{bsp}
The joint distribution of the pair of random variables $(X,Y)$ is given by the following matrix: 
$$
\begin{tabular}{c|ccc}
	$(i,j)$ &\, 1\, \, &\, 3\, \, &\, 4 \; \\
	\hline
	0 &0.04	&0.09 &0.27\\	
	2 &0.06	&0.12 &0.42\\
\end{tabular}
$$
For example, $\Prob[ (X,Y)=(0,1)]=0.04$.
\begin{enumerate}
\item Calculate the marginal distributions of $X$ and $Y$.
\item Are $X$ and $Y$ independent?
\item Calculate the covariance $\Cov(X,Y)$ of $X$ and $Y$, which is defined by
\[
\Cov(X,Y)=\Expect\left((X-E(X))(Y-\Expect(Y))\right) .
\]
\end{enumerate}
\end{bsp}

\begin{bsp}
Let $(X_n)_{n\in\mathbb{N}}$ be an infinite sequence of independent random variables with $\Prob[X_n=1]=p_n$ and $\Prob[X_n=0]=1-p_n$. Show:
\begin{enumerate}
    \item $X_n \rightarrow 0$ in probability if and only if $p_n \rightarrow 0$.
    \item $X_n \rightarrow 0$ almost surely if and only if $\sum_{n\geq 1} p_n < \infty$.
\end{enumerate}
(For the second part, you may use the \emph{Borel-Cantelli Lemma} without proof, although it can be shown directly.)
\end{bsp}

\begin{bsp}
Show that a random variable $X: \Omega \rightarrow \R$ is almost surely constant, if and only if 
\[{\Var}(X)=0\, .\]
(A random variable $X$ is called almost surely constant, if 
$\Prob[X=a]=1$ holds for some $a \in \R$.)
\end{bsp}

\begin{bsp}
    Let $X_1, X_2, \dots $ be a sequence of i.i.d. random variables and let $N$ be an integer-valued random variable independent of the $X_i$. Let 
    \[
    S= X_1 + \dots + X_N = \sum_{i=1}^\infty X_i \Indicator{i \leq N}. 
    \]
    Show that 
    \[
    \Var(S) = \Var(X_1)\Expect(N) + \left(\Expect(X_1)\right)^2 \Var(N).
    \]
\end{bsp}

\begin{bsp}
Given a non-negative integer-valued random variable $X$, show
\begin{enumerate}
    \item $\displaystyle{\sum_{i=0}^{\infty} \,i \, \Prob[X \geq i] 
            = \frac{1}{2}\left({\Expect}(X^2) + {\Expect}(X)\right)}$,
    \item $\displaystyle{\Expect(X^2) 
            = \sum_{i=0}^{\infty} \,i \,  \left(\Prob[X \geq i]+\Prob[X>i]\right)}$.
\end{enumerate}
\end{bsp}







