%19/10/10
\documentclass{beamer}
\usepackage{graphics}
\usepackage{color}
\usepackage{enumerate}
\usetheme{Pittsburgh}
\newcommand{\E}{{\rm E}}
\newcommand{\Var}{{\rm Var}}
\newcommand{\Covar}{{\rm Covar}}
\title{Priors and Inferences for Two or More Proportions}
\author{Malcolm Farrow \\
(Joint work with Kevin Wilson)}
   
\date{October 2010}

\begin{document}
\beamertemplateshadingbackground{yellow!25}{magenta!25}

\begin{frame}

\titlepage

\end{frame}

\begin{frame}{Contents}
\begin{enumerate}
\item<1-> Introduction.
\item<2-> Design problem.
\item<3-> Measures of association.
\item<4-> Some possible joint belief structures.
\begin{enumerate}[(i)]
\item<5-> Full probability distributions.
\item<6-> Partial belief specifications.
\end{enumerate}
\end{enumerate}
\end{frame}

\begin{frame}
\frametitle{Introduction}

\underline{Simple Motivational Example}: $ 2 \times 2 $ contingency table.

Two binomial distributions (one fixed margin).

\begin{center}
\begin{tabular}{r|cc|}
\multicolumn{1}{c}{\hfill}  & \multicolumn{2}{c}{Outcome} \\
\multicolumn{1}{c}{\hfill}  & 0 & \multicolumn{1}{c}{1} \\ \cline{2-3}
Group 1 &  \color{red}{$n_{1}-Y_{1} $ } & \color{red}{$ Y_{1} $ } \\
Group 2  &  \color{red}{$n_{2}-Y_{2} $ } & \color{red}{$ Y_{2} $ } \\ \cline{2-3}
\end{tabular}
\end{center}

Given \textcolor{red}{$ \theta_{1}, \theta_{2} $
\begin{eqnarray*}
Y_{1} & \sim & Bin(n_{1},\ \theta_{1}) \\
Y_{2} & \sim & Bin(n_{2},\ \theta_{2})
\end{eqnarray*}
 }
\end{frame}

\begin{frame}
\frametitle{Introduction}

\underline{$ 2 \times 2 $ contingency table}

\begin{itemize}
\item<1-> Very simple.
\item<1-> Only two parameters.
\item<1-> No real difficulty with numerical calculations when we use non-conjugate priors.
\item<2-> E.g.

\textcolor{red}{ \[ \eta_{i} = g(\theta_{i}) \] }

\begin{center}
\textcolor{red}{ $ g() $}:\  logit, probit, whatever \\
\textcolor{red}{ $ (\eta_{1},\eta_{2}) $}:\ bivariate normal prior
\end{center}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Introduction}

\underline{\Large BUT} \ldots

\begin{enumerate}
\item<2-> Generalisation to bigger problems.
\item<3-> It's a simple problem. We're just counting outcomes. It \textcolor{blue}{\em should} have a simple solution.
\end{enumerate}

\end{frame}

\begin{frame}
\frametitle{Introduction: 1. Generalisations to bigger problems}

(i) More than 2 proportions
\begin{itemize}
\item Perhaps many.
\item Unlikely that we would want independent priors.
\item E.g.\ bioassay.
\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Introduction: 1. Generalisations to bigger problems -- bioassay}

\begin{center}
\resizebox{0.8\textwidth}{!}{\includegraphics{bioassay.pdf}}
\end{center}

\end{frame}

\begin{frame}
\frametitle{Introduction: 1. Generalisations to bigger problems -- bioassay}

