This is a guide to understanding and visualizing several important discrete and continuous distributions in the statistics world. We will use several R packages in the process.
-
stats
(installed by default in RStudio) to retrieve statistical distributions. -
tidyverse
to coerce data frames into tidy format and produce visualizations withggplot
.
I created the book primarily for those that are new to statistics and/or data science and are somewhat familiar with the R language. If you would like a more comprehensive introduction to R, I recommend both of these free and accessible books:
I find it helpful to begin this guide with an overview of the function ggplot, which will be the first chapter. This includes an important conceptual basis for aesthetics, geometries, mappings, and scales. The lessons learned in ggplot chapter will then be applied to the remainder of the book. In each chapter, we will introduce a statistical distribution and use ggplot to better visualize our concepts.
-
Basics of ggplot: Geometries and Aesthetic Mappings, Altering Aesthetics and Scales.
-
Intro to Distribution Theory: Uniform Distribution.
-
Discrete Distributions: Geometric, Binomial, Negative Binomial, Poisson Distributions.
-
From Discrete to Continuous Cases: Normal Approximation and Demoivre's Problem, Normal Distribution.
-
Other Continuous Distributions: Student's t, Exponential, Gamma, Chi-square Distributions.