From data to an estimate

Section of Estimation examples, part of Data analysis

From data to an estimate

Type Section
Taught in Estimation examples
Part Data analysis

Example 1 (A biased coin) A coin is tossed 1000 times and shows 570 heads.

Question. Estimate the probability of heads, and say whether p=0.5 is plausible.

Solution. Model the count as X\sim\operatorname{Bin}(1000,p) with p unknown. The probability p will never be known; the data give an estimate, \widehat p=570/1000=0.570. Its standard error is \sqrt{0.57\times0.43/1000}=0.0157, and the approximate 95% interval is

0.570\pm1.96\times0.0157=(0.539,\ 0.601).

R’s exact binomial interval agrees to three decimal places:

binom.test(570, 1000)$conf.int     # 0.5386 0.6009

The interval excludes 0.5, so a fair coin is not a plausible explanation of 570 heads.

Example 2 (Ten normal measurements) Ten measurements, modelled as a \operatorname{N}(\mu,\sigma^2) sample, are

77.01,\ 71.37,\ 77.15,\ 79.89,\ 76.46,\ 78.10,\ 77.18,\ 74.08,\ 75.88,\ 72.63.

Question. Estimate \mu and \sigma, and give a 95% interval for \mu.

Solution.

x <- c(77.01, 71.37, 77.15, 79.89, 76.46, 78.10, 77.18, 74.08, 75.88, 72.63)
mean(x); sd(x)              # 75.975  2.581
t.test(x)$conf.int          # 74.13  77.82

The estimates are \widehat\mu=\overline x=75.975 and s=2.58. The t interval uses t_{9;0.975}=2.262: 75.975\pm2.262\times2.58/\sqrt{10}=(74.13,\ 77.82). With only ten values the t quantile matters; the normal quantile 1.96 would give an interval about 13% too short.

Used in

See also

Margin of error · Welch interval · Large-sample intervals · Small normal samples · Two samples with unequal variances · Intervals for proportions · Wilcoxon rank-sum test

Glossary and index