\documentclass{article}
\usepackage{titling}

\title{MATH 418/544, Assignment 4}
\date{Due 2023-12-02, 23:59} %replace by your name and student id

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 
\usepackage{amsmath,amsthm,amsfonts,amssymb}  %math stuff
\usepackage{graphicx} %to embed images
\usepackage{enumitem} %fancy lists
\usepackage{fullpage} %smaller margins
\usepackage{color} %guess

\setlist[itemize,1]{nosep}
\setlist[enumerate,1]{nosep,label=(\alph*)}

\renewcommand{\P}{\mathbb{P}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\cA}{\mathcal A}
\newcommand{\cB}{\mathcal B}
\newcommand{\cF}{\mathcal F}
\newcommand{\cG}{\mathcal G}
\newcommand{\cH}{\mathcal H}
\newcommand{\eps}{\varepsilon}
\renewcommand{\phi}{\varphi}
\newcommand{\ind}{{\mathbf 1}}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Poi}{Poi}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\Exp}{Exp}
\DeclareMathOperator{\Bin}{Bin}
\DeclareMathOperator{\Geom}{Geom}

\newtheorem{lemma}{Lemma}
\newtheorem{thm}{Theorem}
\theoremstyle{definition}
\newtheorem{defn}{Definition}
\newtheorem{problem}{Problem}
\newtheorem{starproblem}[problem]{*Problem}
\newtheorem{sstarproblem}[problem]{**Problem}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}

\noindent \thetitle \hfill \thedate

\noindent\rule{\textwidth}{.1mm}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  Find a random variable $X$, and two $\sigma$-algebras $\cG,\cH$ so that
  $\E(\E(X|\cG)|\cH) \neq \E(\E(X|\cH)|\cG)$.
  (Hint: a finite $\Omega$ is possible).
\end{problem}

%your solution here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  If a random variable has characteristic function $\phi(t) = (1-|t|)^+$, 
  find its density.
\end{problem}

%your solution here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  If $X_n$ converge in distribution to $X$, and $Y_n$ converge in probability to $0$, show that $X_n+Y_n$ converge in distribution to $X$.
\end{problem}

%your solution here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  \begin{itemize}
  \item If $X_n\to X$ and $Y_n\to Y$ in probability show that $X_n+Y_n\to X+Y$
    in probability. 
  \item Do the same for convergence in $L^p$ for $p\geq 1$.
  \item Show this fails for convergence in $L^p$ for $p<1$.
  \item Show this fails for convergence in distribution.
  \end{itemize}
\end{problem}

%your solution here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  Suppose random variables $(X,Y)$ have joint density $f(x,y)$ on $\R^2$.
  Let $Z(y) = \int_\R x f(x,y) dx / \int_\R f(x,y) dx$.
  Show that $Z=\E(X|Y)$ using the definition.
\end{problem}

%your solution here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  Construct a martingale $X_n$ so that $X_n\to\infty$ a.s.
\end{problem}

%your solution here

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{problem}
  \textbf{Do not hand this in; a related problem will be in the exam instead.}
  Let $X_i$ be i.i.d. bounded integer random variables, and let $S_n = \sum_{i\leq n} X_i$. 
  Suppose $\P(X>0)$ and $\P(X<0)$ are both non-zero, and $\E X\neq 0$. 
  \begin{enumerate}
  \item Show that there is some $0<q\neq 1$ so that $q^{S_n}$ is a martingale.
  \item Find that $q$ when $X_n$ is $\pm1$ with probabilities $p,1-p$.
  \item Use this to find $\P_k(T_n<T_0)$, where $T_a = \inf\{t : X_t=a\}$.
  \end{enumerate}
\end{problem}


\begin{sstarproblem}
  If $X_n$ are independent random variables such that $\sum \E X_n$ exists,
  and that $\sum X_n$ converges a.s., must it be that $\E \sum X_n = \sum
  \E X_n$?
\end{sstarproblem}

\end{document}
