$p$-value Definition

I was reading Statistical Inference (2nd edition) by George Casella & Roger L. Berger when I came across a formal definition of p-value, followed by a theorem stating that

Let W(X) be a test statistic such that large values of W give evidence that $H_1$ is true. For each sample point x, define $$p(x)=\sup_{\theta \in \Theta_0} P_{\theta}(W(X) \geq W(x))$$ Then, p(X) is a valid p-value.

My question is what if the test statistic is the one whose small values give evidence that $H_1$ is true? Is the $p$-value defined as $\inf_{\theta \in \Theta_0} P_{\theta}(W(X) \leq W(x))$ in that case? Thank you a lot.

• That's an awful definition. It seems to define "a valid p-value", so presumably that contrasts with an invalid p-value. Aug 1, 2018 at 4:57
• If by "small" you mean "very negative," then replace $W$ by $-W$ and apply the definition. For other concepts of "small" it's likely a similar procedure will work.
– whuber
Aug 1, 2018 at 12:53

$$p(x)=\sup_{\theta \in \Theta_0} P_{\theta}(W(X) \leqslant W(x))$$