# Thread: hypothesis testing: parameter 0 against parameter positive.

1. ## hypothesis testing: parameter 0 against parameter positive.

I failed at the test in statistics recently and I'm preparing to another term. This a problem from the test. I'm translating the problem from Polish; I'm sorry if I'm getting some words wrong.

The problem:

We observe a single variable $\displaystyle X$ with the following pdf:

$\displaystyle f_{\theta}(x)= \begin{cases} {\theta}e^{-x}+2(1-\theta)e^{-2x} & \mbox{dla } x \ge 0; \\ 0 & \mbox{dla } x < 0, \end{cases}$

where $\displaystyle \theta\in[0,1]$ is an unknown parameter.

(a) Find the uniformly most powerful test with the significance level of $\displaystyle \alpha = 0.05$ to verify the null hypothesis $\displaystyle H_0\,:\,\theta=0$ against the alternative hypothesis $\displaystyle H_1 \,:\,\theta > 0.$

(b) Find the power function of the test.

My attempt:

First, I want to find the most powerful test with the level of significance of 0.05 to verify the hypothesis $\displaystyle H_0$ against the alternative hypothesis $\displaystyle H_2\,:\,\theta=\theta_1,$ where $\displaystyle \theta_1$ is a fixed number larger than 0. This I want to achieve by using the Neyman-Pearson lemma. Then I want to say that this test is also most powerful against $\displaystyle H_1,$ which I would like to be implied by the arbitrarity of $\displaystyle \theta_1>0$ and a simple reasoning. I'm not entirely convinced about this simple reasoning. It comes from my book and althought I thought I understood it, I'm not so sure now. I will say what I mean on request, but now I'd like to give my other trouble.

The trouble:

The calculations seem more complicated than usually on such tests, which makes me think I'm doing something wrong.

The calculations:

We have:
$\displaystyle f_0(x)=\begin{cases} 2e^{-2x} & \mbox{dla } x \ge 0; \\ 0 & \mbox{dla } x < 0, \end{cases}$

$\displaystyle f_2(x)=\begin{cases} {\theta}_{1}e^{-x}+2(1-\theta_1)e^{-2x} & \mbox{dla } x \ge 0; \\ 0 & \mbox{dla } x < 0, \end{cases}$

where $\displaystyle \theta_1\in(0,1].$

The likelihood ratio is given by the following formula, for $\displaystyle x\ge0:$

$\displaystyle \frac{f_2(x)}{f_0(x)}=\frac{2e^{-2x}}{{\theta}_{1}e^{-x}+2(1-\theta_1)e^{-2x}}$

N-P tells me I want to look for the rejection region of the following form:

$\displaystyle K^*=\left\{x\ge0\,:\,\frac{2e^{-2x}}{{\theta}_{1}e^{-x}+2(1-\theta_1)e^{-2x}}>c\right\},$

where $\displaystyle c>0$ is a constant we will have to choose correctly.

We want

$\displaystyle 0.05=\mathbb{P}_0\left(\left\{x\ge0\,:\,\frac{2e^{-2x}}{{\theta}_{1}e^{-x}+2(1-\theta_1)e^{-2x}}>c\right\}\right)=\mathbb{P}_0\left(\left\{x\g e0\,: 2e^{-2x}\left[1-c(1-\theta_1)\right]>\theta_{1}ce^{-x}\right\}\right)=\mathbb{P}_0\left(\left\{x\ge0\, : e^{-x}\left[1-c(1-\theta_1)\right]>\frac{1}{2}\theta_{1}c\right\}\right).$

Here's my trouble. To solve the inequality with respect to $\displaystyle x,$ I need to divide by $\displaystyle \left[1-c(1-\theta_1)\right],$ whose sign I don't know, so I have to consider two cases and some unpleasant calculations seem to follow. As far as I know my professor, it's impossible, so I think I'm doing it the wrong way.

It's unfortunately my first attempt at solving a problem with a composite hypothesis.

I'll be very grateful for any help.

PS: I'm sorry about the size of the formulas, but I have no idea what to do about it. They show correctly in preview.