scissors

reference:
- Tintle, et al., ISI, example 1.2, p. 35

hypotheses

Define \(\pi\).

SOLUTION:

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

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

pi <- 1 / 3      # probability of success  
alpha <- 0.05    # level of significance

observed statistic

x <- 2                # number of successes
n <- 12               # sample size
(p.hat.observed <- x / n)
## [1] 0.1666667

data

scissors <- data.frame(response = c("scissors", "other"),
                       p = c(p.hat.observed, 1 - p.hat.observed))
scissors
##   response         p
## 1 scissors 0.1666667
## 2    other 0.8333333
str(scissors)
## 'data.frame':    2 obs. of  2 variables:
##  $ response: Factor w/ 2 levels "other","scissors": 2 1
##  $ p       : num  0.167 0.833
ggplot(scissors, aes(response, p, fill = response)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = c("seashell", "tomato")) +
  labs(title = "Scissors")