\begin{itemize}
\item \textcolor{red}{ $ Y_{i} $ } out of \textcolor{red}{ $ n_{i} $ } respond with dose \textcolor{red}{ $ x_{i} $ }.
\item May be many different doses.
\item We might not want to use a simple parametric model. We might prefer a nonparametric regression.
\item In a \textcolor{blue}{ design problem} there may be many \textcolor{blue}{\em potential} doses (design points).
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Introduction: 1. Generalisations to bigger problems}
(ii) More than 2 outcomes.
\begin{itemize}
\item Collection of multinomial outcomes rather than binomial outcomes.
\item E.g.
\begin{itemize}
\item More complicated contingency tables.
\item Transition matrix in a Markov chain.
\item Item response questionnaires
\begin{itemize}
\item May be ordered categories -- eg.\ student feedback.
\end{itemize}
\end{itemize}
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Introduction: 2. It ought to be simple.}
\underline{Single proportion, beta prior} --- beautifully simple.

\begin{itemize}
\item<1-> Prior: \textcolor{red}{ $ \theta \sim {\rm beta}(a,b) $ }
\item<1-> Posterior: \textcolor{red}{ $ \theta \sim {\rm beta}(a+y,b+n-y) $ }
\item<2-> Note: exchangeability of Bernoulli trials $ \Rightarrow $ sufficiency of two counts \textcolor{red}{ $ y,\ (n-y) $ }
\item<3-> Can we not find a simple generalisation?
\item<4-> \ldots or, at least, one that is reasonable tractable?
\item<5-> Can we have meaningful prior elicitation?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Simple design illustration}

\begin{center}
\resizebox{0.8\textwidth}{!}{\includegraphics{design.pdf}}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Simple design illustration}
\begin{itemize}
\item<1-> Single proportion
\item<2-> Prior: \textcolor{red}{$ \theta \sim {\rm beta}(a,b) $}
\item<3-> We will observe \textcolor{red}{$ n $} trials
\item<4-> \ldots then make a terminal decision.
\item<5-> Choose \textcolor{red}{$ n $}.
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}
The terminal decision could be many things.

\begin{itemize}
\item E.g. Predict the number \textcolor{red}{$ Z $} of successes out of \textcolor{red}{$ m $} future trials.
\item Introduce a \textcolor{blue}{benefit utility}

\textcolor{red}{ \[ U_{b,n}(Z,P) \] }

\item E.g.
\begin{enumerate}[(i)]
\item<2->

\textcolor{red}{ \[ U_{b,n}(Z,P) = 1- \frac{|Z-P|}{m} \] }

\item<3->

\textcolor{red}{ \[ U_{b,n}(Z,P) = 1- \left(\frac{Z-P}{m}\right)^{2} \] }

\item<4-> We get to choose \textcolor{red}{$ P $}. This is the terminal decision.
\end{enumerate}
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}

\textcolor{red}{ 
\begin{eqnarray*}
 U_{b,n}(Z,P) & = & 1- \left(\frac{Z-P}{m}\right)^{2} \\
              & = & 1- \frac{1}{m^{2}}\{ Z - \E_{Z|\theta}(Z \mid \theta) + \E_{Z|\theta}(Z \mid \theta) - P\}^{2} \\
              & = & 1- \frac{1}{m^{2}} \{ [ Z - \E_{Z|\theta}(Z \mid \theta)]^{2} + [ \E_{Z|\theta}(Z \mid \theta)-P]^{2} \\
              &   & + 2 [Z-E_{Z|\theta}(Z \mid \theta)][E_{Z|\theta}(Z \mid \theta)-P]\}
\end{eqnarray*} }
\end{frame}

\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}

\textcolor{red}{ 
\begin{eqnarray*}
 U_{b,n}(Z,P) & = & 1- \frac{1}{m^{2}} \{ [ Z - \E_{Z|\theta}(Z \mid \theta)]^{2} + [ \E_{Z|\theta}(Z \mid \theta)-P]^{2} \\
              &   & + 2 [Z-E_{Z|\theta}(Z \mid \theta)][E_{Z|\theta}(Z \mid \theta)-P]\}
\end{eqnarray*} }

Take expectations over \textcolor{red}{$ Z \mid \theta $}:

