This function computes the p-value of a z-score test for frequency
counts, based on the z-score statistic implemented by
z.score
.
z.score.pval(k, n, p = 0.5, correct = TRUE,
alternative = c("two.sided", "less", "greater"))
frequency of a type in the corpus (or an integer vector of frequencies)
number of tokens in the corpus, i.e. sample size (or an integer vector specifying the sizes of different samples)
null hypothesis, giving the assumed proportion of this type in the population (or a vector of proportions for different types and/or different populations)
if TRUE
, apply Yates' continuity correction
(default)
a character string specifying the alternative
hypothesis; must be one of two.sided
(default), less
or greater
The p-value of a \(z\)-score test applied to the given data (or a vector of p-values).