\documentclass[11pt]{article}

\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}   % General awesomeness???
\usepackage{hyperref}
\usepackage{multirow}

\textwidth=6.5in
\textheight=9.0in
\oddsidemargin=0.0in
\evensidemargin=0.0in
\topmargin=0.0in
\headheight=0.0in
\headsep=0.0in
\parskip=0.0in
\parindent=0.0in

% Spacing commands
    \newcommand{\tab}{\hspace{0.5in}}
    \newcommand{\tib}{\hspace{0.1in}}
    \newcommand{\vib}{\vspace{0.15in}}


% Statistics function commands
    \newcommand{\prob}[1]{\operatorname{Pr} \left[ #1 \right]}
    \newcommand{\pdf}[2][]{f_{ #1 } \left( #2 \right)}
    \newcommand{\cdf}[2][]{F_{ #1 } \left( #2 \right)}
    \newcommand{\E}[2][]{\operatorname{E}_{ #1 } \! \left[ #2 \right]}
    \newcommand{\Var}[2][]{\operatorname{Var}_{ #1 } \! \left[ #2 \right]}
    \newcommand{\Cov}[2]{\operatorname{Cov} \left[ #1, #2 \right]}
    \newcommand{\info}[1]{\mathscr{I} \!\! \left( #1 \right)}

    \newcommand{\dBern}[1]{{\operatorname{Bern} \left( #1 \right)}}
    \newcommand{\dBeta}[2]{{\operatorname{Beta} \left( #1, #2 \right)}}
    \newcommand{\dBin}[2]{{\operatorname{Bin} \left( #1, #2 \right)}}
    \newcommand{\dCauchy}[1]{{\operatorname{Cauchy} \left( #1 \right)}}
    \newcommand{\dChiSq}[1]{{\chi^2 \left( #1 \right)}}
    \newcommand{\dDch}[3]{{\operatorname{Dirichlet} \left( #1, #2, #3 \right)}}
    \newcommand{\dExp}[1]{{\operatorname{Exp} \left( #1 \right)}}
    \newcommand{\dGamma}[2]{{\operatorname{Gamma} \left( #1, #2 \right)}}
    \newcommand{\dGeom}[2]{{\operatorname{Geom} \left( #1, #2 \right)}}
    \newcommand{\dMulti}[2]{{\operatorname{Mult} \left( #1, #2 \right)}}
    \newcommand{\dNegBin}[2]{{\operatorname{NegBin} \left( #1, #2 \right)}}
    \newcommand{\dNorm}[3][]{{\operatorname{N}_{ #1 } \! \left( #2, #3 \right)}}
    \newcommand{\dPois}[1]{{\operatorname{Pois} \left( #1 \right)}}
    \newcommand{\dUnif}[2]{{\operatorname{Uniform} \left( #1, #2 \right)}}
    \newcommand{\dWeib}[2]{{\operatorname{Weibull} \left( #1, #2 \right)}}


% Statistics symbol definitions and changes
    \newcommand{\iid}{\stackrel{\mathrm{iid}}{\sim}}
    \newcommand{\indep}{\perp\!\!\!\perp}
    \newcommand{\indepSim}{\stackrel{ind}{\sim}}
    \newcommand{\cLaw}{\stackrel{\mathscr{L}}{\longrightarrow}}
    \newcommand{\cProb}{\stackrel{\mathscr{P}}{\longrightarrow}}
    \newcommand{\cAS}{\stackrel{\mathrm{a.s.}}{\longrightarrow}}

    \renewcommand{\bar}{\overline}

% Mathematics symbol definitions and changes
    \newcommand{\rfrac}[2]{{}^{#1}\!/_{#2}}
    \newcommand{\kronecker}{\otimes}
    \newcommand{\tr}[1]{\operatorname{tr} \left( #1 \right)}
    \newcommand{\logit}[1]{\operatorname{logit} \left( #1 \right)}
    \newcommand{\logistic}[1]{\operatorname{logistic} \left( #1 \right)}
    \newcommand{\expit}[1]{\operatorname{expit} \left( #1 \right)}
    \newcommand{\Real}{\rm I\!R}
    \newcommand{\nin}{\not\in}

    \renewcommand{\d}{\partial}
    \renewcommand{\ln}{\ell n}
    \renewcommand{\approx}{\simeq}
    \newcommand{\appx}{\simeq}


% Greek alphabet changes
    \newcommand{\vep}{\epsilon}
    \newcommand{\vphi}{\varphi}
    \newcommand{\vtheta}{\vartheta}
    \renewcommand{\epsilon}{\varepsilon}

\renewcommand{\labelenumi}{\arabic{enumi}.}
\renewcommand{\labelenumii}{(\alph{enumii})}




\begin{document}

    \begin{center}
        {\Large \sc Stats 579 -- Intermediate Bayesian Modeling}\\
        \vspace{0.25in}
        {\Large Assignment \# 2}\\
    \end{center}

    \vspace{0.2in}

    \begin{enumerate}

        \item Let $w \equiv G(y)$ with $y$ a vector having density $f(y \mid \theta)$ and $G$ having a differentiable inverse function. Find the density of $w$ in general and show that the likelihoods satisfy $L(\theta \mid y) \propto L(\theta \mid w)$. (HINT: Proposition B.4 from the textbook may be useful.)

        \item Let $y_i \sim f(y_i \mid \theta)$ where $i \in \{1, ..., n\}$, and let $\bar{y} = \frac{1}{n} \sum_{i=1}^n y_i$. Prove the following statement: $$\sum_{i=1}^n (y_i - \theta)^2 = \sum_{i=1}^n (y_i - \bar{y})^2 + n (\bar{y} - \theta)^2$$

        \item Let $y | \theta \iid \dExp{\theta}$ where $i \in \{1, ..., n+1\}$, and let $p(\theta) = e^{-\theta}$.
            \begin{enumerate}
                \item Given $y = \{y_1, ..., y_n\}$, obtain the predictive probability that $y_{n+1} > t_0$ using calculus. Argue that this probability is the posterior mean of a particular function of $\theta$.
                \item How would you interpret the difference between the meaning of these two quantities (the predictive probability and the posterior mean of a function of $\theta$), despite the fact that the values are identical?
            \end{enumerate}

        \item Let $y | \theta \iid \dPois{\theta}$ where $i \in \{1, ..., n+1\}$, and let $p(\theta) = e^{-\theta}$. Given $y = \{y_1, ..., y_n\}$, obtain the predictive probability that $y_{n+1} = 0$ using calculus. Argue that this probability is the posterior mean of a particular function of $\theta$.

    \end{enumerate}

\end{document} 