Compute the p-value in hypothesis testing

50 Views Asked by At

The data generating process is $$ f(x \mid \theta)=\frac{1}{\theta}, \quad 0 \leq x \leq \theta $$ Let $H_1: \theta=5$ and $H_2: \theta \neq 5$. Prior probabilities of $\frac{1}{2}$ are assigned to the two hypotheses, and a sample of size $5$ yields a maximum value of $4$. Find the $p$-value here.

According to the definition of $p$-value, $$ p=\mathbb{P}(LR \leq LR^* \mid H_1), $$ and $LR^*=\left(\frac{4}{5}\right)^5$. I am not sure what to do next. Furthermore, intuitively, if the maxima is equal to $5$ exactly, shall we get an extremely big $p$ or a small one?

1

There are 1 best solutions below

0
On BEST ANSWER

The p-value is the probability of getting a value as extreme as the one observed under the null hypothesis, therefore should be $Pr(\max\{X_1,...,X_5\}\le 4|\theta=5)$. Since $H_0:\theta=5$ means that X has the continuous uniform distribution $X\sim \mathscr {Unif}\left(0, 5\right)$, we expect the pvalue to be $Pr(X_1\le4)*...*Pr(X_5\le4)=\left(\frac 4 5\right)^5=.32768$.

We should get a p-value close to 1 if the maximum is close to 5 and less than 5, and a p-value close to 0 if the maximum is close to 0 and positive. We should get p-values of 0 if the maximum is greater than 5, and it's impossible to get a maximum less than 0 because it's not in the support of the data-generating process.