lacunary - Mathnotes

Confidence Intervals

Definition: Confidence Interval \@{confidence-interval}

A confidence interval tells us how likely it is that a population parameter falls within a specified range, based on a statistic calculated from a sample of data. This interval provides a range of values that, with a certain level of confidence (usually expressed as a percentage like 95% or 99%), is believed to encompass the true parameter value. The width of the interval gives an idea of the precision of our estimate, with narrower intervals representing more precise estimates.

To say that the range of values has a certain level of confidence means that if we were to repeat the experiment or sampling process many times (theoretically an infinite number of times), the true population parameter would fall within that interval in the stated percentage of all trials. For example, a 95% confidence level means that 95 out of 100 such confidence intervals would contain the true population parameter (which is unknown).

If you were to repeat the sampling process an infinite number of times, each time calculating a new 95% confidence interval using the same method, about 95% of these intervals would contain the true population parameter. Each interval is calculated from a different sample and might be different in range, but the method of calculation ensures that 95% of these intervals will capture the true parameter value.

Theorem: Confidence Interval for a Mean, Known Variance \@{ci-mean-known-variance}

If x¯ is the mean of a random sample of size n from a population with a known variance σ2, a 100(1α)% confidence interval for μ is given by

x¯zα/2σn<μ<x¯+zα/2σn.

Theorem: Sample Size for Estimating a Mean \@{sample-size-mean}

If x¯ is used as an estimate of μ, we can be 100(1α)% confident that the error will not exceed a specified amount e when the sample size is

n=(zα/2σe)2.

For example, if we wish to find the sample size required for 90% confidence, we need to know the z-value where 0.05 of the area under the curve is to the right, so 0.95 of the area under the curve is to the left - that is za/2. Then if we know σ and e we can compute n.

Theorem: Confidence Interval for a Mean, Unknown Variance \@{ci-mean-unknown-variance}

If x¯ is the mean of a random sample of size n from a population with an unknown variance, and the standard deviation of the sample is s, a 100(1α)% confidence interval for μ is given by

x¯tα/2sn<μ<x¯+tα/2sn.

This uses the Student t-distribution.

Large-Sample Confidence Intervals for p

If p^ is the proportion of successes in a random sample of size n and q^=1p^, an approximate 100(1α)% confidence interval for the binomial parameter p is given by

p^zα/2p^q^n<p<p^+zα/2p^q^n.

Note \@{ci-proportion-note}

When n is small and the unknown proportion p is believed to be close to 0 or 1, this approach doesn't work well and shouldn't be used. This approach should only be used when both np^ and nq^ are greater than or equal to 5.

Theorem: Sample Size for Estimating a Proportion \@{sample-size-proportion}

If p^ is used as an estimate of p, we can be 100(1α)% confident that the error will be less than a specified amount e when the sample size is approximately

n=zα/22p^q^e2.

Theorem: Conservative Sample Size for Estimating a Proportion \@{sample-size-proportion-conservative}

If p^ is used as an estimate of p, we can be at least 100(1α)% confident that the error will not exceed a specified amount e when the sample size is

TODO: the sample-size formula is missing from the source; complete this statement.