\documentclass[a4paper, 12pt]{article}
\usepackage[left = 3cm, right=3cm, top=2cm, bottom=2.5cm, marginparwidth=3cm, marginparsep= 0.75cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{xspace}
\usepackage{mathtools,amsmath,amsfonts,amsthm}
\usepackage{enumerate}
\usepackage{systeme}
\usepackage{multicol}

\usepackage{marginnote}
\usepackage{hyperref}

\newcommand{\punkte}[1]{\marginnote{\textbf{\footnotesize (#1 Pkt.)}}}

\newcommand{\CC}{\mathbb{C}}
\newcommand{\EE}{\mathbb{E}}
\newcommand{\NN}{\mathbb{N}}
\newcommand{\PP}{\mathbb{P}}
\newcommand{\QQ}{\mathbb{Q}}
\newcommand{\RR}{\mathbb{R}}
\newcommand{\VV}{\mathbb{V}}
\newcommand{\ZZ}{\mathbb{Z}}

\newcommand{\Ac}{\mathcal{A}}
\newcommand{\Pc}{\mathcal{P}}

\let\vphi\phi
\renewcommand{\phi}{\varphi}

\let\vtheta\theta
\renewcommand{\theta}{\vartheta}
\newcommand{\eps}{\varepsilon}

\newcommand{\Acal}{\mathcal{A}}
\newcommand{\Fcal}{\mathcal{F}}
\newcommand{\Pcal}{\mathcal{P}}
\newcommand{\Xcal}{\mathcal{X}}
\newcommand{\Ccal}{\mathcal{C}}
\newcommand{\Ycal}{\mathcal{Y}}
\newcommand{\stcomp}[1]{{#1}^{\mathsf{c}}}

\newcommand{\Prob}{\PP}
\newcommand{\Cov}{\operatorname{Cov}}
\newcommand{\Var}{\VV}
\newcommand{\Expect}{\EE}
\newcommand{\Indicator}{1\!\!1}


\DeclareMathOperator{\Tr}{Tr}
\DeclareMathOperator{\rang}{rang}
\DeclareMathOperator{\im}{im}
\DeclareMathOperator{\spec}{spec}
\DeclareMathOperator{\diag}{diag}


\DeclarePairedDelimiter\br{(}{)}
\DeclarePairedDelimiter\abs{|}{|}
\DeclarePairedDelimiter\norm{\|}{\|}
\DeclarePairedDelimiter\innerproduct{\langle}{\rangle}

%\theoremstyle{definition}
\renewcommand{\theenumi}{\alph{enumi}}
\renewcommand{\labelenumi}{(\theenumi)}
\renewcommand{\thesection}{\arabic{section}}


\newtheoremstyle{beispiele}% name
{12pt}% Space above
{18pt}% Space below
{}% Body font
{}% Indent amount
{\bfseries}% Theorem head font
{.}% Punctuation after theorem head
{.5em}% Space after theorem head
{}% Theorem head spec (can be left empty, meaning ‘normal’)
\theoremstyle{beispiele}
\newtheorem{bsp}{Exercise}[section]

\begin{document}

\setcounter{section}{2}

\hrule
\begin{center}
{\Large \textbf{Information Theory SS 2025}} \\[1ex]
\end{center}
\begin{center}
\textbf{\large {Institut für Diskrete Mathematik (5050), TU Graz}}
\end{center}
\begin{center}
\textbf{\large Exercise sheet \thesection\ (27.03.2025)} \\[1ex]
\end{center}  
\hrule

\bigskip



\begin{bsp}
Let $X$ be a binomially distributed random variable with parameters $n \in \NN$ and $q \in [0,1]$, i.e.\ $X \sim Bin(n, q)$.
Show:
\begin{equation*}
    \EE\br*{\frac{1}{1 + X}} = \frac{1 - (1 - q)^{n + 1}}{(n + 1) q} \,. 
\end{equation*}
\end{bsp}


\begin{bsp}
Let $(X,Y)$ be a discrete two-dimensional random variable, where $X$ takes values from $\{-2,-1,0\}$ and $Y$ from $\{-1,1\}$.
The following probabilities are known:
\begin{align*}
	\mathbb{P}[X = -2, Y = -1] &= 0.1,&
	\mathbb{P}[X = -1] &= 0.3, \\
	\mathbb{P}[X = -2, Y = 1] &= 0.2, &
	\mathbb{P}[Y = -1] &= 0.4, \\
	\mathbb{P}[X = -1, Y = 1] &= 0.3.
\end{align*}
\begin{enumerate}
	\item Calculate the complete table of probabilities of the random vector $(X,Y)$, including the marginal distributions of $X$ and $Y$.
	\item Calculate the expectation and the variance 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}
\emph{Remark: 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 \RR$ is almost surely constant, if and only if 
\[{\VV}(X)=0\, .\]
\emph{Remark: A random variable $X$ is called \emph{almost surely constant}, if 
$\Prob[X=a]=1$ holds for some $a \in \RR$.}
\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 that
\begin{enumerate}
    \item $\displaystyle{\sum_{i=0}^{\infty} \,i \, \Prob[X \geq i] 
            = \frac{{\Expect}(X^2) + {\Expect}(X)}{2}}$,
    \item $\displaystyle{\sum_{i=0}^{\infty} i  \left(\Prob[X \geq i]+\Prob[X>i]\right) = \Expect(X^2)}$.
\end{enumerate}
\end{bsp}

\end{document} 