How to find p-value when null distribution is of gamma and given observation

192 Views Asked by At

Doing a hypothesis question, where

$$H_0: \lambda=10$$ $$H_1: \lambda \neq 10$$

null distribution to be ~$\gamma(\alpha=20,\lambda=10)$, where 10 is in rate, and an observed sample =0.8, how do I find the p-value?

I have tried to find the CDF of the gamma distribution from 0 to 1.4 and multiplying the area by 2 for 2 tailed test.

I have also tried finding the other "x" value where $\gamma(2.432) = \gamma(1.4)$ then $1- \int_{1.4}^{2.432} \gamma(x) dx $ however both seems to be wrong.

1

There are 1 best solutions below

0
On

In your case, $$X \mid H_0 \sim \operatorname{Gamma}(\alpha = 20, \lambda = 10)$$ and observing a single $X = 0.8$ for the two-sided hypothesis

$$H_0 : \lambda = 10 \quad \text{vs.} \quad H_1 : \lambda \ne 10$$ means your $p$-value is $$p = 2 \Pr[X \le 0.8 \mid H_0] = 2 \int_{x=0}^{0.8} \frac{10^{20} x^{19} e^{-10x}}{\Gamma(20)} \, dx \approx 2(0.000252939) = 0.000505879.$$

I don't know where you got $1.4$ from, if your observation is $X = 0.8$.