Motivation Example
Probability Review
z-Test
t-test
Examples
The weight of new born babies is an important
indicator for the baby’s health.
Assumption: Newborn babies who weigh more
than the average weight of newborns are considered healthy.
Tell me, what should I do to check if my newborn brother is healthy?
:::
In this chapter, we aim to test simple hypothesis testing of the form: \[\begin{cases}\color{red}{H_0}:\mu=\color{blue}{\mu_0}\\{ }\\ \color{green}{H_1}: \mu\underset{<}{\overset{>}{\neq}} \color{blue}{\mu_0},\end{cases}\]
For any \(\alpha\in(0,1)\) (significance level, a common choice is \(0.05\)), we aim to design a rule to reject \(\color{red}{H_0}\) and guarantees that \(\mathbb{P}(\color{red}{\text{Reject }H_0}|H_0\text{ is True})\leq \alpha\).
To this goal, we need some tools from Probability!
Q1: I would open a ☕ coffee shop at a location if the sell count is at least \(500\) cups per day. Please design the null and alternative hypotheses.
\(\omega\) | \(X\) |
---|---|
TTT | \(0\) |
HTT, THT, TTH | \(1\) |
HHT, HTH, HHT | \(2\) |
HHH | \(3\) |
\(\omega\) | \(X\) | \(p_k\) |
---|---|---|
TTT | \(0\) | \(1/8\) |
HTT, THT, TTH | \(1\) | \(3/8\) |
HHT, HTH, HHT | \(2\) | \(3/8\) |
HHH | \(3\) | \(1/8\) |
\(\omega\) | \(X\) | \(p_k\) |
---|---|---|
TTT | \(0\) | \(1/8\) |
HTT, THT, TTH | \(1\) | \(3/8\) |
HHT, HTH, HHT | \(2\) | \(3/8\) |
HHH | \(3\) | \(1/8\) |
\(X=k\) | \(p_k=\mathbb{P}(X=k)\) |
---|---|
\(\color{green}{1}\) | \(\color{green}{p}\) |
\(\color{red}{0}\) | \(\color{red}{1-p}\) |
\(X\) | \(0\) | \(1\) | \(2\) | \(\dots\) | \(n\) |
---|---|---|---|---|---|
\(p_k\) | \((1-p)^n\) | \(np(1-p)^{n-1}\) | \(\frac{n(n-1)}{2}p^2(1-p)^{n-2}\) | \(\dots\) | \(p^n\) |
X | \(0\) | \(1\) | \(2\) | \(\dots\) | \(n\) |
---|---|---|---|---|---|
\(p_k\) | \((1-p)^n\) | \(np(1-p)^{n-1}\) | \(\frac{n(n-1)}{2}p^2(1-p)^{n-2}\) | \(\dots\) | \(p^n\) |
X | \(0\) | \(1\) | \(2\) | \(3\) | \(\dots\) |
---|---|---|---|---|---|
\(p_k\) | \(e^{-\lambda}\) | \(e^{-\lambda}\lambda\) | \(e^{-\lambda}\frac{\lambda^2}{2!}\) | \(e^{-\lambda}\frac{\lambda^3}{3!}\) | \(\dots\) |
X | \(0\) | \(1\) | \(2\) | \(3\) | \(\dots\) |
---|---|---|---|---|---|
\(p_k\) | \(e^{-\lambda}\) | \(e^{-\lambda}\lambda\) | \(e^{-\lambda}\frac{\lambda^2}{2!}\) | \(e^{-\lambda}\frac{\lambda^3}{3!}\) | \(\dots\) |
\[\color{red}{\mathbb{P}(a<X<b)=\mathbb{P}(a\leq X<b)=\mathbb{P}(a<X\leq b)=\mathbb{P}(a\leq X\leq b)=\int_{a}^bf_X(x)dx.}\]
Gender | Age | Height | Weight | |
---|---|---|---|---|
1 | M | 74 | 116 | 18 |
2 | M | 69 | 120 | 23 |
3 | M | 72 | 121 | 25 |
Standard Normal & The main property
A normal RV with mean \(\mu=0\) and variance \(\sigma^2=1\), denoted by \(X\sim{\cal N}(0,1)\), is called “Standard Normal Random Variable”.
If \(X_1,\dots, X_n\sim{\cal N}(\color{green}{\mu},\color{red}{\sigma^2})\) are Independent and Identically Distributed (iid) and \(\overline{X}_n=\sum_{i=1}^nX_i/n\) then \[Z=\frac{\overline{X}_n-\color{green}{\mu}}{\color{red}{\sigma}/\sqrt{n}}\sim {\cal N}(0,1).\]
Standard Normal & The main property
A normal RV with mean \(\mu=0\) and variance \(\sigma^2=1\), denoted by \(X\sim{\cal N}(0,1)\), is called “Standard Normal Random Variable”.
If \(X_1,\dots, X_n\sim{\cal N}(\color{green}{\mu},\color{red}{\sigma^2})\) are Independent and Identically Distributed (iid) and \(\overline{X}_n=\sum_{i=1}^nX_i/n\) then \[Z=\frac{\overline{X}_n-\color{green}{\mu}}{\color{red}{\sigma}/\sqrt{n}}\sim {\cal N}(0,1).\]
If \(Z\sim{\cal N}(0,1)\), use \(z\)-table to compute:
And now, we have enough probability tools!
Z-test statistics & Rejection Region
Z-test Summary (\(S_>\))
Z-test Summary (\(S_<\))
Z-test Summary (\(S_\neq\), two-sided test)
Source: Birth weight of newborns delivered in France 2016, Statistia.
If \(T\sim{\cal T}(\text{df})\), use \(t\)-table to estimate:
For the followings, df \(=23\):
\(t\)-Test Summary (\(T_>\))
\(t\)-Test Summary (\(T_<\))
\(t\)-Test Summary (\(T_\neq\))