Hoofdstuk 5, Frequentie berekenen