Hypothesis testing of regarding size

21 Views Asked by At

Assume $X_i$ are $Exp(\theta).$

I have been struggling with all 3 parts of the question below: I have tried to use CLT for part 1 but am not super sure on how to proceed and think that the form of what we are solving for in part 3 resembles Stirling's formula but again not super how to proceed. I am very stuck and have 0 idea on what to do and would love some friendly advice/help.

enter image description here

1

There are 1 best solutions below

0
On

(i) Your idea of using the CLT is good. The CLT implies $S_n$ is approximately normal (with what mean and variance?), so you can use this to get an approximation of the probability of rejection, $P(|S_n - n| > z_{\alpha/2} \sqrt{n})$. Ultimately, the problem asks you to show that this probability is approximately $\alpha$.


(ii) Note that conditioned on $\theta$, we have $S_n \sim \text{Gamma}(n, \theta)$ which has density $f_{S_n \mid \theta}(s_n) = \theta^n s_n^{n-1} e^{-\theta s_n} / \Gamma(n)$.

The Bayes factor is defined by $\frac{f_{S_n \mid H_0}(s_n)}{f_{S_n \mid H_1}(s_n)}$, the ratio of the conditional density of $S_n$ given each hypothesis.

The numerator is simply the $\text{Gamma}(n, 1)$ density since $\theta=1$ under $H_0$.

For the denominator, you have to integrate over $\theta \sim \text{Gamma}(a, b)$. Specifically, $$f_{S_n \mid H_1}(s_n) = \int_0^\infty f_{S_n \mid \theta}(s_n) f_\theta(\theta) \, d\theta = \int_0^\infty \frac{\theta^n s_n^{n-1} e^{-\theta s_n}}{\Gamma(n)} \frac{b^a \theta^{a-1} e^{-b\theta}}{\Gamma(a)} d\theta.$$

If you go through the calculations I think you'll arrive at the given expression.


(iii)

Plugging in $a=b=1$ into the result of (ii) yields $\frac{1}{n!} (1+s_n)^{n+1} e^{-s_n}$. Plugging in the expression for $s_n$ yields $$\frac{1}{n!} (1+n+z_n \sqrt{n})^{n+1} e^{-n-z_n \sqrt{n}}.$$ Your idea of using Stirling is good. The above is asymptotically equivalent to $$\frac{(1+n+z_n \sqrt{n})^{n+1} }{\sqrt{2\pi} \cdot n^{n+1/2}} e^{-z_n\sqrt{n}}.$$ Rearranging yields $$\sqrt{\frac{n}{2\pi}} e^{-z_n \sqrt{n}}\left(1 + \frac{1+z_n \sqrt{n}}{n}\right)^{n+1}.\tag{$*$}$$

Note that if $z_n$ grows slower than $\sqrt{n}$, then $\frac{1+z_n \sqrt{n}}{n} \to 0$ as $n \to \infty$, and we can use the following Taylor series approximation. $$\log \left(1+\frac{1+z_n \sqrt{n}}{n}\right) \approx \frac{1+z_n \sqrt{n}}{n} - \frac{(1+z_n \sqrt{n})^2}{2n^2}.$$

I am being a bit hand-wavy here, but using this approximation in our earlier expression ($*$) yields $$\sqrt{\frac{n}{2\pi}} \exp\left(-z_n\sqrt{n} + (n+1) \left(\frac{1+z_n \sqrt{n}}{n} - \frac{(1+z_n \sqrt{n})^2}{2n^2}\right)\right).$$ If we pretend the $n+1$ is instead $n$, then the first two terms in the exponential become simply $-z_n\sqrt{n} + n \frac{1+z_n \sqrt{n}}{n} = 1$. Similarly, the remaining term $-(n+1)\frac{(1+z_n \sqrt{n})^2}{2n^2}$ is approximately $-n\frac{(z_n \sqrt{n})^2}{2n^2} = -z_n^2/2$. This shows how the given expression with $e^{1-z_n^2/2}$ is plausible, but I've done a lot of hand-waving in the last few steps, which should be handled with more care if you want to be rigorous.