MTH-161D | Spring 2025 | University of Portland
March 21, 2025
These slides are derived from Diez et al. (2012).
The guiding principle of statistics is statistical thinking.
Statistical Thinking in the Data Science Life Cycle
Parameter Estimation | Hypothesis Testing | |
---|---|---|
Goal | Estimate an unknown population value | Assess claims about a population value |
Methods | Point Estimation: A single value estimate (e.g., sample
mean) Interval Estimation: A range of plausible values (e.g., confidence interval) |
State a null and an alternative hypothesis Compute a test statistic and compare it to a threshold (p-value or critical value) |
Key Concept | Focuses on precision in estimation (confidence intervals) | Focuses on decision-making based on evidence (reject or fail to reject the null hypothesis) |
Confidence Interval for One Proportion
\[\hat{p} \pm z^{\star} \text{SE}_{\hat{p}}\]
\[ \begin{aligned} \hat{p} & \longrightarrow \text{sample proportion (or the point estimate)} \\ z^{\star} & \longrightarrow \text{critical z-score at a given confidence level} \\ \text{SE}_{\hat{p}} & \longrightarrow \text{standard error of the sampling distribution} \\ \end{aligned} \]
Hypothesis Testing for One Proportion
\[ \begin{aligned} p & \longrightarrow \text{population proportion} \\ \hat{p} & \longrightarrow \text{sample proportion (or the point estimate)} \\ H_0: p = p_0 & \longrightarrow \text{null hypothesis} \\ H_A: p \ne p_0 & \longrightarrow \text{alternative hypothesis (can be } < \text{ or } > \text{)} \\ z & \longrightarrow \text{test statistic} \\ \text{SE}_{p} & \longrightarrow \text{standard error of the null distribution} \\ \end{aligned} \]
Hypothesis testing is a statistical method used to make inferences about a population based on a sample. It helps determine if an observed effect is statistically significant.
Key Concepts:
Decision Rule:
Why is Hypothesis Testing Important?
Scenario:
A pharmaceutical company tests whether a new drug improves recovery rates compared to a placebo.
Test Results:
Conclusion:
There are two possible outcomes of the hypothesis test:
Reject \(H_0\): If the p-value is less than the significance level, then we reject the null hypothesis. Then, we have enough evidence to support \(H_A\).
Fail to Reject \(H_0\): If the p-value is greater than or equal to the significance level, then we fail to reject the null hypothesis. This does not mean the the null hypothesis is true.
Making statistical decisions means that you have to deal with uncertainties.
What does this all mean? When the p-value is small, i.e., less than a previously set threshold (\(\alpha\)), we say the results are statistically significant. The value of \(\alpha\) represents how rare an event needs to be in order for the null hypothesis to be rejected. The \(\alpha\) also represents the probability of committing a type I error.
Reality/Decision | Reject \(H_0\) | Fail to reject \(H_0\) |
---|---|---|
\(H_0\) is true | Type I error with probability \(\alpha\) (significance level) |
Correct decision with probability \(1-\alpha\) (confidence level) |
\(H_0\) is false | Correct decision with probability \(1-\beta\) (power of test) |
Type II error with probability \(\beta\) |
Conclusion errors: Type I error (false positive) or Type II error (false negative)
Images Source: Type I and Type II errors by Pritha Bhandari
A Type I error occurs when the null hypothesis is incorrectly rejected, leading to a wrongful conviction.
This means that an innocent person is found guilty and sentenced, possibly facing imprisonment or even capital punishment. The consequences extend beyond the individual, affecting their family, reputation, and future opportunities. Additionally, the real perpetrator remains free, potentially committing further crimes.
A Type II error occurs when the null hypothesis was failed to reject, leading to a wrongful acquittal.
This means that a guilty person is found not guilty and released. As a result, justice is not served for the victims, and the criminal may go on to commit additional offenses, putting society at risk. This error can undermine public trust in the legal system, as it fails to hold the guilty accountable.
.pdf
file.