Collection of notes for various classes I've taken.
The p-value is a measure of the strength of evidence against the null hypothesis. Formally, it is the probability of observing a test statistic as extreme as, or more extreme than, the one observed, assuming the null hypothesis is true. That is,
\[p = \begin{cases} P(T > t) & \text{if } H_a: \theta > \theta_0 \text{ (Right-tailed)}, \\ P(T < t) & \text{if } H_a: \theta < \theta_0 \text{ (Left-tailed)}, \\ 2P(T > |t|) & \text{if } H_a: \theta \neq \theta_0 \text{ (Two-tailed)}. \end{cases}\]for test statistic $t$.
The p-value quantifies the compatibility of the data with the null hypothesis.
Important Note: The p-value is not the probability that the null hypothesis is true, nor is it the probability that the alternative hypothesis is false. It is strictly a probability regarding the data, given the assumption that $H_0$ is true.
To make a formal decision, compare the calculated p-value to the chosen significance level $\alpha$.
\[\text{Decision} = \begin{cases} \text{Reject } H_0 & \text{if } \text{p-value} \le \alpha \\ \text{Fail to reject } H_0 & \text{if } \text{p-value} > \alpha \end{cases}\]The calculation of the p-value depends on the distribution of the test statistic (e.g., Standard Normal $Z$ or Student’s $t$) and the degrees of freedom.
A school claims that their students average higher than the national average of 500 on a standardized test. A sample of 50 students yields a mean of 515 with a population standard deviation of 40.
Step 1: State the hypotheses
Step 2: Compute the test statistic
Step 3: Find the p-value
Step 4: Conclusion
A manufacturer fills bags with 250g of coffee. A quality control manager wants to test if the bags are off-target (either underfilled or overfilled). A sample of 15 bags has a mean of 248g and a standard deviation of 4g.
Step 1: State the hypotheses
Step 2: Compute the test statistic
Step 3: Find the p-value
Step 4: Conclusion
Consider the previous Example 2 (Coffee bags) where $t \approx -1.94$ and $\text{p-value} = 0.072$.
Note: Both methods will always yield the same decision regarding the null hypothesis. However, the p-value provides more granular information about the strength of the evidence than a simple “Reject/Fail to Reject” binary.