Proportion Estimation: Difference between revisions
No edit summary Tag: Manual revert |
No edit summary |
||
| Line 21: | Line 21: | ||
SE = \sqrt{\frac{\hat{p} (1 - \hat{p})}{n}} | SE = \sqrt{\frac{\hat{p} (1 - \hat{p})}{n}} | ||
</math> | </math> | ||
= Assumptions = | |||
We assume that | |||
* A random sample was taken | |||
* <math>y \geq 5</math> and <math>n - y \geq 5</math> | |||
** rooted in normal approximation of binomial | |||
= Wilson-Adjusted CI for p = | = Wilson-Adjusted CI for p = | ||
| Line 28: | Line 36: | ||
<math> | <math> | ||
\widetilde{p} | \widetilde{p} = \frac{y + 2}{n + 4} | ||
</math> | </math> | ||
with standard error | |||
<math> | |||
SE(\widetilde{p}) = \sqrt{\frac{\widetilde{p} (1 - \widetilde{p})}{n + 4}} | |||
</math> | |||
Remember that the confidence interval is ca | |||
<math>\widetilde{p}</math> is slightly skewed towards <math>0.5</math>, | |||
but results in better CIs for <math>p</math>. I don't know why. | |||
= Confidence Interval = | |||
We use ''normal distribution'' since <math>p</math> is bounded between | |||
0 and 1, and we don't have extra error from extra parameters such as | |||
multiple sample mean. | |||
Remember that the confidence interval is just mean plus-or-minus error | |||
margin, and the error margin is just the z score multiplied by standard | |||
error (since we are using normal distribution). | |||
Notaby, it is possible to have a bound ''above 1 or below 0''. This | |||
usually happens when the point estimate is close to 0 or 1. In this | |||
case, instead of listing the impossible bounds, we report that they have | |||
been cut off. | |||
[[Category:Sample Statistics]] | [[Category:Sample Statistics]] | ||
Revision as of 02:32, 16 March 2024
Proportion estimation is another common task for sample statistics.
We have sample proportion
where Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y} is the number of subjects in the sample with a particular trait, and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle n} is the sample size.
We have
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mu_\hat{p} = p, \sigma_\hat{p} = \sqrt{\frac{p (1 - p)}{n}} }
and standard error
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle SE = \sqrt{\frac{\hat{p} (1 - \hat{p})}{n}} }
Assumptions
We assume that
- A random sample was taken
- Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle y \geq 5}
and Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle n - y \geq 5}
- rooted in normal approximation of binomial
Wilson-Adjusted CI for p
Correcting the sample proportion narrows the confidence interval. We do this with the Wilson-Adjusted estimate for Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p}
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \widetilde{p} = \frac{y + 2}{n + 4} }
with standard error
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle SE(\widetilde{p}) = \sqrt{\frac{\widetilde{p} (1 - \widetilde{p})}{n + 4}} }
Remember that the confidence interval is ca
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \widetilde{p}} is slightly skewed towards Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 0.5} , but results in better CIs for Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p} . I don't know why.
Confidence Interval
We use normal distribution since Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle p} is bounded between 0 and 1, and we don't have extra error from extra parameters such as multiple sample mean.
Remember that the confidence interval is just mean plus-or-minus error margin, and the error margin is just the z score multiplied by standard error (since we are using normal distribution).
Notaby, it is possible to have a bound above 1 or below 0. This usually happens when the point estimate is close to 0 or 1. In this case, instead of listing the impossible bounds, we report that they have been cut off.
