\documentclass[a4paper]{article}
\textwidth= 400pt
\oddsidemargin = 30pt
\marginparwidth = 0pt
\usepackage{latexsym, graphics, epsfig, amssymb, color, amsfonts, amsmath, framed,fancybox, subfigure, dsfont}
\usepackage{tikz, bbm}
\usepackage{titlesec}
\definecolor{shadecolor}{rgb}{0.29, 0.59, 0.82}
\definecolor{shadecolorI}{rgb}{0.94, 1.0, 1.0}
\definecolor{light-blue}{rgb}{0.29, 0.59, 0.82}
\definecolor{iceberg}{rgb}{0.44, 0.65, 0.82}
\definecolor{lightcornflowerblue}{rgb}{0.6, 0.81, 0.93}
\definecolor{skyblue}{rgb}{0.53, 0.81, 0.92}
\definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66}
\definecolor{bluegray}{rgb}{0.4, 0.6, 0.8}
\definecolor{arsenic}{rgb}{0.23, 0.27, 0.29}
\definecolor{babyblue}{rgb}{0.54, 0.81, 0.94}
\titleformat{\chapter}
{\color{light-blue}\normalfont\huge\bfseries}
{\color{light-blue}\thechapter}{1em}{}
\titleformat{\section}
{\color{light-blue}\normalfont\Large\bfseries}
{\color{light-blue}\thesection}{1em}{}

\titleformat{\subsection}
{\color{light-blue}\normalfont\large\bfseries}
{\color{light-blue}\thesubsection}{1em}{}

\usepackage[colorlinks=true, linkcolor=light-blue,
            urlcolor=blue,
            citecolor=blue]{hyperref}          
\DeclareMathOperator*{\argsup}{arg\,sup}
\DeclareMathOperator*{\argmin}{arg\,min}
\textwidth= 400pt
\oddsidemargin = 30pt
\marginparwidth = 0pt
%\numberwithin{equation}{section}
\begin{document}
\title{\color{light-blue}{APTS Assessment on Statistical Inference}}
\author{\color{light-blue}{Simon Shaw, s.shaw@bath.ac.uk} \\ \color{light-blue}{University of Bath}}
\date{\color{light-blue}{Warwick, 13-16 December 2022}}
\maketitle
\newtheorem{Theo}{Theorem}
\newtheorem{Lem}{Lemma}
\newtheorem{Cor}{Corollary}
\newtheorem{Def}{Definition}
\newtheorem{Prin}{Principle}
\newcommand{\Ev}{\ensuremath{\mbox{Ev}}}


\newtheorem{Ex}{Example}
\newcommand{\conf}{\mathop{\textrm{conf}}}
\newcommand{\Chat}{\widehat{C}}
\newcommand{\betahat}{\hat{\beta}}
\newcommand{\Ctilde}{\tilde{C}}
%\newcommand{\dtilde}{\tilde{\delta}}
\newcommand{\ftilde}{\tilde{f}}
\newcommand{\Ftilde}{\widetilde{\curlyF}}
\newcommand{\Gtilde}{\widetilde{\curlyG}}
\newcommand{\R}{\textsf{R}}
\newenvironment{literalR}{\small\verbatim}{\endverbatim}
\section*{Principles for Statistical Inference}
\begin{enumerate}
\item Consider Birnbaum's Theorem, $(\mbox{WIP} \wedge \mbox{WCP} \, ) \leftrightarrow \mbox{SLP}$. In lectures, we showed that $(\mbox{WIP}
  \wedge \mbox{WCP} \,) \rightarrow \mbox{SLP}$ but not the converse. Hence, show that $\mbox{SLP} \rightarrow \mbox{WIP}$ and $\mbox{SLP} \rightarrow  \mbox{WCP}$.
  \item Suppose that we have two discrete experiments $\mathcal{E}_{1} = \{\mathcal{X}_{1}, \Theta, f_{X_{1}}(x_{1} \, | \, \theta)\}$ and $\mathcal{E}_{2} = \{\mathcal{X}_{2}, \Theta, f_{X_{2}}(x_{2} \, | \, \theta)\}$ and that, for $x_{1}' \in \mathcal{X}_{1}$ and $x_{2}' \in \mathcal{X}_{2}$,