\textcolor{red}{ 
\begin{eqnarray*}
\E_{Z|\theta}[ U_{b,n}(Z,P)] & = & 1- \frac{1}{m^{2}} \Var_{Z|\theta}(Z \mid \theta) - \frac{1}{m^{2}}[\E_{Z|\theta}(Z \mid \theta) - P]^{2} \\
              & = & 1- \frac{1}{m^{2}}m \theta(1-\theta) - \frac{1}{m^{2}} ( m \theta - P)^{2}
\end{eqnarray*} }

\end{frame}


\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}

\textcolor{red}{ 
\begin{eqnarray*}
\E_{Z|\theta}[ U_{b,n}(Z,P)] & = & 1- \frac{1}{m^{2}}m \theta(1-\theta) - \frac{1}{m^{2}} ( m \theta - P)^{2} \\
                             & = & 1- \frac{1}{m^{2}}m \theta(1-\theta) \\
                             &   & - \frac{1}{m^{2}} ( m \theta - m \E_{\theta}(\theta) + m \E_{\theta}(\theta) - P)^{2} \\
                             & = & 1- \frac{1}{m^{2}}m \theta(1-\theta) -  [  \theta -  \E_{\theta}(\theta)]^{2} \\
                             &   & - [ \E_{\theta}(\theta) - P/m]^{2} \\
                             &   & +2 [  \theta -  \E_{\theta}(\theta)] [ \E_{\theta}(\theta) - P/m]
\end{eqnarray*} }

\end{frame}

\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}

\textcolor{red}{ 
\begin{eqnarray*}
\E_{Z|\theta}[ U_{b,n}(Z,P)] & = & 1- \frac{1}{m^{2}}m \theta(1-\theta) -  [  \theta -  \E_{\theta}(\theta)]^{2} \\
                             &   & - [ \E_{\theta}(\theta) - P/m]^{2} \\
                             &   & +2 [  \theta -  \E_{\theta}(\theta)] [ \E_{\theta}(\theta) - P/m]
\end{eqnarray*} }

Take expectations over \textcolor{red}{$\theta$}:

\textcolor{red}{ 
\[ \E_{Z,\theta}[ U_{b,n}(Z,P)]  =  1- \frac{1}{m} \E_{\theta}[ \theta(1-\theta)] -   \Var_{\theta}(\theta) - [ \E_{\theta}(\theta) - P/m]^{2} \] }
\end{frame}


\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}

\textcolor{red}{ 
\[ \E_{Z,\theta}[ U_{b,n}(Z,P)]  =  1- \frac{1}{m} \E_{\theta}[ \theta(1-\theta)] -   \Var_{\theta}(\theta) - [ \E_{\theta}(\theta) - P/m]^{2} \] }

Maximise this expectation by setting \textcolor{red}{$ P/m = \E_{\theta}(\theta) $}.

That is \textcolor{red}{$ P = m\E_{\theta}(\theta) $}.
\end{frame}

\begin{frame}
\frametitle{Simple design illustration -- Terminal decision}

We choose \textcolor{red}{$ P = m\E_{\theta}(\theta) $}. After our experiment, when we have observed \textcolor{red}{$ n $} trials with \textcolor{red}{$ x $} successes, we have

\textcolor{red}{
\[ \E_{\theta}(\theta) = \E_{1}(\theta \mid x) = \hat{\theta} = \frac{a+x}{a+b+n} \] }
so we choose
\textcolor{red}{
\[ \frac{P}{m} = \frac{a+x}{a+b+n}. \] }

Note the use of the explicit formula.

\end{frame}

\begin{frame}
\frametitle{Simple design illustration -- Choice of sample size}
So, our utility \textcolor{blue}{\em before} the experiment is

\textcolor{red}{
\begin{eqnarray*}
U^{*}_{b,n}(\theta, \hat{\theta}) & = & 1- \frac{\theta(1-\theta)}{m} - (\theta-\hat{\theta})^{2} \\
 & = & 1- \frac{\theta(1-\theta)}{m} - \left( \theta - \frac{a+x}{a+b+n} \right)^{2} \\
 & = & 1- \frac{\theta(1-\theta)}{m} - \left[ \frac{(a+b)\theta - a}{a+b+n} \right]^{2} \\
 &   & - \left[ \frac{x-n \theta}{a+b+n} \right]^{2} + 2 \frac{(x-n \theta)[(a+b)\theta - a]}{(a+b+n)^{2}} 
\end{eqnarray*} }

