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

Confidence intervals


Having established that there certainly is a correlation in the wider population, we might want to quantify the range of values we expect to lie within by calculating a confidence interval. As in the previous chapter with the mean, the confidence interval of r expresses the probability (expressed as a percentage) that the population parameter lies between two specific values.

However, a complication arises when trying to calculate the standard error of the correlation coefficient that didn't exist for the mean. Because the absolute value of r cannot exceed 1, the distribution of possible samples of r is skewed as r approaches the limit of its range.

The previous graph shows the negatively skewed distribution of r samples for a of 0.6.

Fortunately, a transformation called the Fisher z-transformation will stabilize the variance of r throughout its range. This is analogous to how our weight data became normally distributed when we took the logarithm.

The equation for the...