tire story

reference:
- Tintle, et al., ISI, investigation pp. 100-101

observed statistic

x <- 14                # number of successes
n <- 28                # sample size
(p.hat.observed <- x / n)
## [1] 0.5

data

tire <- data.frame(response = c("right front", "other"),
                   p = c(p.hat.observed, 1 - p.hat.observed))
tire
##      response   p
## 1 right front 0.5
## 2       other 0.5
str(tire)
## 'data.frame':    2 obs. of  2 variables:
##  $ response: Factor w/ 2 levels "other","right front": 2 1
##  $ p       : num  0.5 0.5
ggplot(tire, aes(response, p, fill = response)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = c("powderblue", "thistle")) +
  labs(title = "Tire Story")