options(scipen=999)
options(digits=9)
cat("\014") # clear screen
rm(list=ls(all=TRUE))

n=25
p0=0.9
x=24
if(x<n*p0) one_tailed_sig=pbinom(x,n,p0)
if(x>n*p0) one_tailed_sig=1-pbinom(x-1,n,p0)
one_tailed_sig


library(TeachingDemos)
binom.test(x=24,n=25,p=0.9,alternative="greater")

