VIEW THIS AS

Auto mode follows the Route Engine until you choose a viewpoint.

YOU ARE HERE

ROUTE CHECK

CONNECTED TO

WHAT NEXT

Use the canonical route for this room, or HELP if you are unsure.

Vocabulary | What Is Moving-Average Type–Token Ratio? How MATTR Measures Lexical Diversity

Student in a blue pinafore smiles while holding a Geography textbook in a bright corridor.

Moving-average type–token ratio (MATTR) is a measure of lexical diversity calculated by moving a fixed-length window along a text, counting the proportion of distinct word types in each complete window and averaging those local ratios. It addresses an important limitation of the simple whole-text type–token ratio: longer texts typically repeat words, making direct comparisons across lengths difficult.

Why is MATTR useful? Because a student’s essay, a Science report and a short story can repeat words for very different reasons. A high number of distinct words is not necessarily better writing; a repeated technical term may be exactly right. MATTR makes the counting procedure more consistent across passages under a fixed window, but the reader must still decide whether the words express ideas precisely and suit their audience.

This guide explains what MATTR is, how to calculate it step by step, how window size changes the result, how it differs from ordinary TTR, MSTTR and MTLD, and what it can and cannot say about student ability. The original worked example uses eight tokens and a four-token window; the methods are grounded in Covington and McFall’s 2010 research and subsequent lexical-diversity evaluations.

Editorial note: The classroom data and score below are original teaching examples. No learning outcome, real-student performance statistic or universal measure of writing quality is fabricated.

Contents: vocabulary variety without misleading length comparisons

Open 46 chapters, computations and practical uses
  1. 1. Start with the problem of text length
  2. 2. A type is not the same as a token
  3. 3. Why whole-text TTR is awkward for comparisons
  4. 4. What moving average means here
  5. 5. The original Covington and McFall proposal
  6. 6. The fixed window length is a key parameter
  7. 7. A complete toy text with eight tokens
  8. 8. Window one: positions 1 through 4
  9. 9. Window two: positions 2 through 5
  10. 10. Window three: positions 3 through 6
  11. 11. Window four: positions 4 through 7
  12. 12. Window five: positions 5 through 8
  13. 13. Compute the moving average
  14. 14. MATTR does not count novel words in the full text
  15. 15. What happens if window size equals the full text
  16. 16. A window longer than the text needs a decision
  17. 17. A fixed window reduces but cannot remove all concerns
  18. 18. Different genres serve different purposes
  19. 19. Repetition can strengthen clarity
  20. 20. An uncommon word does not automatically improve a score
  21. 21. A misspelling can inflate diversity
  22. 22. Case normalisation changes the types
  23. 23. A surface form differs from a lemma
  24. 24. Names and technical notation affect the result
  25. 25. Tokenisation determines the denominator
  26. 26. A score can change when text order changes
  27. 27. Window length controls the kind of pattern seen
  28. 28. MATTR differs from mean segmental TTR
  29. 29. MATTR differs from MTLD
  30. 30. MATTR differs from vocd-D
  31. 31. What can a MATTR graph show within one essay
  32. 32. A paragraph boundary is not necessarily a window boundary
  33. 33. How to compare two texts responsibly
  34. 34. A useful classroom paper exercise
  35. 35. Primary English: focus on meaning before metrics
  36. 36. Secondary English: an essay revision test
  37. 37. Science: consistent vocabulary is a strength
  38. 38. Mathematics: moving windows are an algorithm
  39. 39. History: period spelling changes the curve
  40. 40. General Paper: quality is in the reasoning
  41. 41. Translation: different languages require different segmentation
  42. 42. AI writing and score gaming
  43. 43. Student privacy in text analysis
  44. 44. A reproducibility checklist
  45. 45. The difference between exposure and mastery
  46. 46. The final lesson: what does the number really mean?

An original sliding-window calculation

Tokens: we read we learn we read new books. We treat lowercase space-separated forms as tokens and types, and choose a four-token window. This eight-token text produces five complete windows.

