Text and Exponential Distribution

An applet has been designed so that the user can type in any passage from a written work (newspaper, magazine, or book). As the text is typed in, the computer automatically arranges the letters as though they were part of a graph on a rectangular xy grid. The horizontal x axis records the number of letters encountered in the text as they are typed in, while the vertical y axis records the number of distinct letters encountered in the text.

The user can choose a passage of text or can just type in letters at random. After 60 letters are typed, the text disappears, and new text can be added. The letters are typed on the screen in the usual manner, from left to right, but when a new letter appears it is entered one space above the previous letter. Beeps can be introduced to announce new letters.

Each passage will trace out a different curve, but there is a remarkable similarity in their shapes. The tutorial will show that the curve traced out is essentially a reflection of the exponential curve traced out in the activity Optimal Loading of Camels.

Later we will develop an averaging process for different texts. Or, we can type the same text with a cyclic shift of the letters and the distribution curve will differ. But all possible cyclic versions of just one piece of text will include enough statistical variation to produce a very smooth average distribution.