Book Image

Clojure for Data Science

By : Henry Garner
Book Image

Clojure for Data Science

By: Henry Garner

Overview of this book

Table of Contents (18 chapters)
Clojure for Data Science
Credits
About the Author
Acknowledgments
About the Reviewer
www.PacktPub.com
Preface
Index

The standard error of a proportion


It's clear that the proportion of women surviving the Titanic is much greater than the proportion of men. But, as with the dwell time differences we encountered in Chapter 2, Inference, we should ask ourselves whether these differences could have occurred due to chance alone.

We have seen in previous chapters how to construct confidence intervals around statistics based on the sample's standard error. The standard error is based on the sample's variance, but what is the variance of a proportion? No matter how many samples we take, only one proportion will be generated—the proportion in the overall sample.

Clearly a proportion is still subject to some sort of variance. When we flip a fair coin 10 times we would expect to get roughly five heads, but there's it's not impossible we'd get ten heads in a row.

Estimation using bootstrapping

In Chapter 2, Inference, we learned about bootstrapping statistics such as the mean and we saw how bootstrapping can be a useful...