[Math] Compute the probability of committing a type I and II error.

hypothesis testingprobabilitystatistics

I hope that someone could help me with the following question of my textbook:

One generates a number x from a uniform distribution on the interval [0,θ]. One 
decides to test H0 : θ = 2 against H1 : θ = 2 by rejecting H0 if x ≤0.1 or x ≥ 1.9. 

a. Compute the probability of committing a type I error.

b. Compute the probability of committing a type II error if the true value of θ is 2.5

So my understanding of this question is that it would not reject if x is 1.9-2.0 or 0.0-0.1.

The problem with this question is that I don't how to start. In my previous questions I had more information to solve this kind of questions. I think I understand what error type I and II mean. Type I means falsely rejected and type II falsely accepted.

According to the book, the answers are a:0.1 and b:0.72

Best Answer

For a type I error, you calculate the probability of a rejection under the assumption that the null hypothesis is true. So you find the density of $X$, call it $f_X$, under the assumption that $\theta=2$. Then the probability of a rejection is

$$\int_0^{0.1} f_X(x) dx + \int_{1.9}^2 f_X(x) dx.$$

For a type II error, you calculate the probability of an acceptance under the assumption that the null hypothesis is false. In real problems you generally can't compute this, because usually knowing that the null hypothesis is false doesn't specify the distribution uniquely. But in your case they tell you what the actual value of $\theta$ is for this part of the problem, which lets you compute it. Specifically, the probability of an acceptance is

$$\int_{0.1}^{1.9} f_X(x) dx$$

where $f_X$ is the density of $X$ under the assumption $\theta=2.5$.

Related Question