Window positionsActual four-token windowDistinct typesLocal TTR
1–4we read we learn30.75
2–5read we learn we30.75
3–6we learn we read30.75
4–7learn we read new41.00
5–8we read new books41.00

MATTR = (0.75 + 0.75 + 0.75 + 1.00 + 1.00) / 5 = 0.85. The whole-text type–token ratio is 5/8 = 0.625. The difference is expected because the two methods answer different questions. No inference about the skill of a real student should be drawn from this fictional sentence.

1. Start with the problem of text length

A moving-average type–token ratio (MATTR) measures lexical diversity by calculating the proportion of distinct word types in many successive fixed-length windows, then averaging those proportions. It was presented by Covington and McFall in a 2010 paper as an alternative to relying on the type–token ratio of an entire text.

The motivation is simple: a long text typically repeats words that have already appeared. As length increases, the overall type–token ratio can decline even when the writing remains clear and varied. MATTR compares windows of a chosen size to reduce one important form of length dependence, not to give an automatic grade for every writer.

Return to contents

2. A type is not the same as a token

A token is one occurrence of a word-like unit under stated segmentation rules. A type is a distinct item under a stated normalisation rule. In read read learn, there are three tokens and two types if identical lowercase spellings are grouped.

The ratio of unique types to total tokens in that tiny sequence is 2/3. That tells us about repetition in the sample, not whether its writer understands reading or learning. All lexical-diversity measures inherit this distinction between observed strings and usable knowledge.

Return to contents

3. Why whole-text TTR is awkward for comparisons

The simplest type–token ratio divides the number of distinct types by running tokens for an entire text. The result is strongly affected by length, because the longer sample contains more opportunities for familiar words to recur.

Consider a short letter and a long report. If the report repeats necessary technical terms across many paragraphs, its overall TTR may be lower even though the author has greater subject expertise. The metric can mislead when length and genre are not controlled.

Return to contents

4. What moving average means here

A window of fixed length starts at the beginning of a token sequence. The algorithm calculates TTR for that window, moves it forward by one token and calculates again. This continues through every complete window of the chosen length.

Finally, the local ratios are averaged. The word moving refers to the window sliding along the text; it is not a claim that the student’s vocabulary knowledge changes at every moment. The algorithm examines text as data.

Return to contents

5. The original Covington and McFall proposal

Covington and McFall’s 2010 article, published in the Journal of Quantitative Linguistics, describes a moving-window approach to measuring lexical diversity and its practical advantages over a single whole-text TTR.

That scholarly origin matters because terminology should not be invented or used loosely. A program claiming to calculate MATTR should specify its tokenisation, window length and averaging method. Readers can then check whether it follows the published idea.

Return to contents

6. The fixed window length is a key parameter

A MATTR analysis must choose a window size, commonly expressed in tokens. Every complete window contains the same number of running token positions, making its local TTR comparable under that scheme.

Changing the window size changes what is being measured. A short window captures local repetition and may have many ties; a larger window reflects variation across more material. Researchers should not compare MATTR values calculated with different sizes as though they were identical measurements.

Return to contents

7. A complete toy text with eight tokens

Our invented teaching sequence is we read we learn we read new books. With lowercase space-delimited tokens, it contains eight tokens and five types. We choose a four-token moving window solely to keep the arithmetic visible.

The complete windows begin at positions one, two, three, four and five. Each contains four tokens and shifts one position right. The last window ends with books; no partial window is needed in this example.

Return to contents

8. Window one: positions 1 through 4

The first sequence is we read we learn. It contains four tokens, but we appears twice. Its distinct types are we, read and learn.

The local type–token ratio is 3/4, or 0.75. It is important not to count the repeated we as a new type. A teacher can show the same calculation with coloured word cards before introducing a computer.

Return to contents

9. Window two: positions 2 through 5

The second sequence is read we learn we. This window again contains four tokens and the three distinct types read, we and learn.

Its ratio is also 0.75. The repeated local result does not imply the entire essay is unvaried. It describes only what occurred in this four-token span under our toy counting convention.

Return to contents

