# Calculate critical value for test H_0
qt(1-0.05,9)[1] 1.833113
qt(1-0.1,9)[1] 1.383029
Week 11
In today’s lecture, we will learn about:
Textbook Reference: JA 16.1 16.2, SDG 9.6
For a two-sided test of an unknown parameter \(\theta\)
| Rejection rule based on t-statistics (test at \(\alpha\)-level) |
|---|
|
The p-value of a test of the null hypothesis \(H_0\) is the smallest level \(\alpha^*\) such that the test rejects \(H_0\) at \(\alpha\)-level.
| Rejection rule based on p-value (test at \(\alpha\)-level) |
|---|
|
For a one-sided test of an unknown parameter \(\theta\)
| Rejection rule based on t-statistics (test at \(\alpha\)-level) |
|---|
|
| Rejection rule based on t-statistics (test at \(\alpha\)-level) |
|---|
|
# Calculate critical value for test H_0
qt(1-0.05,9)[1] 1.833113
qt(1-0.1,9)[1] 1.383029
The p-value of a test of the null hypothesis \(H_0\) is the smallest level \(\alpha^*\) such that the test rejects \(H_0\) at \(\alpha\)-level.
\[\text{p-value}=P\left(T<\frac{\bar{x}-c}{s_x/\sqrt{n}}\right) \text{ when }H_0:\mu\geq c \text{ is true, where }T\sim t_{n-1}.\]
\[\text{p-value}=P\left(T>\frac{\bar{x}-c}{s_x/\sqrt{n}}\right) \text{ when }H_0:\mu\leq c \text{ is true, where }T\sim t_{n-1}.\]
| Rejection rule based on p-value (test at \(\alpha\)-level) |
|---|
|
# Calculate p-value for test H_0
1-pt(1.116,9)[1] 0.1466655
What if you have two-sample and want to test difference in means, you’re working two an unknown parameter \(\theta_1\) and \(\theta_2\)
You have m sample of \(X\) and \(n\) sample of \(Y\). You want to test \(H_0:\mu_X\leq\mu_Y\).
Turns out you just need to update your t-statistics:
\[U=\frac{(m+n-2)^{1/2}(\bar{x}-\bar{y})}{\left(\frac{1}{m}+\frac{1}{n}\right)^{1/2}(s_{x}^2+s_{y}^2)^{1/2}}\sim t_{m+n-2}\]
The rejection rules are the same as before both for one-sided and two-sided (replace \(\alpha\) with \(\alpha/2\)).
Sample mean: \(\bar{X}\overset{a}{\sim} N\left(\mu_X,\frac{\sigma^2_X}{n}\right)\)
Sample standard deviation: \(s_X\overset{a}{\sim} N\left(\sigma_X,\frac{E((X-\mu_X)^4)-(\sigma_X^2)^2}{4n\sigma_X^2}\right)\)
Sample median: \(\tilde{X}_{0.5}\overset{a}{\sim} N\left(\tau_{X,0.5},\frac{1}{4nf_X(\tau_{X,0.5})^2}\right)\)
Sample quantiles: \(\tilde{X}_{q}\overset{a}{\sim} N\left(\tau_{X,q},\frac{q(1-q)}{nf_X(\tau_{X,q})^2}\right)\)
Sample correlation: \(r_{XY}\overset{a}{\sim} N\left(\rho_{XY},\frac{(1-\rho_{XY}^2)^2}{n}\right)\)
For a two-sided test of an unknown parameter \(\theta\)
| Rejection rule based on z-statistics (test at \(\alpha\)-level) |
|---|
|
The p-value of a test of the null hypothesis \(H_0\) is the smallest level \(\alpha^*\) such that the test rejects \(H_0\) at \(\alpha\)-level.
\[\text{p-value}=P\left(|Z|<\left|\frac{\hat{\theta}-c}{se(\hat{\theta})}\right|\right) \text{ when }H_0:\theta= c \text{ is true, where }Z\sim N(0,1).\]
| Rejection rule based on p-value (test at \(\alpha\)-level) |
|---|
|
| Rejection rule based on z-statistics (test at \(\alpha\)-level) |
|---|
|
| Rejection rule based on z-statistics (test at \(\alpha\)-level) |
|---|
|
The p-value of a test of the null hypothesis \(H_0\) is the smallest level \(\alpha^*\) such that the test rejects \(H_0\) at \(\alpha\)-level.
\[\text{p-value}=P\left(Z<\frac{\hat{\theta}-c}{se(\hat{\theta})}\right) \text{ when }H_0:\theta\geq c \text{ is true, where }Z\sim N(0,1).\]
\[\text{p-value}=P\left(Z>\frac{\hat{\theta}-c}{se(\hat{\theta})}\right) \text{ when }H_0:\theta\leq c \text{ is true, where }Z\sim N(0,1).\]
| Rejection rule based on p-value (test at \(\alpha\)-level) |
|---|
|