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


p0=0.1
alpha=0.05
n=100
x=5
pcap=x/n;pcap
standard_error=sqrt((p0*(1-p0))/n)
standard_error
z_compute=(pcap-p0)/standard_error;z_compute
one_tailed_sig=1-pnorm(abs(z_compute),0,1);one_tailed_sig
two_tailed_sig=2*one_tailed_sig;two_tailed_sig
z_critical=qnorm(1-alpha,0,1);z_critical



library("TeachingDemos")
prop.test(x=5,n=100,p=0.1,correct=FALSE)