(after some algebra).

\end{frame}



\begin{frame}
\frametitle{Simple design illustration -- Choice of sample size}
\textcolor{red}{
\begin{eqnarray*}
U^{*}_{b,n}(\theta, \hat{\theta}) & = & 1- \frac{\theta(1-\theta)}{m} - \left[ \frac{(a+b)\theta - a}{a+b+n} \right]^{2} \\
 &   & - \left[ \frac{x-n \theta}{a+b+n} \right]^{2} + 2 \frac{(x-n \theta)[(a+b)\theta - a]}{(a+b+n)^{2}} 
\end{eqnarray*} }

Take expectations over \textcolor{red}{$ X \mid \theta $}.

\textcolor{red}{
\begin{eqnarray*}
\E_{X|\theta}[U^{*}_{b,n}(\theta, \hat{\theta})] & = & 1- \frac{\theta(1-\theta)}{m} - \left\{ \frac{(a+b)(\theta - a/[a+b])}{a+b+n} \right\}^{2} \\
   &   & - \frac{n \theta (1-\theta)}{(a+b+n)^{2}}
\end{eqnarray*} }

(again, after some algebra).
\end{frame}



\begin{frame}
\frametitle{Simple design illustration -- Choice of sample size}
Finally we take expectations over the \textcolor{blue}{\em prior} distribution of \textcolor{red}{$\theta$}.

After some algebra (again):

\textcolor{red}{ \[ \E(U^{*}_{b,n}) = 1- \frac{ab}{(a+b)(a+b+1)} \left\{ \frac{1}{m} + \frac{1}{a+b+n}  \right\} \] }

\begin{itemize}
\item<2-> So we have an explicit formula which we can combine with a cost utility and then we can maximise the result wrt \textcolor{red}{$n$} \ldots
\item<3-> \ldots but notice how this depends on having explicit formulae for the necessary expectations and for the terminal decision rule.
\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Measures of association -- 2 proportions}

\begin{itemize}
\item Familiar with bivariate normal distribution -- 5 parameters:
  \begin{itemize}
  \item 2 means
  \item 2 variances
  \item 1 (product-moment) correlation (or covariance)
  \end{itemize}
\item The same approach might not be appropriate for proportions where \textcolor{red}{$ 0 < \theta < 1 $}.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Measures of association -- 2 proportions}
Some possible alternatives:
\begin{itemize}
\item<2-> Rank correlation
   \begin{itemize}
   \item Kendall's $ \tau $
   \item Spearman's $ \rho $
   \end{itemize}
\item<3-> Pearson (product-moment) correlation applied to transformed unknowns \textcolor{red}{$(\eta_{1},\eta_{2})$}

\textcolor{red}{
\[ \eta_{i} = g(\theta_{i}) \] }

\textcolor{red}{$g()$}: logits, probits, whatever.

\item<4->  Directly in terms of observables.
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Measures of association -- Kendall's $ \tau $}

\begin{itemize}
\item Suppose \textcolor{red}{$(\theta_{1},\theta_{2})$} have some bivariate distribution.
\item Consider observing a sequence of independent draws \textcolor{red}{$ (T_{1,j},T_{2,j}),\ j=1,2,3, \ldots $} from this distribution.
\item Kendall's $ \tau $:

\textcolor{red}{ 
\begin{eqnarray*}
\tau_{1,2}  =  & & \Pr\{ (T_{1,1}-T_{1,2})(T_{2,1}-T_{2,2}) > 0 \} \\
           &   - & \Pr\{ (T_{1,1}-T_{1,2})(T_{2,1}-T_{2,2}) < 0 \}
\end{eqnarray*} }

\begin{center}
\textcolor{blue}{ \em ``Probability of concordance minus probability of discordance''}
\end{center}

Equivalently

