Chapter 5 Confidence Interval and Hypothesis Testing (Section on Feb 24th)
Sampling Distribution
Exercise 5.1 The ages for a random sample of 25 individuals are recorded. If the age of each individual follows a normal distribution with \(\mu = 25.36, \sigma = 2.6\). Find the following:
Find \(P(\bar{X}\leq 26.3)\)
Find \(P(\bar{X}\geq 22.3)\)
Find \(P(21.2 \leq \bar{X} \leq 26.3)\)
Proof. Transfer to Standard Normal Random Variable \(\rightarrow\) Refer to a distribution Table or Calculator
In gereral, if the samples are from a normal distribution with mean \(\mu\) and variance \(\sigma^2\), then the sample mean \(\bar{X}\) follows a noraml distribution with mean \(\mu\) and variance \(\frac{\sigma^2}{n}\).
In this case, \(\bar{X}\sim N(25.36,\frac{2.6^2}{25})\). The satndard deviation is then \(\sqrt{\frac{2.6^2}{25}}=\frac{2.6}{5}\) (a) \[\begin{equation} P(\bar{X}\leq 26.3) = P(Z\leq \frac{26.3-25.36}{2.6/5}) = P(Z\leq 1.81) \approx 0.9649 \tag{5.1} \end{equation}\]
\[\begin{equation} \begin{split} P(\bar{X}\geq 22.3) &= P(Z\geq \frac{22.3-25.36}{2.6/5}) = P(Z\geq -5.8846)\\ &=1-P(Z\leq -5.8846)\approx 0.9999 \end{split} (\#eq:05002) \end{equation}\]
\[\begin{equation} \begin{split} P(21.2 \leq \bar{X} \leq 26.3) &= P(\bar{X}\leq 26.3) - P(\bar{X}\leq 21.2)\\ &=P(Z\leq 1.81) - P(Z\leq \frac{21.2-25.36}{2.6/5})\\ &=P(Z\leq 1.81) - P(Z\leq -8)\\ &=0.9649 - 0.0001\approx 0.9648 \end{split} (\#eq:05003) \end{equation}\]
Reference: Standard Normal Distribution Table
Confidence Interval
- What is a confidence interval?
An estimate of plausible values for the population parameter based on data.
- Will the true parameter always be within the interval?
Not necessarily.
- What is the point estimate?
Sample Statistics.
- How do you calculate the margin of error?
Critical Value multiplied by the Standard Error.
Critical value is usually Z-score (when knowing variance or sample size is larger) or T-score (when variance is unknown). More information is available here.
Hypothesis Testing
State the 4 steps within hypothesis testing discussed in class.
- State Null and Alternative Hypotheses.
- State significance level and Determine Critical Value.
- Perform Statistical Test.
- State Conclusion.
Proof. 1. State Null and Alternative Hypotheses: \(H_0:\mu=5.4\) vs \(H_1: \mu<5.4\).
State significance level and Determine critical value: \(\alpha=0.01\), \(CV=|-2.33|=2.33\).
Perform Statistical Test: \(TS=|\frac{5.23-5.4}{0.54/\sqrt{50}}|=|-2.226|=2.226\). \(|TS|<CV\), therefore we fail to reject \(H_0\).
State Conclusion
Sample Size \(n = 50\)
The population mean is equal to 5.4
One Sample Hypothesis Test (Mean)
Fail to reject that the population mean is equal to 5.4
Type-I error: rejection of a true null hypothesis
Type-II error: failure to reject a false null hypothesis
Proof. 1. State Null and Alternative Hypotheses: \(H_0:p=0.75\) vs \(H_1: p\neq 0.75\).
State significance level and Determine critical value: \(\alpha=0.01\), \(CV=|-2.57|=2.57\).
Perform Statistical Test: \(TS=|\frac{0.7906-0.75}{\sqrt{(0.75\times 0.25)/745}}|=|2.5591|=2.5591\). \(|TS|<CV\), therefore we fail to reject \(H_0\).
Here sample proportion \(\hat{p}=\frac{589}{745}=0.7906\) and variance \(\frac{0.75\times 0.25}{745}\).
State Conclusion
Sample Size \(n = 745\)
\(75\%\) of adults say that it is morally wrong
One Sample Hypothesis Test (Proportion)
Fail to reject that \(75\%\) of adults say that it is morally wrong
There maybe Type-II error.