I have created a database of lyrics with some 10000 songs and did a word frequency analysis to find the most common words. Next, i sorted the corpus according to the publication date and measured the change of frequency over time for different keywords.

Obviously, for this 2nd analysis the size of each database is significantly smaller and the number songs per year can be quite different. For instance, i see a peak for certain words in the period from 1920-1930, but here i also have less data and the accuracy of the frequency estimate will be lower.

What would be a proper way to address this issue and to calculate the error for a sample of size N? There should be some kind of sqrt(N) dependence i guess..? Can anyone recommend me literature for further reading?