10. Window three: positions 3 through 6

The third sequence is we learn we read. Again the distinct types are we, learn and read, so the local ratio is 0.75.

The original sequence contains recurring words in several positions. Sliding the window lets us observe whether the local mixture of repeats and new forms changes. The average will summarise these local views.

Return to contents

11. Window four: positions 4 through 7

The fourth sequence is learn we read new. All four forms are distinct within that four-token window.

Its local TTR is 4/4 = 1.00. That does not mean the four words are sophisticated or that the writer has perfect vocabulary. It simply means there are no repetitions inside this particular window.

Return to contents

12. Window five: positions 5 through 8

The fifth sequence is we read new books. The four words are again all distinct within the window, so its local ratio is 1.00.

This final window demonstrates a subtle point: a word like we appeared earlier in the full text, but a moving window counts types locally. It is still one distinct type inside the current four-token segment. MATTR does not count ‘new to the entire passage’ in the same way as a cumulative vocabulary growth curve.

Return to contents

13. Compute the moving average

The five local ratios are 0.75, 0.75, 0.75, 1.00 and 1.00. Add them to obtain 4.25, then divide by five windows. The toy MATTR is 0.85 for a window length of four tokens.

The full-text TTR is five types divided by eight tokens, or 0.625. The two numbers answer different counting questions and need not match. The example is made up for instruction; it is not a result from any population of students.

Return to contents

14. MATTR does not count novel words in the full text

Students can confuse MATTR with the cumulative type count in a vocabulary growth curve. In MATTR, the distinct-type calculation restarts within each moving window. A form that occurred earlier may still count as one of the types in a later window.

A cumulative growth curve would instead ask whether each token introduces a type not previously seen in the whole sequence. Both measurements are useful, but their axes, aggregation methods and interpretations differ.

Return to contents

15. What happens if window size equals the full text

For a text exactly as long as the chosen window, there is only one complete window. Its local TTR is simply the whole-text TTR, so the moving-average idea offers no additional local view.

For robust comparison, texts must be long enough to support the selected window size and a useful number of windows. A tool may reject shorter texts or apply its own explicit policy; do not silently invent a value.

Return to contents

16. A window longer than the text needs a decision

If a passage contains fewer tokens than the requested window, the standard complete-window procedure cannot calculate even one value. Software may raise an error, return a missing value or apply a special short-text convention.

A researcher should report which approach was used. Replacing the window with the entire text for short passages changes the metric and can undermine comparability. In educational reporting, it may be better to say the material is too short for that setting.

Return to contents

17. A fixed window reduces but cannot remove all concerns

Using the same local span length can reduce the strong dependence on full text length seen with simple TTR. However, MATTR can still vary with window choice, text subject, sampling, segmentation and linguistic differences.

Research on lexical-diversity indices has examined their length effects and the validity of score interpretation. A careful writer should say that MATTR addresses an important measurement problem rather than claiming it produces a perfectly unbiased or universally superior measure.

Return to contents

18. Different genres serve different purposes

A scientific report may repeat the same precise term because consistent reference is necessary. A story may contain dialogue with repeated pronouns, while descriptive narration introduces varied nouns and adjectives.

A MATTR score from those texts can differ for legitimate stylistic reasons. Comparing genres without explaining their purposes can make a useful descriptive measure look like a judgment of writing skill. The text’s communicative job comes first.

Return to contents

19. Repetition can strengthen clarity

A public notice may deliberately repeat an official term instead of switching among near-synonyms. A Mathematics solution repeats variables and defined expressions to maintain exactness. A lower local diversity score is not necessarily a problem in either case.

Tutors should evaluate whether repeated words help the reader track ideas. A mechanical instruction to replace repetition can introduce ambiguity. Vocabulary quality concerns accuracy and reader understanding, not the highest possible local type ratio.

Return to contents

20. An uncommon word does not automatically improve a score

Inserting a new unusual adjective into every sentence could increase the number of distinct types in some windows. But if those adjectives are inappropriate, the writing becomes worse despite a change in the metric.