\textcolor{red}{ 
\[ \tau_{1,2} = 2 \Pr\{ (T_{1,1}-T_{1,2})(T_{2,1}-T_{2,2}) > 0 \} - 1 \] }

\end{itemize}

\end{frame}



\begin{frame}
\frametitle{Measures of association -- Kendall's $ \tau $}
\begin{center}
\resizebox{0.8\textwidth}{!}{\includegraphics{Kendall.pdf}}
\end{center}
\end{frame}



\begin{frame}
\frametitle{Measures of association -- Spearman's $ \rho $}

\textcolor{red}{
\begin{eqnarray*}
 \rho_{1,2} = & 3 & \Pr\{ (T_{1,1}-T_{1,2})(T_{2,1}-T_{2,3}) > 0 \} \\
              & - & \Pr\{ (T_{1,1}-T_{1,2})(T_{2,1}-T_{2,3}) < 0 \}
\end{eqnarray*} }

\begin{itemize}
\item Note: \textcolor{red}{$ T_{1,2}, T_{2,3} $} independent.
\item Interpretation not as straightforward.
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Measures of association -- Transformations}

``Ordinary'' product-moment correlation of \textcolor{red}{$ (\eta_{1}, \eta_{2}) $ } where
\textcolor{red}{$ \eta_{i} = g(\theta_{i}) $ } (logits, probits, whatever).

\begin{itemize}
\item Choice of transformation a bit arbitrary.
\item Elicitation a little tricky?
\end{itemize}

\end{frame}



\begin{frame}
\frametitle{Measures of association -- Directly from observables}
Bernoulli trial \textcolor{red}{$ j $} with \textcolor{red}{$ \theta=\theta_{i} $}:

\textcolor{red}{
\[ X_{i,j} = \left\{ \begin{array}{c} 1 \\ 0 \end{array} \right. \] }

\textcolor{red}{
\begin{eqnarray*}
\E(X_{i,1}) & = & \E(\theta_{i}) \\
\E(X_{i,1}X_{i,2}) & = & \E(\theta_{i}^{2}) \\
\E(X_{1,1}X_{2,1}) & = & \E(\theta_{1}\theta_{2})
\end{eqnarray*} }
Hence
\textcolor{red}{
\begin{eqnarray*}
\Var(\theta_{i}) & = & \E(X_{i,1}X_{i,2}) - [ \E(X_{i,1})]^{2} \\
\Covar(\theta_{1},\theta_{2}) & = & \E(X_{1,1}X_{2,1}) - \E(X_{1,1})\E(X_{2,1})
\end{eqnarray*} }
\end{frame}

\begin{frame}
\frametitle{Measures of association -- Directly from observables}
This seems to argue in favour of simple product-moment covariance/correlation for \textcolor{red}{$ (\theta_{1},\theta_{2}) $} but \ldots

\begin{itemize}
\item<2-> would such elicitation work in practice (bearing in mind the mean-variance relationship)?
\item<3-> can we relate these moments to parameters of tractable joint distributions?
\end{itemize}

\end{frame}

\begin{frame}
\frametitle{Some possible joint belief structures}


\begin{enumerate}
\item<2-> Full probability distributions.
\begin{enumerate}[(i)]
\item<3-> Dirichlet distribution --- and mixtures
\item<4-> Hierarchical beta distributions
\item<5-> Copulas
\item<6-> Multipliers --- and mixtures
\end{enumerate}
\item<7-> Partial belief specification
\begin{enumerate}[(i)]
\item<8-> Requirements
\item<9-> Bayes linear kinematics --- ({\it etc}).
\item<10-> Direct counts method
\end{enumerate}
\end{enumerate}

\end{frame}

\begin{frame}
\frametitle{Dirichlet distribution}

Consider again $ 2 \times 2 $ table.

\begin{center}
\begin{tabular}{r|cc|}
\multicolumn{1}{c}{\hfill}  & \multicolumn{2}{c}{Outcome} \\
\multicolumn{1}{c}{\hfill}  & 0 & \multicolumn{1}{c}{1} \\ \cline{2-3}
Treatment 1 &  \color{red}{$n_{1}-Y_{1} $ } & \color{red}{$ Y_{1} $ } \\
Treatment 2 &  \color{red}{$n_{2}-Y_{2} $ } & \color{red}{$ Y_{2} $ } \\ \cline{2-3}
\end{tabular}
\end{center}

Imagine a population of individuals with four types, as follows.

\begin{center}
\begin{tabular}{ccc}
\multicolumn{2}{c}{Outcomes} &  \\
 Treatment 1 & Treatment 2 & Probability \\ \hline
1 & 1 & \textcolor{red}{$ \pi_{11} $} \\
1 & 0 & \textcolor{red}{$ \pi_{10} $} \\
0 & 1 & \textcolor{red}{$ \pi_{01} $} \\
0 & 0 & \textcolor{red}{$ \pi_{00} $} 
\end{tabular}
\end{center}

\begin{itemize}
\item Let \textcolor{red}{$ \pi_{11},\pi_{10},\pi_{01},\pi_{00} \sim {\rm Dirichlet}(a_{11},a_{10},a_{01},a_{00})$}.
\item 4 parameters --- better than 2 but not quite enough.
\end{itemize}

\end{frame}


\begin{frame}
\frametitle{Dirichlet distribution}

\textcolor{red}{
\[ \begin{array}{ccc}
\theta_{1} = \pi_{11}+\pi_{10} & \hspace{2cm} & 1-\theta_{1} = \pi_{01}+\pi_{00} \\
\theta_{2} = \pi_{11}+\pi_{01} &              & 1-\theta_{2} = \pi_{10}+\pi_{00}
\end{array} \] }



\begin{itemize}
\item<2-> Prior density proportional to \textcolor{red}{$ \pi_{11}^{a_{11}-1} \pi_{10}^{a_{10}-1} \pi_{01}^{a_{01}-1} \pi_{00}^{a_{00}-1} $}
\item<3-> Likelihood proportional to \textcolor{red}{$ (\pi_{11}+\pi_{10})^{y_{1}} (\pi_{01}+\pi_{00})^{n_{1}-y_{1}} (\pi_{11}+\pi_{01})^{y_{2}} (\pi_{10}+\pi_{00})^{n_{2}-y_{2}} $ }
\item<4-> Hence the posterior is a finite mixture of Dirichlet distributions \ldots
\item<5-> \ldots so why not start with a prior which is a mixture of Dirichlet distributions? --- Extra parameter(s).
\item<6-> Need a suitable family of mixtures.
   \begin{itemize}
   \item Various possibilities.
   \end{itemize}
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Dirichlet distribution -- mixtures}
The Dirichlet parameters can (sort of) be seen as counts of prior observations of the four types of individual. Suppose we introduce four more types of ``prior individual'' with ``prior counts'' \textcolor{red}{$ b_{1,*},b_{0,*},b_{*,1},b_{*,0}$}.

Imagine a population of individuals with four types, as follows.

\begin{center}
\begin{tabular}{ccc}
\multicolumn{2}{c}{Outcomes} &  \\
 Treatment 1 & Treatment 2 & Probability \\ \hline
1 & ? & \textcolor{red}{$ \pi_{11}+\pi_{10} $} \\
0 & ? & \textcolor{red}{$ \pi_{01}+\pi_{00} $} \\
? & 1 & \textcolor{red}{$ \pi_{11}+\pi_{01} $} \\
? & 0 & \textcolor{red}{$ \pi_{10}+\pi_{00} $} 
\end{tabular}
\end{center}
\end{frame}

\begin{frame}
\frametitle{Dirichlet distribution -- mixtures}
\begin{itemize}
\item<2-> Prior density proportional to \textcolor{red}{$ \pi_{11}^{a_{11}-1} \pi_{10}^{a_{10}-1} \pi_{01}^{a_{01}-1} \pi_{00}^{a_{00}-1} $}
\textcolor{red}{\[ \times (\pi_{11}+\pi_{10})^{b_{1*}} (\pi_{01}+\pi_{00})^{b_{0*}} (\pi_{11}+\pi_{01})^{b_{*1}} (\pi_{10}+\pi_{00})^{b_{*0}} \]}
\item<3-> Recall that the likelihood is proportional to \textcolor{red}{$ (\pi_{11}+\pi_{10})^{y_{1}} (\pi_{01}+\pi_{00})^{n_{1}-y_{1}} (\pi_{11}+\pi_{01})^{y_{2}} (\pi_{10}+\pi_{00})^{n_{2}-y_{2}} $ }
\item<4-> We now have 8 parameters --- more than enough!
\item<5-> \ldots but can we really elicit 8 parameters for just two proportions?
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Hierarchical beta distribtuions}
Based on a suggestion by Sarah Germain.

