\documentclass[11pt]{amsart}
\usepackage{amssymb}
\usepackage{enumitem}
\usepackage[paperheight=11in,paperwidth=8.5in,left=1in,top=1in,right=1in,bottom=1in]{geometry}
\usepackage{hyperref}
\usepackage{mathtools}
\newcommand{\pr}{\mathbb{P}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\R}{\mathbb{R}}

\begin{document}
\title{STAT 150 Homework \#1}
\author{Spring 2023}
\maketitle

\textbf{Due Friday, Jan 27th, at 11:59 PM on Gradescope.}

\bigskip{}

\begin{enumerate}[label=\arabic*., leftmargin=*]
\setlength{\itemsep}{12pt}

\item Pinsky and Karlin, Problem 1.3.11
  
\item Pinsky and Karlin, Problem 1.4.3

\item Pinsky and Karlin, Problem 1.5.7 

\item Pinsky and Karlin, Problem 1.5.8

\item Pinsky and Karlin, Problem 2.1.2

\item Pinsky and Karlin, Problem 2.1.9
 
\item Let $X$ be a random variable. Recall that the moment generating function (or MGF for short) $M_X(t)$ of $X$ is the function $M_X: \R \to [0, \infty]$ defined by $t \mapsto \E[e^{tX}]$. Now suppose that $X \sim \text{Gamma}(\alpha, \lambda)$, where $\alpha, \lambda > 0$. Prove that
    \[
      M_X(t) = \begin{dcases}
        \left(\frac{\lambda}{\lambda - t}\right)^\alpha &\text{if } t < \lambda; \\
        \infty &\text{if } t \geq \lambda.
      \end{dcases}
    \]
  
\item Let $X$ be a random variable with finite variance. Prove that the mean $\mu = \E[X]$ is the unique minimizer of the function $f: \R \to \R$ defined by $f(r) = \E\left[|X-r|^2\right]$. In other words, prove that $f(r) \geq f(\mu)$ for any $r \in \R$ with equality if and only if $r = \mu$.
\item Let $X$ be a random variable. We say that $m \in \R$ is a \emph{median} of $X$ if
  \[
    \min\{\pr(X \leq m), \pr(X \geq m)\} \geq \frac{1}{2}.
  \]
  You may assume that a median always exists (for fun, you can try to prove this).
  \begin{enumerate}[label=(\alph*)]
  \item Is a median necessarily unique? Prove or provide a counterexample.
  \item Suppose that $m$ is a median of $X$. Prove that
    \[
      \pr(X \geq m + \varepsilon) \leq \pr(X \leq m + \varepsilon)
    \]
    for any $\varepsilon > 0$. Think about why this should be true intuitively.
  \item Assume that $\E[|X|] < \infty$. Prove that a median minimizes the function $g: \R \to \R$ defined by $g(r) = \E\left[|X-r|\right]$ (note the contrast to problem 8). Hint: you may use the fact that
    \[
      \E[Y] = \int_0^\infty \pr(Y \geq t)\, dt
    \]
    for any non-negative random variable $Y$. Apply this to compare $\E\left[|X-r|\right]$ and $\E\left[|X-m|\right]$ with the help of part (b). You may also assume that $r > m$ (ask yourself why you can make this assumption though).
  \end{enumerate}
\end{enumerate}

\end{document}