A good revision should preserve the student’s intended meaning, grammar and tone. If the learner cannot explain a substitute word accurately, its novelty is not an educational success. MATTR cannot replace contextual assessment.

Return to contents

21. A misspelling can inflate diversity

A spelling error creates a different visible token from the correct form. If the same word is misspelled in several ways, a naive type counter can treat the errors as distinct items.

A MATTR comparison of student writing should state how spelling and transcription problems were handled. Correcting text may be justified for a specified question, but the original should remain available under appropriate permissions and every correction should be documented.

Return to contents

22. Case normalisation changes the types

A case-sensitive method may treat The and the as distinct types; lowercasing merges them. But lowercasing can also combine a name like May with a modal verb may.

Choose the rule based on the research question. The same preprocessing decision should be applied consistently across compared texts unless the effect of case itself is under study. Numbers without a type definition are difficult to interpret.

Return to contents

23. A surface form differs from a lemma

A surface-form MATTR may count run, runs, ran and running as different types. A lemma-based version may group them, if the annotations are suitable. These represent different constructs.

Students can benefit from both views. Surface forms matter for spelling and inflection; lemmas matter for base vocabulary families. The educational claim must specify which one was measured instead of presenting an unqualified ‘vocabulary score’.

Return to contents

24. Names and technical notation affect the result

Proper names, scientific symbols, numbers and abbreviations can introduce distinct forms. In a History passage, many names may raise local diversity without demonstrating richer general academic vocabulary.

Researchers may report separate analyses with and without selected categories, but the choice must be transparent. A Mathematics solution containing symbols should not be penalised by a metric designed for ordinary prose.

Return to contents

25. Tokenisation determines the denominator

Different tokenisers split punctuation, contractions, hyphenated forms and URLs differently. MATTR works on the resulting token sequence, so the same visible text can yield different values when segmentation changes.

A reproducible analysis names the tokenizer and settings. A word processor’s word count is not automatically equivalent to an NLP tokenizer’s units, and a language-model token count is not the same as an ordinary word-token count.

Return to contents

26. A score can change when text order changes

Because MATTR uses local windows, rearranging the same tokens can change which types appear together. The overall multiset of word forms may remain the same while local repetition patterns differ.

That sensitivity can be informative about discourse structure, but it also means MATTR is not merely a function of global counts. If researchers compare shuffled and original text, they should document the design and avoid inferring comprehension from the shift.

Return to contents

27. Window length controls the kind of pattern seen

A very short window may produce many ratios near one because few words repeat inside such a short span. A longer window can reveal repetition over broader stretches but may be unsuitable for short essays.

There is no universal window size that fits all text lengths, genres and languages. A sound study chooses and reports a size that is meaningful for the materials and uses a consistent value for comparisons.

Return to contents

28. MATTR differs from mean segmental TTR

Mean segmental type–token ratio (MSTTR) divides text into usually non-overlapping segments and averages their TTRs. MATTR uses overlapping windows that advance by one token in the typical formulation.

Both try to reduce some limitations of one whole-text TTR, but they use different sampling of local spans. The number of windows, treatment of residual tokens and variance can differ. Do not report an MSTTR as MATTR merely because both are averages.

Return to contents

29. MATTR differs from MTLD

The Measure of Textual Lexical Diversity (MTLD) follows a different algorithm involving sequential segments and a type–token ratio threshold. It is not a moving average of every equal-sized window.

Libraries such as LexicalRichness document these measures separately. Students do not need to master every algorithm to understand that lexical diversity has multiple operational definitions. A published comparison should name the chosen measure.

Return to contents

30. MATTR differs from vocd-D

The vocd-D family uses sampled type–token behaviour and a fitting procedure rather than the same fixed moving-window average. It is intended to address certain length-related concerns through another statistical design.

The existence of multiple indices does not mean any one is meaningless. It shows why lexical diversity is a construct that researchers measure indirectly. A good choice depends on text length, sample properties, interpretability and the question.

Return to contents

31. What can a MATTR graph show within one essay

