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 ...

Get Clojure for Data Science now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.