\textcolor{red}{
\begin{eqnarray*}
\theta_{i} \mid \mu & \sim & {\rm beta}(k \mu,\ k[1-\mu]) \\
\mu & \sim & {\rm beta}(c,d)
\end{eqnarray*} }

Joint density

\textcolor{red}{ 
\begin{eqnarray*}
f(\mu,\theta_{1},\theta_{2}) & = & B^{-1}(c,d) \mu^{c-1} (1-\mu)^{d-1} \\
                             &   & \times B^{-1}(k \mu, k(1-\mu)) \theta_{1}^{k \mu -1} (1-\theta_{1})^{k(1-\mu)-1} \\
                             &   & \times  B^{-1}(k \mu, k(1-\mu)) \theta_{2}^{k \mu -1} (1-\theta_{2})^{k(1-\mu)-1} 
\end{eqnarray*} }

\end{frame}

\begin{frame}
\frametitle{Hierarchical beta distribtuions}
Generalise to:

\textcolor{red}{
\begin{eqnarray*}
\theta_{i} \mid \mu & \sim & {\rm beta}(k_{i} \mu + a_{i},\ k_{i}[1-\mu]+b_{i}) \\
\mu & \sim & {\rm beta}(c,d) \\
f(\mu,\theta_{1},\theta_{2}) & = & B^{-1}(c,d) \mu^{c-1} (1-\mu)^{d-1} \\
                             &   & \times B^{-1}(k_{1} \mu+a_{1}, k_{1}(1-\mu)+b_{1}) \\
                             &   & \times \theta_{1}^{k_{1} \mu + a_{1} -1} (1-\theta_{1})^{k_{1}(1-\mu)+b_{1}-1} \\
                             &   & \times B^{-1}(k_{2} \mu+a_{2}, k_{2}(1-\mu)+b_{2}) \\
                             &   & \times \theta_{2}^{k_{2} \mu + a_{2} -1} (1-\theta_{2})^{k_{2}(1-\mu)+b_{2}-1} 
\end{eqnarray*} }