A researcher could compute local TTR values as the fixed window advances, displaying where repetition or lexical variation changes across the text. A cluster of repeated terms might coincide with a technical explanation or recurring topic.

The graph can point to a passage worth reviewing. It cannot by itself say that the passage is dull, that the author forgot words or that the content is scientifically correct. The sentence context provides the interpretation.

Return to contents

32. A paragraph boundary is not necessarily a window boundary

Ordinary moving windows cross whatever paragraph boundaries fall inside their token spans unless a tool explicitly restricts them. This means a local value may include the end of one paragraph and start of another.

If the research question concerns paragraph structure, an alternative segmentation may be useful. The researcher must avoid describing a window as ‘one paragraph’ when it actually spans several. Technical definitions matter because they control the evidence.

Return to contents

33. How to compare two texts responsibly

Use the same preprocessing rules, window size and clear inclusion criteria. Record each text’s token length, genre and source. If one is shorter than the window, explain the exclusion or revised design.

Do not announce that the text with the higher MATTR is automatically better English. Compare the writers’ purposes and examine actual word choices. The statistic can support a descriptive finding while other evidence determines instructional quality.

Return to contents

34. A useful classroom paper exercise

Prepare eight word cards with the invented sequence we read we learn we read new books. Place a four-card frame over the first four and record its types. Slide the frame one card at a time.

Ask students to calculate each 3/4 or 4/4 result and then the average 0.85. The exercise reveals why repeating a form affects some windows but not others. It teaches how the tool works before students are asked to interpret it.

Return to contents

35. Primary English: focus on meaning before metrics

Younger pupils generally benefit more from choosing precise words in stories and explanations than from receiving a numerical lexical-diversity score. The teacher can still use a short paper exercise to demonstrate repetition and variation.

After the calculation, ask pupils to revise a sentence for clarity and explain what changed. If a repeat helps identify the same character or object, keep it. Teaching a metric should make language more understandable, not make children self-conscious about every common word.

Return to contents

36. Secondary English: an essay revision test

A Secondary learner may repeat important many times. Rather than substituting random synonyms to increase MATTR, the tutor asks what the student actually means in each sentence: urgent, influential, necessary or significant under a particular criterion.

The student can replace only those instances where a more precise expression improves the argument. A post-edit MATTR value might change, but success should be judged by the sentences’ accuracy, cohesion and appropriateness for the question.

Return to contents

37. Science: consistent vocabulary is a strength

In a Science report, repeating evaporation or photosynthesis can preserve a defined process. Using different words for the same mechanism merely to increase diversity can introduce errors.

A teacher should check that the concept is understood and the scientific explanation is supported by observations. Lexical diversity is not equivalent to conceptual quality. A metric useful in one genre can be inappropriate as a quality target in another.

Return to contents

38. Mathematics: moving windows are an algorithm

The MATTR procedure illustrates a sliding-window algorithm. A learner can keep a count of forms in the current window, remove the form that leaves, add the next and calculate the number of distinct items.

This connects vocabulary to data structures, averages and computational efficiency. The computation is a mathematical operation on text; interpreting it as writing ability requires a separate argument. Students should learn to distinguish calculation from evaluation.

Return to contents

39. History: period spelling changes the curve

Historical sources contain archaic spellings, names and conventions. Two editions of the same document may be tokenised differently if one preserves original spelling and another modernises it.

A comparative MATTR study needs consistent editorial policy or an explicit analysis of how modernisation affects results. The data’s provenance matters as much as the formula. Historical language should not be treated as defective simply because it differs from current norms.

Return to contents

40. General Paper: quality is in the reasoning

A GP essay can display a wide variety of vocabulary while making unsupported claims. A focused essay can repeat central terms yet build a sound argument with evidence and carefully qualified conclusions.

A teacher assessing argumentative writing should prioritise clear claims, warrants, sources and counterarguments. MATTR may describe one surface property, but it is not a substitute for rhetorical judgement or fact-checking.

Return to contents

41. Translation: different languages require different segmentation

