Frequency Histograms and Polygons the Easy Way on the TI-83/84
Copyright © 2008 by Stan Brown, Oak Road Systems
Copyright © 2008 by Stan Brown, Oak Road Systems
Making a frequency histogram or polygon using native TI-83/84 commands is kind of tedious. This page gives a downloadable program that automates the process. The program can handle a grouped or ungrouped frequency distribution as well as a simple list of numbers.
Note: Not all students are required to make frequency polygons. Check with your instructor if you’re not sure what is required for your class.
Contents:
There are three methods to get the program into your calculator:
2nd x,T,θ,n makes LINK]
[►] [ENTER], and then on hers press
[2nd x,T,θ,n makes LINK] [3], select the program,
then press [►] [ENTER].To use the program, put the class marks or data in a statistics list and the frequencies (if applicable) in another.
Then press [PROG], select
HISTNPG2, and press
[ENTER] [ENTER]. The program will prompt you for the
necessary information and will check
silently to make
sure your inputs are in valid form. Then it will ask whether you want a
histogram, polygon, or both, and will produce your desired graph. (The
program uses an algorithm to ensure that there are an appropriate
number of dots vertically on the screen.)
If you should ever need to break out of the program before
finishing the prompts, press [ON] [1].
If you have frequency data, the data list and frequency list must be the same length and the class widths in the data list must all be the same; the program checks this. The TI-83 and TI-84 won’t let you make a histogram with more than 47 classes, and the program also checks this. Finally, the program also won’t let you make a grouped frequency histogram with just one or two classes, because that’s silly.
The program uses some variables for temporary storage and leaves them afterward in case you want to look at them:
A = upper bound of highest class
I = scratch variable for use in lists
N = number of classes
W = class width
LD = class marks
LF = class frequencies
If you want to delete the lists to free up memory,
press [2nd + makes MEM] [2] [4], scroll down to find
each one, and press [DEL].
If you want to delete the single-letter variables, though it’s
hardly worth the effort, press [2nd + makes MEM]
[2] [2], cursor to each one, and press [DEL].
| Class Boundaries | Class Marks | Frequency |
|---|---|---|
| 20 ≤ x < 30 | 25 | 34 |
| 30 ≤ x < 40 | 35 | 58 |
| 40 ≤ x < 50 | 45 | 76 |
| 50 ≤ x < 60 | 55 | 187 |
| 60 ≤ x < 70 | 65 | 254 |
| 70 ≤ x < 80 | 75 | 241 |
| 80 ≤ x < 90 | 85 | 147 |
The grouped frequency distribution at right shows the ages reported by Roman Catholic nuns, from Johnson & Kuby, Elementary Statistics 9/e (Thomson, 2004), page 67. Show the data as a histogram and as a frequency polygon.
Solution:
Your class marks are 25, 35, up through 85, and your class
width is 10. On the STAT EDIT screen, enter those
marks in one list and the frequencies in another.
Here the class marks have been entered in L5 and the
frequencies in L6, just for variety.
Run the HISTNPG2 and specify
frequency distribution. The program then asks you to identify the
lists, and which plots you want. In the illustration,
I’m selecting both plots. If you’re not doing frequency
polygons in your class, select [1] for just the histogram.
The output is shown at right, once with the histogram and polygon on
the same screen, and once with just the
histogram.
It’s quite similar to the
graphs done “by hand”,
except that the vertical spacing of the dots may be different.
You can trace the histogram by pressing
[TRACE].
This lets you see the class boundaries and number of data points in each
class.
Press [◄] and [►] to
move through the classes. To suppress the tracing
information, press [GRAPH] again.
To trace the polygon, if you selected both, press
[TRACE] [▼].
This lets you see the class marks and number of data points in each
class, instead of the class boundaries.
Why press [▼]? When you press
[TRACE], the calculator starts with a trace of Stat Plot 1.
The up or down cursor key moves between plots. Since the frequency
polygon is Stat Plot 2, you are tracing it when you see P2 in the
upper left corner, as shown in the illustration.
| 11 | 15 | 14 | 12 |
| 9 | 8 | 7 | 5 |
| 6 | 11 | 10 | 10.5 |
| 12 | 11 | 13 | 2 |
| 6 | 4 | 13.5 |
Suppose you want to make a histogram of the class performance on a 15-point quiz, where the scores are shown at left. You don't want to bother to group these 23 scores by hand, so you enter them in a statistics list such as L1 and let the program do the grouping for you.
Run the HISTNPG2 program and select
[2] for a plain list of numbers. The program asks you for the
list that contains the data. It also needs to know how you want
to group the numbers, so it asks for the lower bound of the first
class and for the class width. Since 0 is the lowest possible grade,
that’s the obvious lower bound for this example. The quiz has a possible
maximum score of 15, and 10% of that is 1.5 points. This is a good
class width because D, C, B, and A will each be one bar of the
histogram.
At this point you may see a pause as the program computes the
number of classes and places each data point into a class. (It uses
statistics lists LD for the class marks and
LF for the computed frequencies.)
Finally, the program asks whether you want a histogram, frequency polygon, or both. I’ve selected a histogram, and you see the result.
At first glance you might think there are four Ds, three Cs, two Bs,
and one A. But when you check this by pressing [TRACE] you see
that’s not correct. The highest class is the 15 to 16.5 class,
since someone had a perfect score of 15. (Remember that when a value
is right on a class boundary, it is always assigned to the higher
class.) So the top two classes in the histogram represent As
(three students), the next lower is the three Bs, the next lower
(shown at right) is four Cs, the next lower is two Ds, and the rest
are Fs.
| Children per family | Frequency |
|---|---|
| 0 | 9 |
| 1 | 6 |
| 2 | 10 |
| 3 | 2 |
| 4 | 2 |
| 5 | 1 |
You have recorded the numbers of children in 30 randomly selected families that used a community center in a given week, and you want to show a picture of the distribution. There are only a few diffeent values (numbers of children per family), so you chose an ungrouped frequency distribution.
Enter the data in two lists such as L3 and L4, and run the
HISTNPG2 program. Select [1] since
you have a frequency distribution, even though it is ungrouped.
When prompted, enter the data list and frequency lisyt, and select whether you want a histogram, a frequency polygon, or both. I’ve selected a histogram, and the results are shown in the third screen shot below.
The vertical line in the histogram is the y
axis — you can remove it, if you want, by pressing
[2nd ZOOM makes FORMAT] and selecting AXES OFF. Also in the
histogram, notice that the vertical rows of dots run through the
center of each bar rather than along the edges. This reminds you that
you should label the bars of an ungrouped frequency distribution under
the centers, not the edges as you label a grouped histogram.
If you want to trace the ungrouped frequency histogram, follow the same procedure as for tracing a grouped frequency histogram.
Sep 21, 2008:
Jun 7, 2008:
home page | problems with viewing?
This page is used in instruction at Tompkins Cortland Community College in Dryden, New York; it’s not an official statement of the College. Please visit www.tc3.edu/instruct/sbrown/ to report errors or ask to copy it.
For updates and new info, go to http://www.tc3.edu/instruct/sbrown/ti83/