# z-test for H0: pi = 0.15 with observed counts 10..30 in a sample of n=100 tokens
k <- c(10:30)
z <- z.score(k, 100, p=.15)
names(z) <- k
round(z, 3)
abs(z) >= 1.96 # significant results at p < .05
Run the code above in your browser using DataLab