The same concept may be expressed with more word forms in one language than another, and languages vary in morphology and token boundaries. Direct comparison of MATTR across languages can therefore be misleading without substantial methodological work.

A translator’s task is to preserve meaning, tone and structural relationships. An increase or decrease in lexical-diversity score does not establish translation quality. Use language-appropriate tools and contextual evaluation.

Return to contents

42. AI writing and score gaming

A language model can produce varied synonyms that inflate a lexical-diversity measure while weakening coherence, or repeat a template that lowers it. Neither outcome by itself proves the content is truthful, original or educationally appropriate.

When evaluating generated material, inspect sources, factual claims, audience needs and the integrity of examples. A single diversity statistic cannot authenticate authorship or guarantee intellectual value.

Return to contents

43. Student privacy in text analysis

Calculating MATTR from pupil compositions may require storing or processing the original writing, which can contain names and personal stories. An aggregate number does not automatically render the underlying records anonymous.

Follow school approval, consent and retention policies. Public teaching examples can be constructed without using identifiable student work. Data protection is part of professional educational research, not an optional extra.

Return to contents

44. A reproducibility checklist

Record the exact text, source or authorised sample, word-tokenisation rules, case policy, type definition, chosen window length, handling of short texts, algorithm or software version and averaging rule.

These details allow another reader to understand the result and avoid incompatible comparisons. A measurement becomes useful when its construction is transparent. Without that transparency, a decimal score can appear more authoritative than it deserves.

Return to contents

45. The difference between exposure and mastery

An essay may contain numerous distinct forms because the writer copied technical vocabulary, while another student may express a difficult idea precisely using common words. MATTR cannot tell whether either student has deeply understood the terms.

Ask learners to define words in context, retrieve them later and use them in new sentences that preserve meaning. That is the appropriate test of usable vocabulary growth. A numerical diversity score is a descriptive aid rather than a final educational outcome.

Return to contents

46. The final lesson: what does the number really mean?

MATTR gives the average proportion of distinct types inside successive fixed-size windows of a chosen text. It is a clear calculation under stated assumptions, which is why it can support careful research.

The purpose of a good vocabulary lesson is not to maximise this number. It is to understand what the measure preserves, what it omits and when the reader still needs to examine the actual sentences. Quantitative literacy should strengthen, not replace, language judgement.

Return to contents

A seven-step student MATTR workbook

  1. Define the text and choose exactly how words, punctuation and case will be counted.
  2. State the window length before inspecting the results.
  3. Write every complete moving window of that many tokens.
  4. Count the distinct types in each window and divide by the window length.
  5. Average all the local ratios without silently dropping inconvenient windows.
  6. Explain why the resulting number does not prove the writing is good or poor.
  7. Rewrite an original sentence for clearer meaning and evaluate the revision by comprehension, not by chasing a higher score.

Frequently asked questions

1. What does MATTR stand for?

Moving-average type–token ratio.

2. Who introduced the 2010 MATTR study?

Michael A. Covington and Joe D. McFall, writing in the Journal of Quantitative Linguistics.

3. What is a type?

A distinct lexical form or unit under the chosen normalisation convention.

4. Why use a moving window?

It compares local stretches of fixed length rather than one entire text whose TTR depends strongly on length.

5. Does the window need a stated size?

Yes. Scores calculated using different window sizes are not automatically comparable.

6. Is MATTR the same as overall TTR?

No, except in cases such as one full-text window under equivalent counting rules.

7. Can MATTR measure vocabulary knowledge?

Not directly. It describes text patterns, not understanding or independent retrieval.

8. Should a student replace every repeated word?

No. Repetition can preserve coherence, technical precision and clear reference.

9. What if the text is shorter than the window?

The complete-window calculation is not defined without a different stated policy.

10. What is the useful outcome?

A learner who can calculate the measure, explain its limits and still select words by meaning and audience.

Original research and connected reading

MATTR is most useful when its calculation is transparent and its interpretation modest. Students need words that are accurate, relevant and understandable. The moving average can describe lexical variety; the learner’s demonstrated comprehension and independent writing show whether that vocabulary can actually be used.