class: center, middle, inverse, title-slide # 6.1-6.3 Inference About a Single Proportion ### E. Nordmoe ### Math 260 --- # Outline * Standard Error * Sampling Distribution * Confidence Interval * Sample Size for Desired Margin of Error * Hypothesis Test --- ## Standard Error for Sample Proportions * For random samples of size `\(n\)` from a population with proportion `\(p\)`, the **standard error of the sample proportion** `\(\hat p\)` is $$ SE=\sqrt{\frac{p(1-p)}{n}} $$ * The larger the sample size `\(n\)`, the smaller the SE. --- # The Central Limit Theorem for Proportions * If `\(n\)` is sufficently large, $$ \hat p \sim N\left(p,\sqrt{\frac{p(1-p)}{n}}\right) $$ * A normal distribution is a good approximation as long as + `\(np\ge 10\)` **and** + `\(n(1-p)\ge 10\)` --- # Confidence Interval for a Single Proportion A confidence interval for a popoulation proportion `\(p\)` can be computed using $$ \hat p \pm z^* \sqrt{\frac{\hat p(1-\hat p)}{n}} $$ if `\(n\)` is large enough so that * `\(n\hat p\ge 10\)` and * `\(n (1-\hat p)\ge 10\)` --- # Sample Size for a Desired Margin of Error To estimate a population proportion to within a desired margin of error, `\(\text{ME}\)` with a given level of confidence, choose `\(n\)` such that $$ n=\left(\frac{z^*}{\text{ME}}\right)^2 \tilde p (1-\tilde p) $$ where `\(\tilde p\)` is either * A guessed value for `\(p\)` (if one is available) OR -- * `\(\tilde p=0.5\)` if no other guess is available **Note:** Setting `\(\tilde p=0.5\)` will ensure that `\(n\)` is large enough no matter what `\(p\)` turns out to be. --- # Hypothesis Testing for a Single Proportion To test `\(H_0:p=p_0\)`, we use the standardized test statistic $$ z=\frac{\hat p-p_0}{\sqrt{\frac{p_0(1-p_0)}{n}}} $$ where `\(\hat p\)` is the proportion in a random sample of size `\(n\)`. * Check sample size conditions: + `\(np_0\ge 10\)` + `\(n(1-p_0)\ge 10\)` --- ## Computing the P-value * The appropriate `\(p\)`-value depends on the alternative hypothesis: | Alternate Hypothesis | `\(p\)`-value | |:--------------------: |:------------------------: | | `\(H_a: p>p_0\)` | `\(P(Z\ge z)\)` | | `\(H_a: p < p_0\)` | `\(P(Z\le z)\)` | | `\(H_a:p\neq p_0\)` | `\(2P(Z\ge z)\)` if `\(z\ge 0\)` | | `\(H_a:p\neq p_0\)` | `\(2P(Z\le z)\)` if `\(z<0\)` |