1. ## Neyman-Pearson Lemma

Suppose that X represents a single observation from the distribution given by:

f(x; θ) = θ*x^(θ - 1) for 0 < x < 1

a.) Find the most powerful test with significance level alpha = 0.05 to test H_0: θ = 2 against H_a: θ = 1

b.) How does the nature of the test statistic and rejection region for
the most powerful test change if the Ha is changed to Ha: θ = 4.

My attempt:

I believe that this problem deals with the Neyman-Pearson Lemma, so I would have to find
L_0 and L_1

so, for part (a):

L_0 = pi summation from i = 1 to n of
θ*x^(θ - 1) = (θ^n)*Σx^(θ - 1) I think

L_1 would equal the same thing, except theta would be theta sub 1 and in L_0, theta is theta sub 0.

Then, you would do: L(1) / L(2)

But, before I go ahead and calculate that, I am wondering if I am doing this problem correctly?

2. ## Re: Neyman-Pearson Lemma

you have 1 observation... what are you summing?

3. ## Re: Neyman-Pearson Lemma

I'm using the pi summation because that was the general formula that my teacher told us to use in our notes

4. ## Re: Neyman-Pearson Lemma

Originally Posted by AwesomeHedgehog
I'm using the pi summation because that was the general formula that my teacher told us to use in our notes
I don't have your notes in front of me but I'm pretty sure that applies only when you have multiple observations. I mean think about it. Someone tells you X=x and asks you to test for $H_0$ vs. $H_a$. What are you going to sum?

I don't know how you are being taught this stuff, I'm not in any sort of communication w/your teacher. The way I would approach this problem is as follows. This is upside down from the usual NP but is easier in this case and entirely equivalent.

find $T=L(H_a)/L(H_0)$

In the first bit of your problem this is

$T=\dfrac{2 x^{2-1}}{1 x^{1-1}}= 2x$

The factor of 2 doesn't add any value here so just let

$T=x$

Now by NP your test is that $T\geq \eta$ to declare $H_a$

The Type I error will be given by

$Pr[\text{select } H_a|H_0]=\alpha$

In this case this is

$Pr[x\geq \eta | H_0]$

if you work it out this is just

$1-\eta, ~~0\leq \eta \leq 1$

so letting $1-\eta =\alpha \Rightarrow \eta = 1-\alpha$ we can then solve for the power of the test in terms of the Type I error

$Pr[x\geq (1-\alpha) |H_a]=$

$\displaystyle{\int_{(1-\alpha)}^1} 2x ~dx=1-(1-\alpha)^2$ for $0 \leq (1-\alpha) \leq 1$

and from this you can plot the ROC curve for for this test, i.e. the Power vs. the Type I error

5. ## Re: Neyman-Pearson Lemma

Originally Posted by romsek
I don't have your notes in front of me but I'm pretty sure that applies only when you have multiple observations. I mean think about it. Someone tells you X=x and asks you to test for $H_0$ vs. $H_a$. What are you going to sum?

I don't know how you are being taught this stuff, I'm not in any sort of communication w/your teacher. The way I would approach this problem is as follows. This is upside down from the usual NP but is easier in this case and entirely equivalent.

find $T=L(H_a)/L(H_0)$

In the first bit of your problem this is

$T=\dfrac{2 x^{2-1}}{1 x^{1-1}}= 2x$

The factor of 2 doesn't add any value here so just let

$T=x$

Now by NP your test is that $T\geq \eta$ to declare $H_a$

The Type I error will be given by

$Pr[\text{select } H_a|H_0]=\alpha$

In this case this is

$Pr[x\geq \eta | H_0]$

if you work it out this is just

$1-\eta, ~~0\leq \eta \leq 1$

so letting $1-\eta =\alpha \Rightarrow \eta = 1-\alpha$ we can then solve for the power of the test in terms of the Type I error

$Pr[x\geq (1-\alpha) |H_a]=$

