Hypothesis testing

Decision\true Accused is inocent accused is guilty
Accused is innocent Type II: slightly less
serious error
Accused is guilty Type I: more serious
error

Desision\truth old is better new is better
Old is better Type II: slightly less
serious error
New is better Type I: more serious
error

Level and Power

Next class: quantifying errors

Examples

note: hypothesis testing is done for a single sample

\[\begin{align} H_{0}&: \bar{x} \sim \mathcal{N} \left( \mu_{0}, \frac{s^{2}}{n} \right) \\ z_{\text{test-stat}}&=z_{\text{obs}}=\left( \frac{\bar{x}-\mu_{0}}{\frac{s}{\sqrt{ n }}} \right) \sim \mathcal{N} \left( 0, 1 \right) \end{align}\]

$\alpha=$ level of significance ⟶ maximum amount of tolerable type 1 error

$100(1-\alpha)\%$ = confidence level

\(\begin{align} z_{obs} > z_{\alpha} \to\text{reject } H_{0} \\ z_{obs} < z_{\alpha} \to\text{accept } H_{0} \end{align}\)

29 January 2025:

Iceberg

\(H_{0}: \mu\geq 58=\mu_{0}\)

\[H_{a}:\mu<58\] \[\frac{\bar{x}-\mu_{0}}{se(\bar{x})}\] \[t_{\text{test-stat}} = \frac{\bar{x}-\mu_{0}}{s/{\sqrt{ n }}} \sim t_{n-1}\]

Decision rule

Alternative Hypothesis can look like one of these:

Important: Concluding statement. In the light of the evidence provided to us, it seems that the null hypothesis should be accepted for 5% level of significance.

In the light of the evidence provided to us, it seems that the turnover time will be good for 5% level of significance.


30 January 2025

Problems on one-sample proportion

  1. Houston department store problem.
\[\begin{align} \mathrm{E}\left[ \hat{p} \right]=p \\[5pt] \mathrm{var}\left(\hat{p} \right) = \frac{\hat{p}(1-\hat{p})}{n} \\[20pt] \text{CLT: } n \hat{p} > 5 \text{ then} \\[5pt] \hat{p}\sim \mathcal{N} \left( p, \frac{p(1-p)}{n} \right) \\[10pt] \end{align}\] \[\begin{align} H_{0}&:\hat{p}=p_{0} \\ H_{0}&:n\hat{p}=80\times \frac{12}{80} = 12>5 \implies \text{CLT} \\ \\ \hat{p}&\sim \mathcal{N} \left( p, \frac{p(1-p)}{n} \right) \\ \\ \frac{\hat{p}-p}{\sqrt{ \frac{p(1-p)}{n} }} &\sim \mathcal{N} \left( 0, 1 \right) \end{align}\] \[p_{\text{test-stat}} = \frac{\hat{p}-p_{0}}{\sqrt{ \frac{p_{0}(1-p_{0})}{n} }} \sim \mathcal{N} \left( 0, 1 \right)\]

$z_{\text{obs}}=3.3895960972$

Given the sample data provided to us, it seems that the propotion of items returned from the Houston store is significantly different from the national figures at 5% level of significance (or 95% level of confidence).

If your $100(1-\alpha)\%$ CI contains the null value, then accept $H_{0}$, at $\alpha\%$ level of significance, otherwise reject $H_{0}$.