\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

\input{c:/[TeX]/myCommands}
\input{c:/[TeX]/myDiacritics}

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




\begin{document}

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

    \vspace{0.2in}

    \begin{enumerate}

        \item Let $y_i | \theta \iid \dBern{\theta}$ for $i \in \{1, ..., n\}$, and let $p(\theta) = I_{[0,1]}(\theta)$, i.e. $\theta$ is uniform on $[0,1]$.
            \begin{enumerate}
                \item Obtain the marginal density of $(y_1, ..., y_n).$
                \item Calculate the predictive probability that $y_{n+1} = 1$ given that $y_1 = ... = y_n = 1$. Simplify the formula you get using the fact that $\Gamma(a+1) = a \Gamma(a)$ and thus establish that for $n=1000$, $\prob{y_{n+1}=1} = \frac{1001}{1002}$.
            \end{enumerate}
            
        \item Suppose in a random sample of 10 transportation workers, all were found to be on drugs. Find Box's marginal $p$-value and perform Bayesian significance tests to evaluate whether such data are consistent with the following models:
            \begin{enumerate}
                \item $y_1, ..., y_{10} \mid \theta \iid \dBern{0.10}$
                \item $y_1, ..., y_{10} \mid \theta \iid \dBern{\theta}; \tab \theta \sim \dBeta {0.05}{0.45}$
                \item $y_1, ..., y_{10} \mid \theta \iid \dBern{\theta}; \tab \theta \sim \dBeta {1}{1}$
            \end{enumerate}
            
        \item Let $y | \theta \sim \dPois{\theta}$. Conduct the following Bayesian hypothesis tests:
            \begin{enumerate}
                \item Assume a prior on $\theta$ of $\dGamma{1}{1}$. For $H_0: \theta \leq 1$ versus $H_1: \theta > 1$ obtain the formula for the posterior probability that $H_0$ is true. Use software (e.g. R, WinBUGS) to calculate the probability for $y = 3$, $5$, and $7$.
                \item For $H_0: \theta = 1$ versus $H_1: \theta \neq 1$ with $q_0 = 0.5$ and $p_1(\theta) = e^{-\theta}$, obtain the analytical formula for the posterior probability that $H_0$ is true. Use software (e.g. WinBUGS, R) to calculate the exact probabilities for $y = 3$, $5$, and $7$.
            \end{enumerate}
            
        \item For $h > 0$, let $x_1, ..., x_h$ be exchangeable random quantities and let $$y_h = \frac{1}{h} \sum_{i=1}^h x_i.$$ Assume that for each random quantity $x_i$, all moments exist---that is, $$\E{x_i} = \mu_1, \quad \E{x_i^2} = \mu_2, \quad ....$$ Further assume that $n \leq h$ and let $j_i$ for $i \in \{1,...,h\}$ represent any of the $h!$ re-orderings of the indicies $1,...,h$. Then
            $$\E{\prod_{i=1}^n x_{j_i}} = m_n.$$
            Prove that for all $n$,
            $$\lim_{h \to \infty} \E{y_h^n} = m_n$$

    \end{enumerate}

\end{document}