\begin{eqnarray}
f_{X_{1}}(x_{1}' \, | \, \theta) & = & cf_{X_{2}}(x_{2}' \, | \, \theta) \label{eq:slp}
\end{eqnarray}
for all $\theta$ where $c$ is a positive constant not depending upon $\theta$ (but which may depend on $x_{1}', x_{2}'$) and $f_{X_{1}}(x_{1}' \, | \, \theta) > 0$. We wish to consider estimation of $\theta$ under a loss function $L(\theta, d)$ which is strictly convex in $d$ for each $\theta$. Thus, for all $d_{1} \neq d_{2} \in \mathcal{D}$, the decision space, and $\alpha \in (0, 1)$,
\begin{eqnarray*}
L(\theta, \alpha d_{1} + (1-\alpha)d_{2}) & < & \alpha L(\theta, d_{1}) + (1-\alpha)L(\theta, d_{2}).
\end{eqnarray*}
For the experiment $\mathcal{E}_{j}$, $j = 1, 2$, for the observation $x_{j}$ we will use the decision rule $\delta_{j}(x_{j})$ as our estimate of $\theta$ so that 
\begin{eqnarray*}
\Ev(\mathcal{E}_{j}, x_{j}) & = & \delta_{j}(x_{j}).
\end{eqnarray*}
Suppose that the inference violates the strong likelihood principle so that, whilst equation (\ref{eq:slp}) holds, $\delta_{1}(x_{1}') \neq \delta_{2}(x_{2}')$.
\begin{enumerate}
\item Let $\mathcal{E}^{*}$ be the mixture of the experiments $\mathcal{E}_{1}$ and $\mathcal{E}_{2}$ according to mixture probabilities $1/2$ and $1/2$. For the outcome $(j, x_{j})$ the decision rule is $\delta(j, x_{j})$. If the Weak Conditionality Principle (WCP) applies to $\mathcal{E}^{*}$ show that
\begin{eqnarray*}
\delta(1, x_{1}') & \neq & \delta(2, x_{2}').
\end{eqnarray*}
\item An alternative decision rule for $\mathcal{E}^{*}$ is
\begin{eqnarray*}
\delta^{*}(j, x_{j}) & = & \left\{\begin{array}{ll} 
\frac{c}{c+1}\delta(1, x_{1}') + \frac{1}{c+1}\delta(2, x_{2}') & \mbox{if $x_{j} = x_{j}'$ for $j = 1, 2$}, \\
\delta(j, x_{j}) & \mbox{otherwise}.
\end{array} \right. \label{eq:slp1}
\end{eqnarray*}
Show that if the WCP applies to $\mathcal{E}^{*}$ then $\delta^{*}$ dominates $\delta$ so that $\delta$ is inadmissible. \newline
[Hint: First show that $R(\theta, \delta^{*}) = \frac{1}{2}\mathbb{E}[L(\theta, \delta^{*}(1, X_{1})) \, | \, \theta] + \frac{1}{2}\mathbb{E}[L(\theta, \delta^{*}(2, X_{2})) \, | \, \theta]$.]
\item Comment on the result of part (b).
\end{enumerate} 
\end{enumerate}
\section*{Statistical Decision Theory}
\begin{enumerate}\setcounter{enumi}{2}
\item Suppose we have a hypothesis test of two simple hypotheses
\begin{eqnarray*}
H_{0}: X \sim f_{0} & \mbox{versus} & H_{1}: X \sim f_{1}
\end{eqnarray*}
so that if $H_{i}$ is true then $X$ has distribution $f_{i}(x)$. It is proposed to choose between $H_{0}$ and $H_{1}$ using the following loss function.
\begin{eqnarray*}
\begin{array}{cc|cc}
& & \multicolumn{2}{c}{\mbox{Decision}} \\
& & H_{0} & H_{1} \\ \hline 
\mbox{Outcome} & \begin{array}{c} H_{0} \\ H_{1} \end{array} & \begin{array}{c} c_{00} \\ c_{10} \end{array} & \begin{array}{c} c_{01} \\ c_{11} \end{array}
\end{array}
\end{eqnarray*}
where $c_{00} < c_{01}$ and $c_{11} < c_{10}$. Thus, $c_{ij} = L(H_{i}, H_{j})$ is the loss when the `true' hypothesis is $H_{i}$ and the decision $H_{j}$ is taken. Show that a decision rule $\delta(x)$ for choosing between $H_{0}$ and $H_{1}$ is admissible if and only if
\begin{eqnarray*}
\delta(x) & = & \left\{\begin{array}{cl}
H_{0} & \mbox{if } \dfrac{f_{0}(x)}{f_{1}(x)} > c, \\
H_{1} & \mbox{if } \dfrac{f_{0}(x)}{f_{1}(x)} < c, \\
\mbox{either } H_{0} \mbox{ or } H_{1} & \mbox{if } \dfrac{f_{0}(x)}{f_{1}(x)} = c,
\end{array}\right.
\end{eqnarray*}
for some critical value $c > 0$. \newline
[Hint: Consider Wald's Complete Class Theorem and a prior distribution $\pi = (\pi_{0}, \pi_{1})$ where $\pi_{i} = \mathbb{P}(H_{i}) > 0$. You may assume that for all $x \in \mathcal{X}$, $f_{i}(x) > 0$.]
\item Let $X_{1}, \ldots, X_{n}$ be exchangeable random variables so that, conditional upon a parameter $\theta$, the $X_{i}$ are independent. Suppose that $X_{i} \, | \, \theta \sim N(\theta, \sigma^{2})$ where the variance $\sigma^{2}$ is known, and that $\theta \sim N(\mu_{0}, \sigma_{0}^{2})$ where the mean $\mu_{0}$ and variance $\sigma_{0}^{2}$ are known. We wish to produce a point estimate $d$ for $\theta$, with loss function
\begin{eqnarray}
L(\theta, d) & = & 1 - \exp\left\{-\frac{1}{2}(\theta - d)^{2} \right\}. \label{eq:loss}
\end{eqnarray}
\begin{enumerate}
\item Let $f(\theta)$ denote the probability density function of $\theta \sim N(\mu_{0}, \sigma_{0}^{2})$. Show that $\rho(f, d)$, the risk of $d$ under $f(\theta)$, can be expressed as
\begin{eqnarray*}
\rho(f, d) & = & 1 - \frac{1}{\sqrt{1+\sigma_{0}^{2}}}\exp\left\{-\frac{1}{2(1+\sigma_{0}^{2})}(d - \mu_{0})^{2} \right\}. 
\end{eqnarray*}
[Hint: You may use, without proof, the result that 
\begin{eqnarray*}
(\theta - a)^{2} + b(\theta - c)^{2} & = & (1+b)\left(\theta - \frac{a+bc}{1+b}\right)^{2} + \left(\frac{b}{1+b}\right)(a-c)^{2}
\end{eqnarray*}
for any $a,b,c \in \mathbb{R}$ with $b \neq -1$.]
\item Using part (a), show that the Bayes rule of an immediate decision is $d^{*} = \mu_{0}$ and find the corresponding Bayes risk.
\item Find the Bayes rule and Bayes risk after observing $x = (x_{1}, \ldots, x_{n})$. Express the Bayes rule as a weighted average of $d^{*}$  and the maximum likelihood estimate of $\theta$, $\overline{x} = \frac{1}{n} \sum_{i=1}^{n} x_{i}$, and interpret the weights. \newline
[Hint: Consider conjugacy.]
\item Suppose now, given data $y$, the parameter $\theta$  has the general posterior distribution $f(\theta \, | \, y)$. We wish to use the loss function $L(\theta, d)$, as given in equation (\ref{eq:loss}), to find a point estimate $d$ for $\theta$. By considering an approximation of $L(\theta, d)$, or otherwise, what can you say about the corresponding Bayes rule?
\end{enumerate}
\end{enumerate}
\section*{Confidence sets and $p$-values}
\begin{enumerate}\setcounter{enumi}{4}
\item Show that if $p$ is a family of significance procedures then
\begin{eqnarray*}
p(x; \Theta_{0}) & = & \sup_{\theta \in \Theta_{0}} p(x; \theta)
\end{eqnarray*}
is a significance procedure for the null hypothesis $\Theta_{0} \subset \Theta$, that is that $p(X; \Theta_{0})$ is super-uniform for every $\theta \in \Theta_{0}$.
\item Suppose that, given $\theta$, $X_{1}, \ldots, X_{n}$ are independent and identically distributed $N(\theta, 1)$ random variables so that, given $\theta$, $\overline{X} = \frac{1}{n} \sum_{i=1}^{n} X_{i} \sim N(\theta, 1/n)$.
\begin{enumerate}
\item Consider the test of the hypotheses
\begin{eqnarray*}
H_{0}: \theta = 0 & \mbox{versus} & H_{1}: \theta = 1
\end{eqnarray*}
using the statistic $\overline{X}$ so that large observed values $\overline{x}$ support $H_{1}$. For a given $n$, the corresponding $p$-value is
\begin{eqnarray*}
p_{n}(\overline{x}; 0) & = & \mathbb{P}(\overline{X} \geq \overline{x} \, | \, \theta = 0).
\end{eqnarray*}
We wish to investigate how, for a fixed $p$-value, the likelihood ratio for $H_{0}$ versus $H_{1}$,
\begin{eqnarray*}
LR(H_{0}, H_{1}) & := & \frac{f(\overline{x} \, | \, \theta = 0)}{f(\overline{x} \, | \, \theta = 1)}
\end{eqnarray*}
changes as $n$ increases.
\begin{enumerate}
\item[(i)] Use \R\ to create a plot of $LR(H_{0}, H_{1})$ for each $n \in \{1, \ldots, 20\}$ where, for each $n$, $\overline{x}$ is the value which corresponds to a $p$-value of 0.05. \newline
[Hint: You may need to utilise the \texttt{qnorm} and \texttt{dnorm} functions. The look of the plot may be improved by using a log-scale on the axes.]
\item[(ii)] Comment on your plot, in particular on what happens to the likelihood ratio as $n$ increases. What is the implication for hypothesis testing and the corresponding (fixed) $p$-value?
\end{enumerate}
\item Consider the test of the hypotheses
\begin{eqnarray*}
H_{0}: \theta = 0 & \mbox{versus} & H_{1}: \theta > 0
\end{eqnarray*}
using once again $\overline{X}$ as the test statistic.
\begin{enumerate}
\item[(i)] Suppose that $\overline{x} > 0$. Show that
\begin{eqnarray*}
lr(H_{0}, H_{1}) \ := \ \min_{\theta > 0} \frac{f(\overline{x} \, | \, \theta = 0)}{f(\overline{x} \, | \, \theta)} \ = \ \exp\left\{-\frac{n}{2}\overline{x}^{2}\right\}.
\end{eqnarray*}
\item[(ii)] Use \R\ to create a plot of $lr(H_{0}, H_{0})$ for a range of $p$-values for $H_{0}$ from 0.001 to 0.1.\footnote{The plot doesn't depend upon the actual choice of $n$ and so you may choose $n = 1$. Once again, the look of the plot may be improved by using a log-scale on the axes.} Comment on whether the conventional choice of 0.05 is a suitable threshold for choosing between hypotheses, or whether some other choice might be better.\footnote{For the origins of the use of 0.05 see Cowles, M. and C. Davis (1982). On the origins of the .05 level of statistical significance. \textit{American Psychologist 37(5)}, 553-558.}
\end{enumerate}
\end{enumerate}  
\end{enumerate}

\end{document}





