Frequency analysis
Counting how often each letter appears in ciphertext and matching the most common ones to common English letters like E, to work out a substitution cipher's key.
Understanding Frequency analysis in ACARA Digital Technologies Years 9–10
What it does: This code finds the ciphertext letter with the highest count and guesses that it stands for E. Frequency analysis counts letters. The most common ciphertext letters are matched to common English letters. A substitution cipher swaps letters but keeps the pattern. A common letter stays common after encryption. Only A and I are common one-letter English words. Guessing short words helps confirm the key.
Common mistakes: The string is missing its closing quote. It should be cipher = "KHOOR ZRUOG" so the ciphertext can be counted. Frequency analysis needs the MOST common ciphertext letter to match with E. The method is most_common(1). There is no least_common method.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 860–875) and word search (Modules 860–944).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
frequency analysisFill in the Blanks
Spot the Error
Student with a class code? Join your class →