Critical region for testing a hypothesis with exponential data.

1.3k Views Asked by At

I have trouble with the following problem:

We assume that X has a Exp(λ)-distribution with a unknowns value of λ. We test H0: λ=0.2 versus H1: λ < 0.2. We use X as test statistic. a. Calculate the critical area for alpha = 0.05 b. The measured X=10, calculate the P-value ans: [14.98, infinity) and p = 0.135

I know that the critical area is the collection of values for which H0 is rejected in favor of H1. In the case of a normal distribution I know how to calculate the critical region. Depending on the kind of alternate hypothesis and the significance level I can caluclate the Z-value. With the Z-value I can calculate the X.

Unfortunately I don't know how to do this with an exponential distribution. I have issues with visualising it, since a different λ gives a different curve.

Can I please get some feedback?

Thanks, Ter

1

There are 1 best solutions below

3
On BEST ANSWER

The parameter $\lambda$ in an exponential distribution is the rate. The mean $\mu = E(X) = 1/\lambda.$

So if you are using a single observation $X \sim \mathsf{Exp}(\lambda)$ to test $H_0$ vs. $H_a$ as in your question, then the critical region is of the form $\{X \le c\},$ where the critical value $c$ is chosen so that $$P(X \ge c\,|\,\lambda_0 = 0.2) = \alpha = 0.05.$$ You can evaluate $c$ using the CDF of $\mathsf{Exp}(\lambda_0 = 0.2)$ or using statistical software. The result from R, where qexp is an exponential quantile function (inverse CDF).

qexp(.95, 0.2)
[1] 14.97866

Below is a graph of the Density function of $\mathsf{Exp}(.2),$ along with a dotted vertical red line at $c = 14.98.$ The area under the density curve to the right of this red line is $0.05 = 5\%.$ Your data value at $X = 10$ is shown as a solid blue line. The P-value $0.1353$ is the area to the right of the solid blue line.

enter image description here

1 - pexp(10, .2)
[1] 0.1353353

Using the exponential CDF on a calculator, this is $e^{-.2(10)} = e^{-2} = 0.1353353.$

Your data value does not lie in the critical region, to the right of the dotted red line, so you do not reject $H_0$ at the 5% level of significance. Also, because the P-value exceeds 5%, you cannot reject at the 5% level.

Note: The R code for making the plot is shown below.

curve(dexp(x,.2), 0, 25, lwd=2, ylab="PDF", 
      main="Density of EXP(rate=0.2)")
  abline(v=0, col="green2")
  abline(h=0, col="green2")
  abline(v = 14.98, col="red", lty="dotted", lwd=2)
  abline(v = 10, col="blue")