\documentclass{amsart}

% PACKAGES

\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb,enumerate}
\usepackage{amsthm,stmaryrd}
\usepackage[all]{xy}
\usepackage{hyperref}
\usepackage{multicol}
\usepackage{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}

\theoremstyle{definition}
\newtheorem{exer}{Exercise}

\newcommand{\bbr}{\mathbb{R}}
\newcommand{\bbc}{\mathbb{C}}
\newcommand{\bbz}{\mathbb{Z}}
\newcommand{\bbq}{\mathbb{Q}}
\newcommand{\bbn}{\mathbb{N}}

\begin{document}

\noindent
Statistics \\
MATH 371\\
Homework 2\\
Due October 14, 2016.

\begin{exer}
	Prove the following generalization of the completing the square method:
	\begin{align*}
		\sum_{i=1}^{n} a_i(x-b_1)^2 + cx &\empty \\ 
			&\hspace{-1 in}= \left( \sum_{i=1}^{n}a_i \right)\left( x-\frac{\sum_{i=1}^n a_ib_i-c/2}{\sum_{i=1}^{n}a_i} \right)^2 + \sum_{i=1}^n a_i \left( b_i-\frac{\sum_{i=1}^n a_ib_i}{\sum_{i=1}^n a_i} \right)^2 + \left( \sum_{i=1}^n a_i \right)\left( c\sum_{i=1}^n a_ib_i - c^2/4 \right)
	\end{align*}
\end{exer}

\begin{exer}
	Show that the family of beta distributions is a conjugate family of prior distributions for samples from a negative binomial distribution with a known value of the parameter $r$ and an unknown value of the paramater $p$ ($0<p<1$). See Definition 5.5.1 from your book for the definition of a negative binomial distribution.
\end{exer}

\begin{exer}
	Let $\xi(\theta)$ be a pdf that is definied as follows for constants $\alpha>0$ and $\beta>0$:
	\[
		\xi(\theta) = 
		\begin{cases}
			\displaystyle \frac{\beta^{\alpha}}{\Gamma(\alpha)}\theta^{-(\alpha+1)}e^{-\beta/\alpha)} & \text{for } \theta>0,\\
			0 & \text{for } \theta\leq 0
		\end{cases}
	\]
	A distribution with this pdf is called an inverse gamma distribution.
	\begin{enumerate}[(a)]
		\item Verify that $\xi(\theta)$ is actually a pdf by verifying that 
			\[
				\int_{0}^{\infty} \xi(\theta)\, d\theta = 1.
			\]
		\item Consider the family of probability distributions that can be represented by a pdf $\xi(\theta)$ having the given form for all possible pairs of constants $\alpha>0$ and $\beta>0$. Show that this family is a conjugate family of prior distributions with samples from a normal distribution with a know value of the mean $\mu$ and an unknown value of the variance $\theta$.
	\end{enumerate}
\end{exer}

\begin{exer}
	Suppose that a random sample is to be taken from a normal distribution for which the value of the mean is $\theta$ is unknown and the standard deviation is 2, and the prior distribution of $\theta$ is a normal distribution for which the standard deviation is 1. What is the smallest number of observations that must be included in the sample in order to reduce the standard deviation of the posterior distribution of $\theta$ to the value 0.1?
\end{exer}

\begin{exer}
	Suppose that $X_1,\dots,X_n$ form a random sample from a distribution for which the pdf $f(x|\theta)$ is as follows:
	\[
		f(x|\theta) = 
		\begin{cases}
			\theta x^{\theta-1} & \text{for } 0<x<1,\\
			0 & \text{otherwise.}
		\end{cases}
	\]
	Suppose also that the value of the parameter $\theta$ is unknown ($\theta>0$), and the prior distribution of $\theta$ is the gamma distribution with parameters $\alpha >0$ and $\beta>0$. Determine the mean and the variance of the posterior distribution of $\theta$.
\end{exer}

\end{document}















