x <- 9 # Anzahl Treffer
n <- 20 # Anzahl Versuche
p <- 0.25 # Wahrscheinlichkeit für einen Treffer
Hypothese <- "greater" # zweiseitig: Hypothese="two.sided"; x ≥ 9: Hypothese="greater"; x ≤ 9: Hypothese="less"
##
## Exact binomial test
##
## data: x and n
## number of successes = 9, number of trials = 20, p-value = 0.04093
## alternative hypothesis: true probability of success is greater than 0.25
## 95 percent confidence interval:
## 0.2586506 1.0000000
## sample estimates:
## probability of success
## 0.45