geyser

references:
- ISI, example 6.1, p.324

library(tidyverse)
library(knitr)

data

geyser <- read.csv("OldFaithful.csv")
str(geyser)
## 'data.frame':    203 obs. of  2 variables:
##  $ year: Factor w/ 2 levels "y1978","y2003": 1 1 1 1 1 1 1 1 1 1 ...
##  $ time: int  78 74 68 76 80 84 50 93 55 76 ...
tbl <- geyser %>%
  group_by(year) %>%
  summarize(mean = mean(time),
            s = sd(time),
            n = n())
kable(tbl)
year mean s n
y1978 71.07407 12.928779 108
y2003 91.18947 8.463055 95

dot plots

ggplot(geyser, aes(time)) +
  geom_dotplot(fill = "darkred", dotsize = 0.4) +
  facet_grid(year ~ .) +
  labs(title = "Old Faithful")