# Battery lifetime exercise


Find this notebook on the web at
<a class="quarto-xref" href="https://resampling-stats.github.io/edition-3-r/confidence_2.html#nte-battery_lifetime_exercise">Note <span>27.2</span></a>.

A sample of 20 batteries is tested, and the average lifetime is 28.85
months. Establish a 95 percent confidence interval for the true average
value. The sample values (lifetimes in months) are listed below.

```{r}
lifetimes <- c(30, 32, 31, 28, 31, 29, 29, 24, 30, 31,
               28, 28, 32, 31, 24, 23, 31, 27, 27, 31)

message('Mean is: ', mean(lifetimes))
```
