We need to start with some data. We will generate a list of data on the calculator using GNRND4 with Key 1=104256702 and Key 2=900376. That list will be the same numbers that appear in the following table: Thus, our problem will be to generate a Pareto chart for the data in the list above. A Pareto Chart is just a bar chart but with the items arranged in decreasing order of frequency. Therefore, our first steps will be exactly the same as the steps we would take to do a bar chart.
![]() | We start the GNRND4 program and give it the two key values. |
![]() |
After a few screens, the program displays the
contents of L1.
We note that these are exactly the values in the table above.
The program is still running at this point, so we
can press ![]() |
![]() |
GNRND4 has completed. Although we need not do it now, we will
run the COLLATE2 program at this point. After that,
starting in Figure 7, will have the calculator do a bar graph of the data.
It is important to note that the
calculator will do that bar graph on the data in
L1. It does not need or use the output
of COLLATE2. We run COLLATE2 here just to give us some information.
In Figure 3 we have already selected COLLATE2 from the list of programs on the calcualtor.
We will press |
![]() |
The program displays some information and then it asks for the data list.
We respond with L1.
Again, we will press ![]() |
![]() |
The program produces some display output. Here we note that
the program found 10 different values among the 68 items in the list.
The program is in a "paused" state. We press
![]() |
![]() |
The rest of the display output is shown in Figure 6. In particular,
we note that the values in the original list range from 376 to 385.
COLLATE2 does more than jsut produce the display information. It also created some new lists. We will return to see these in Figure 15. |
![]() |
Once COLLATE2 has completed, we press ![]() ![]() |
![]() |
Pressing ![]() ![]() ![]() |
![]() |
lthough this is a valid histogram, it is notthe bar chart that we want. There are only 8 bars to cover the 10 values that we know are in the list of the original data. |
![]() |
We press the ![]() |
![]() |
The new values typed into the menu shown in Figure 11 have the low end of the first class startign at 375.5 with a class width of 1 and the low end of the class following or final display class starting at 385.5. |
![]() |
We press the ![]() |
![]() |
We exit the graph display by
pressing ![]() ![]() |
![]() |
Press ![]() ![]() |
![]() |
Figure 15 is from the Stat Editor. Here we see the more hidden results of running COLLATE2 before, namely, we have some special lists and they are displayed in the editor. |
![]() |
We use the ![]() We could stop our calculator work here. After all, we have 10 rows of values and we could sort those rows by hand putting the row with 17 in LICNT at the top, followed by the row with 15 in LICNT, followed by the row with 8 in LICNT, and so on. Then we can construct, by hand, a Pareto chart by using the associated frequencies to determine the height of each bar on the chart. If we make the first bar, the one associated with the value 377, 10 centimeters tall, then the height of the bar representing 376, with 15 as its frequency will be determined by 15*(10/17). This calculation was presented and discussed in the material on bar charts. On the other hand, perhaps we can get the calculator to sort this information for us. |
![]() |
As usual, we exit the editor via the sequence
![]() ![]() |
![]() |
At a minimum, we want to sort the LICNT
list into descending order. However, we want to do this while we keep the information in
at least the LITEM list, and most likely the
LRFREQ list, associated with the same value
in LICNT. That is, at the start we have the
second entry in each of the three lists related: (as we see in Figure 15) 377 is related to
17 and that is related to .25. It would not do us much good to
just sort LICNT without moving the values in the other lists
to keep things line up.
Fortunately, the SortD( command will do this for us. We want to construct the command We start building our command by moving to the LIST menu via
|
![]() |
Figure 19 shows that we ahve pasted the SortD( command onto the main screen. |
![]() |
We move back to the LIST menu,
![]() ![]() ![]() |
![]() |
The name has been pasted and
we have followed that by the ![]() |
![]() |
It is back to the LIST menu, find the next name that we want, and then select that name. |
![]() |
The name has been pasted and we follow it with another
![]() |
![]() |
Return to the LIST menu, find the last name, select it. |
![]() |
We complete the command with the ![]() ![]() |
![]() |
The calculator responds with Done to indicate that the processing has completed.
We move back via STAT, Edit to see the editor in Figure 27. |
![]() |
In this figure we see that the values have been sorted, and that the associated values in the other two columns have moved with the value in LICNT. |
![]() |
Figure 28 shows the bottom of the lists. |
![]() |
Before we leave this, we have moved over to see one of the other columns namely LCMCNT This was not sorted with the other columns. Therefore, the values in this list no longer correspond to the values in the sorted columns. A quick look shows that 50 in LCMCNT is associated with the top 6 in LICNT. However, the next line in LICNT is another 6. That means that we should have 6 added to the cumulative total which is in LCMCNT, but we find 52 there instead. |
It would seem that we are stuck at this point. The calculator will do a bar chart of the data and that bar chart has all of the required columns but they are not in the right order. The COLLATE2 program processes the original data and produces some new lists that give us all the data that we would need to create a Pareto chart, but in the wrong order. We know that we could sort the data by hand and we have seen in Figures 18 through 25 how to create a command,
The most simple program for our task would be one that has just one line, namely, the command that we want to use. Then we can perform that line by running the program, a process that takes just a few steps, is not prone to error, and does not require us to remember much. We do the work once to write the program and then it is available to us over and over.
The biggest challenge in writing a program is to know when to stop adding features to it. I started to write the program to do our sort and as soon as I got into it I saw that I could do even more. I could have the program not only sort the required columns but also sort the LDPIE column. Then, I could get the program to recompute the remaining two columns, LCMCNT and LCRFRQ. Then, I could get the program to create a new list, L3, that I could fill with integers 1 through the number of classes that I have in LICNT so that there are as many 1's as I have in LICNT(1), as many 2's as I have in LICNT(2), as many 3's as I have in LICNT(3), and so on. Once that is done, then if I were to get a bar chart of L3, I would get the same image that I would get for a Pareto chart of L1, our original data. However, while I am at it, I might as well have the program set up the required WINDOW values, make sure that the PLOTS are set the way I want, and, finally, draw the chart. I am sure that there is more that I could put into such a program, but this looks like a good place to stop. So, here is an annotated listing of such a program.
![]() |
We leave Figure 29 by pressing the
![]() ![]() |
![]() |
Press ![]() ![]() ![]() |
![]() |
In Figure 32 we have the command to run the program, press
![]() |
![]() |
The program runs without any intervening output and moves directly to
a display of the graph that the program set up. This is the graph of
the data that the program put into L3.
It has exactly the correct form for the Pareto graph of the
data that we had in L1.
Remember that we used COLLATE2 to generate the required lists. Then we run GNPARETO to produce the Pareto chart shown in Figure 33. |
![]() |
We do need a few words of caution here. Note that if we move into
TRACE mode via the ![]() |
![]() |
While we are checking, we should look at the lists that were sorted and recreated. To to this enter the STAT Editor. Here, in Figure 35, we see that the values are correctly sorted. |
![]() |
For Figure 36 we move to the right to see that the CMCNT column has been correctly recomputed. |
![]() |
We move a bit further to the right and we see that the CRFRQ column is not correct.
However, there is a problem in the DPIE column. These values cannot be correct.
The largest piece of the pie must be the first one, given that this is ordered that way.
But the list in Figure 37 has the largest piece second. What went wrong?
Reviewing the program there is no obvious error. If the error is not in the program then perhaps the error was caused by the operator, namely me. What could I have done wrong? The error that I made was to not strictly follow the designed pattern of use. I wrote the GNPARETO program to work on the output of the COLLATE2 program. We ran COLLATE2 back in Figure 4. Then we ran GNPARETO in Figure 32. However, between those actions we went in and we sorted three of the lists back in Figure 26. When we did that we destroyed the corresponence of the values in DPIE with values in the other lists. Were we to go back and rerun COLLATE2 and then run GNPARETO we would get correct results. |
![]() |
Figure 38 shows the main screen after rerunning COLLATE2 and GNPARETO, and exiting the graph at the end of the latter. |
![]() |
Figure 39 shows the start of the display of the resulting lists. |
![]() |
Figure 40 shows the top of the other lists. We see that the LDPIE list is now correct. |
©Roger M. Palay
Saline, MI 48176
September, 2012