water

reference:
- Tintle, et al., ISI, exploration 1.2, p. 41

hypotheses

Define \(\pi\).

SOLUTION:

\[H_0 : \pi = 1/4\] \[H_a : \pi < 1/4\]

State the values of \(\pi\) and \(\alpha\)

pi <- 0.25        # probability of success
alpha <- 0.05     # level of significance

observed statistic

x <- 3                # number of successes
n <- 27               # sample size
(p.hat.observed <- x / n)
## [1] 0.1111111

data

water <- data.frame(response = c("tap", "other"),
                    p = c(p.hat.observed, 1 - p.hat.observed))
water
##   response         p
## 1      tap 0.1111111
## 2    other 0.8888889
str(water)
## 'data.frame':    2 obs. of  2 variables:
##  $ response: Factor w/ 2 levels "other","tap": 2 1
##  $ p       : num  0.111 0.889
ggplot(water, aes(response, p, fill = response)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = c("aliceblue", "cadetblue")) +
  labs(title = "Water")