\end{frame}

\begin{frame}
\frametitle{Hierarchical beta distribtuions}

\begin{itemize}
\item<1-> Now conjugate \ldots
\item<2-> \ldots but marginal for \textcolor{red}{$ \theta_{i} $} not very nice.
\item<3-> Needs more work to make the correlation structure flexible.
\item<4-> Still, could be useful for some problems.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Copulas}
Suppose, for example,
\textcolor{red}{
\begin{eqnarray*}
 \theta_{i} & \sim & {\rm beta}(a_{i},b_{i}) \\
 U_{i} & = & G_{i}(\theta_{i})
\end{eqnarray*} }
where \textcolor{red}{$ G_{i}() $} is the cdf of \textcolor{red}{beta$(a_{i},b_{i})$}. Hence

\textcolor{red}{ \[ U_{i} \sim U(0,1) \] }

Introduce \textcolor{red}{$ H(u_{1},u_{2}) $} as a joint cdf for \textcolor{red}{$ U_{1},U_{2}$}.

\begin{itemize}
\item<2-> If \textcolor{red}{$ H(,) $} is a \textcolor{blue}{\em copula} then it preserves the uniform marginal distributions of 
\textcolor{red}{$ U_{1},U_{2}$} but makes them dependent. Hence the beta marginal distributions of \textcolor{red}{$ \theta_{1}, \theta_{2} $} are also preserved.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Copulas}
\begin{itemize}
\item<1-> Joint pdf of \textcolor{red}{$ (\theta_{1}, \theta_{2})$} is
\textcolor{red}{
\begin{eqnarray*}
f(\theta_{1},\theta_{2}) & = & \frac{ \partial^{2}}{\partial \theta_{1} \partial \theta_{2} } H(u_{1},u_{2}) \\
     & = & g_{1}(\theta_{1}) g_{2}(\theta_{2}) h(u_{1},u_{2}) \\
     & = & g_{1}(\theta_{1}) g_{2}(\theta_{2}) h(G(\theta_{1}),G(\theta_{2}))
\end{eqnarray*} }
where \textcolor{red}{$ h(,) $} is the \textcolor{blue}{\em copula density} and \textcolor{red}{$ g() $} is (eg) the beta density.
\item<2-> Useful for {\em marginal} elicitation.
\item<3-> Rank correlation just depends on the choice of copula.
\item<4-> But standard copula families give limited range of correlation.
\item<5-> Prior is conjugate
\item<6-> But posterior is no longer  a copula so marginals are not nice.
\end{itemize}
\end{frame}



