Hypothesis testing: test difference in frequencies I have sampled some data, and want to argue that one class of events is more common that another class of events. To get concrete, let's use an example involving text. Suppose I sample some English documents. I want to argue that, in the broader population of English texts, that the letter 'e' occurs at a different rate than the letter 'a'.
Right now I'm using the Fisher exact test, with a contingency over the letter frequencies:
     a   ~a
  e  0   n1
 ~e n2   n3

Where n1 + n2 + n3 = N (the number of letters in the document)
Does this make sense? I feel like I'm missing something obvious. However, observations come from the same sample. It's not clear to me what constitutes "between groups" in this scenario.
 A: I am not sure I understand your question or the use of contingency tables, but we can refine the answer together, or it can just give you some ideas.
To rephrase, what I think you are asking is along the lines of: Suppose that we know the relative frequency of occurrence of certain letters (let's take vowels) in the English literature at large. We now examine some documents, and we want to see if the counts of these vowels is consistent with the expected frequencies.
Let's simulate some data:
               a      e     i      o      u
English     0.34   0.12  0.24   0.11   0.19
documents 256.00 344.00 63.00 223.00 337.00

The idea is to run a GoF (goodness-of-fit) test to see if the data conforms to the expected frequencies. And we would do this with a $\chi^2$ test. The degrees of freedom are the number of cells minus $1$.
In R we'd run the following command: 
chisq.test(p = English, documents)

    Chi-squared test for given probabilities

data:  documents
X-squared = 612.844, df = 4, p-value < 2.2e-16

The squared difference is far too large for the proportion of vowels in your documents to be consistent with the expected proportion in the English literature at large. Perhaps it is because of a very specific linguistic register your documents come from, or because they are very old documents, etc.
