The objective of this page is to present, in the most elementary way, some of the one variable graphs that we find or use in elementary statistics. Links are provided to other pages that demonstrate creating these graphs in R. |

As a small but significant disclaimer, please note that R has at least three completely separate, and to some extent, redundant systems for creating graphs, charts, and plots. These pages only use the base plotting system. We expect that this base system to be more than sufficient for our needs. However, should you ever need fancier graphs, rest assured that R is quite capable of producing them, though maybe through the other two systems. |

On this page we will take a quick look at

Table 1 | |||||

Label | A | B | C | D | E |

Value | 3.24 | 4.13 | 7.3 | 4.9 | 6.1 |

Notice that these are discrete values. The

The bars in Figure 1 are vertical but we could produce the same information in a horizontal format, as in Figure 2.

A

A more common use for a

Clearly, the lower values happen much more often than do the upper values. In fact, just looking at the

See the page Making Bar Charts in R for a more detailed discussion of how you can create

we could take a quick look at the values in the table by doing a summary of the values:

That bar chart is just too busy; it has too many bars to be of real use. However, it is clear that the values in

Just a glance at Figure 4 tells us that there are more high values in

Note that in a

That small change in the definition made a noticeable change in the graph. [There are 2 values in the table less than 30 and two values of 30. That distribution causes the change in the left end of the graph.] Naturally, we should note the choice of including the left or right endpoints somewhere, if we are going to be publishing the histogram or even if we are going to ask someone else to look at it. If you encounter a

You might also note that the width of the

As noted above, we often use a

If we look at a

In particular, we see that the values must be between
**35** and **80**, and that most of the values appear near the middle of that range
with fewer values at the extremes. In fact, of the 95 value in the table, only 2 appear to be
greater than 65 and only 9 appear to be less than or equal to 40,
assuming the histogram was produced using the default R settings.

One aspect of making a **histogram** is deciding how many **bins**
you will use and where the breaks between the **bins** will fall. In Figure 5
there are 7 **bins** starting at 35 and having a width of 5. What if we keep
the 7 **bins** but we change the **breaks** between the **bins**?
One version of that is shown in Figure 6.

Remember that the data in

This same change in impressions can arise from increasing, or decreasing, the number of

On the other hand, in Figure 8, we show the same data but this time with only 4

There is no magic formula that will tell us the "correct" number of

See the page Making Histograms in R for a more detailed discussion of how you can create

or, in a horizontal version as Figure 9h

To help explain the

The rectangle in the middle of the chart shows the relative position of

Then, in Figure 10, we see the

As it turns out, the data we have been using, the values in

A

From that figure we can see

- The highest value is around 67
- The
**median**value,**Q**, the center line in the rectangle, is about 59_{2} **Q**, the bottom of the rectangle, is about 57 and that means that 1/4 of all the values are in that narrow band between about 57 and about 59_{1}*[remember that band is the second quartile]***Q**, the top of the rectangle, is about 63 and therefore the third quartile is considerably wider than is the second quartile_{3}- the fourth quartile seems to be about as wide as was the third quartile
**There is something that we have not seen representing the first quartile**

The

Values that are above

How can a data value be "invalid" you ask. There could have been a clerical error in entering the data. A device that collects the data may have malfunctioned or could have experienced a situation for which it was not designed. Our procedure for identifying our population may have not been strict enough and some non-representative items may have been included. Using the

The

Also, because both vertical and horizontal charts are common, here is a horizontal version of the previous chart.

See the page Making Box and Whisker Charts in R for a more detailed discussion of how you can create

A

Table 6 | |||||

Label | Betty | Art | Jill | Pat | Sal |

Value | 9.13 | 4.82 | 7.3 | 2.9 | 6.1 |

We teach making

Figure 13 | Figure 14 |

The problem with

In general, it is important to know how to produce a

See the page Making Pie Charts in R for a more detailed discussion of how you can create

We will present the

You construct a

If you compare this to Figure 3 (repeated below) you will find that the

This leaves us with the question of why do we even have such a thing as a

R does not have a

©Roger M. Palay Saline, MI 48176 October, 2015