data(robespierre)
## See graphic in Lafon, 1980 : 140
t <- colSums(robespierre)["D9"]; # size of the part
T <- sum(robespierre); # size of the corpus
f <- rowSums(robespierre)["peuple"]; # total frequency of "peuple"
p <- dhyper(1:15, f, T-f, t)
plot(p, type="h", main="Probabilities of frequencies of 'peuple' in the 'D9' discourse",
xlab="Frequency of 'peuple'", ylab="Prob(k)");
Run the code above in your browser using DataLab