dogs

reference:
- Tintle, et al., ISI, exploration 1.1, p. 30

hypotheses

Define \(\pi\).

SOLUTION:

\[H_0 : \pi = 0.5\] \[H_a : \pi \not= 0.5\]

State \(\pi\)

pi <- 0.5          # fair coin

observed statistic

x <- 9                # number of successes
n <- 10               # sample size
(p.hat.observed <- x / n)
## [1] 0.9

data

gesture <- data.frame(response = c("correct", "incorrect"),
                      p = c(p.hat.observed, 1 - p.hat.observed))
gesture
##    response   p
## 1   correct 0.9
## 2 incorrect 0.1
str(gesture)
## 'data.frame':    2 obs. of  2 variables:
##  $ response: Factor w/ 2 levels "correct","incorrect": 1 2
##  $ p       : num  0.9 0.1
ggplot(gesture, aes(response, p, fill = response)) +
  geom_bar(stat = "identity") +
  scale_fill_manual(values = c("green", "yellow")) +
  labs(title = "Harley")