Nate's Notes

Collection of notes for various classes I've taken.

Buy Me A Coffee

November 19

Null and Alternative Hypotheses

In any formal hypothesis test we set up two competing statements about a population parameter:

Choice of $H_a$ should reflect the scientific question or the direction of interest before seeing the data.

Significance Level ($\alpha$)

The significance level $\alpha$ is the threshold for declaring a result “statistically significant.” It is the long-run probability of making a Type I error when $H_0$ is true. Common choices are $\alpha=0.05,\;0.01,$ or $0.10$. Formally:

\[\alpha = P(\text{Reject } H_0 \mid H_0 \text{ is true}).\]

The critical value(s) for the test statistic are chosen so that the probability of falling into the rejection region under $H_0$ equals $\alpha$ (split between tails for two-sided tests).

Types of Errors

There are two possible incorrect decisions in hypothesis testing.

Power of a test is the complement of the Type II error rate:

\[ext{Power} = 1-\beta = P(\text{Reject } H_0 \mid H_a \text{ is true}).\]

Trade-offs and Practical Notes

Decision and p-value

Compute a test statistic (e.g., $t$ or $z$) and its p-value. The p-value is defined as:

\[ext{p-value} = P(\text{Data as extreme or more extreme} \mid H_0 \text{ true}).\]

Always interpret results in context and report $\alpha$, test statistic, degrees of freedom (if applicable), p-value, and a conclusion about the hypotheses.

Examples

Example 1: Testing a Population Mean

A researcher wants to test if the average weight of a certain species of fish is different from 5 kg. A random sample of 30 fish is taken, and the sample mean weight is 5.3 kg with a standard deviation of 0.8 kg. Test at the 0.05 significance level.

Step 1: State the hypotheses

Step 2: Choose the significance level

Step 3: Compute the test statistic

Step 4: Find the critical value or p-value

Conclusion: There is evidence at the 0.05 significance level to conclude that the average weight of the fish is different from 5 kg.


Example 2: Testing a Proportion

A company claims that 80% of its customers are satisfied with their service. A random sample of 100 customers shows that 72 are satisfied. Test the claim at the 0.01 significance level.

Step 1: State the hypotheses

Step 2: Choose the significance level

Step 3: Compute the test statistic

Step 4: Find the critical value or p-value

Conclusion: There is not enough evidence at the 0.01 significance level to conclude that the proportion of satisfied customers is different from 80%.


Example 3: Power of a Test

A clinical trial is designed to detect a mean difference of 5 units in blood pressure with a standard deviation of 10 units. The sample size is 50, and the significance level is 0.05. What is the power of the test if the true mean difference is 5 units?

Step 1: Compute the test statistic under $H_0$

Step 2: Find the critical value

Step 3: Compute the power

Conclusion: The test has a high power of 0.95 to detect the specified mean difference.