\begin{frame}
\frametitle{Multipliers --- and mixtures}
Recall copula. Joint density:
\textcolor{red}{ \[ g_{1}(\theta_{1}) g_{2}(\theta_{2}) h(G(\theta_{1}),G(\theta_{2})) \] }

\begin{itemize}
\item<2-> What if \textcolor{red}{$ h(,) $} is {\em not} a copula density?
\item<3-> We could make it something convenient like a polynomial in \textcolor{red}{$ (\theta_{1},\theta_{2}) $}.
\item<4-> Joint density proportional to
\textcolor{red}{ \[ g_{1}(\theta_{1}) g_{2}(\theta_{2}) h(\theta_{1},\theta_{2}) \] }
\item<5-> If \textcolor{red}{$ h(,) $} is a polynomial we get a mixture density 
\textcolor{red}{ \[ f(\theta_{1},\theta_{2}) = \sum \pi_{k} g_{1,k}(\theta_{1})g_{2,k}(\theta_{2}) \] }
where each \textcolor{red}{$ g_{i,k} $} is a beta density.
\end{itemize}
\end{frame}


\begin{frame}
\frametitle{Multipliers --- and mixtures}
\begin{itemize}
\item<1-> Eg (for positive correlation)
\textcolor{red}{ \[ h(\theta_{1},\theta_{2}) = [(1+\theta_{1}-\theta_{2})(1-\theta_{1}+\theta_{2})]^{q} \]}
with \textcolor{red}{$ q > 0 $}.
\item<2-> \textcolor{red}{$ h(,) $} is maximised when \textcolor{red}{$ \theta_{1}=\theta_{2} $}
\item<3-> \ldots but this might not be what we want. We might want, for example, a tendency towards \textcolor{red}{$ \theta_{1}=\theta_{2}^{c} $}.
\item<4-> Also, of course, it makes the marginals a bit more complicated --- elicitation.
\end{itemize}
\end{frame}

\begin{frame}
\frametitle{Multipliers --- and mixtures}
\begin{itemize}
\item<1-> Eg (for negative correlation)
\textcolor{red}{ \[ h(\theta_{1},\theta_{2}) = [(\theta_{1}+\theta_{2})(2-\theta_{1}-\theta_{2})]^{q} \]}
with \textcolor{red}{$ q > 0 $}.
\item<2-> \textcolor{red}{$ h(,) $} is maximised when \textcolor{red}{$ \theta_{1}+\theta_{2}=1 $}
\item<3-> Comments as for previous example.
\item<4-> Further work needed \ldots
\end{itemize}
\end{frame}
\end{document}