$\displaystyle{\int_{(1-\alpha)}^1} 2x ~dx=1-(1-\alpha)^2$ for $0 \leq (1-\alpha) \leq 1$

and from this you can plot the ROC curve for for this test, i.e. the Power vs. the Type I error

So, would all of that be just the answer to part (a) or is there more that has to be done for that part?

Also, for part (b) would I use the same integral going from (1 - alpha) to 1 of 4x dx?

6. ## Re: Neyman-Pearson Lemma

https://onlinecourses.science.psu.edu/stat414/node/307

The 4th example down on this page is extremely similar to this problem, so from what you just said and from this page I'm beginning to understand what is going on in this problem.

7. ## Re: Neyman-Pearson Lemma

Originally Posted by AwesomeHedgehog
So, would all of that be just the answer to part (a) or is there more that has to be done for that part?

Also, for part (b) would I use the same integral going from (1 - alpha) to 1 of 4x dx?
NP says the likelihood ratio test provides the most powerful test for a given Type I error so this is the test you want and that should complete (a)

for b) I want you to understand this stuff and apply it. Just follow the procedure but now $\theta_a =4$ instead of $2$

8. ## Re: Neyman-Pearson Lemma

Okay, so I started to do part (b) and got:

L(θ_0) / L(θ_a) = [2x^(2 -1)] / [4x^(4 - 1)] = 2x / 4x^3 = 1/(2x^2)

Then,

1/(2x^2) ≤ k

==> x^2 < 2k

And at this part, I'm wondering if x < sqrt(2k)

?

10. ## Re: Neyman-Pearson Lemma

This is my finished part of part (b):

L(θ_0) / L(θ_a) = [2x^(2 -1)] / [4x^(4 - 1)] = 2x / 4x^3 = 1/(2x^2)

Then,

1/(2x^2) ≤ k

==> x^2 < 2k

==> x < sqrt(2k)

Then,

alpha = P [ x < sqrt(2k) when θ = 1 ] = integral from 0 to K of 1/(2x^2) dx = - 1/(2K) = 0.05 ==> K = -0.10

Then x < -0.10

11. ## Re: Neyman-Pearson Lemma

Originally Posted by AwesomeHedgehog
This is my finished part of part (b):

L(θ_0) / L(θ_a) = [2x^(2 -1)] / [4x^(4 - 1)] = 2x / 4x^3 = 1/(2x^2)

Then,

1/(2x^2) ≤ k

==> x^2 < 2k

==> x < sqrt(2k)

Then,

alpha = P [ x < sqrt(2k) when θ = 1 ] = integral from 0 to K of 1/(2x^2) dx = - 1/(2K) = 0.05 ==> K = -0.10

Then x < -0.10
no. Your missing the point of some of this.

You got your test statistic $T=\dfrac 1 {2x^2}$ correct

We will compare this to our threshold $\eta$ to decide $H_0$ vs. $H_a$

As the likelihood decreases as x increases our test will be

$x^2 > \eta \rightarrow$ select $H_a$

Now you have to find your threshold $\eta$

You do this by selecting $\eta$ to produce the Type I error that is specified.

The Type I error is the probability you select $H_a$ when $H_0$ is actually true.

So it would be

$\alpha = \displaystyle{\int_{\eta}^1} p(x|H_0) ~dx = \displaystyle{\int_{\eta}^1} 2x ~dx=1-\eta^2$

and thus

$\eta = \sqrt{1-\alpha}$

If you recall from earlier two things are important

a) the earlier test statistic was just $x$ and from that the threshold was derived as $(1-\alpha)$
b) the earlier problem was such that the rejection region was reversed from this one, i.e. the test was

$x < \eta \rightarrow$ select $H_a$ as opposed to $x^2 > \eta \rightarrow$ select $H_a$

DO YOU SEE WHY?

digest this a bit and see if you can finish the problem.