Or

4
Tutorials that teach
Bar Graphs and Pie Charts

Take your pick:

Tutorial

Source: Normal Distribution Graph, Public Domain: http://commons.wikimedia.org/wiki/File:The_Normal_Distribution.svg Bar graph created by Jonathan Osters

This tutorial is going to teach you how to construct and interpret bar graphs. Qualitative, which is categorical data, can be displayed visually in a bar graph. This is not the only way to display categorical data, but it's one way. And what it does is it compares the number of values in each category.

So suppose we have these courses in a college and these number of students in each course. What we do is we begin by drawing a horizontal axis and labeling the categories beneath it. We could also label it on the vertical axis and label the categories from top to bottom. But we have it set up this way. So we wrote economics, biology, chemistry, and visually separated them.

Then, we're going to create a vertical axis with frequency on it. The highest number that we have is 444. That's why I chose to have my frequencies go up to 500. Finally, you set up a bar that goes up to the number that corresponds to that category. So economics will have a bar that goes up to 321. It will peak out right about here. Biology will go all the way up to almost 450. The full bar graph looks like this.

We can also use relative frequency. Relative frequency shows how much of the whole this is. So for instance, biology has over 20% of the students, between 20% and 25% of the students. This is assuming that no student is in both biology and chemistry. This might not be true, in which case relative frequency might not be the way to go.

Notice that in the previous example with counts, and in this example with relative frequency, the shape and size of the bars didn't change. The only thing that changed was the vertical axis and what it was measuring.

Another example-- suppose that we have data in a table like this. We can create multiple bar graphs on the same set of axes and compare them by category. Suppose that this was the results of a sample of 100 students that I took. And I wanted to know about their work habits. I wanted to know if they were male or female, and whether they had a job, not at all, during summer only, or had a job all year long.

One way to display these in a bar graph would be to break it up by male and female and choose green to be males and yellow to be females. And break the horizontal axis into no job, summer only, and job all year. And create both bar graphs, side-by-side, within each category.

The males had 25 that had no job. The females had 28 that never had a job, and et cetera. Now that's one way to do it. The other way would be to flip-flop which category means colors and which category goes on the axis. I could put male and female on the axis and have the job status be the colors. In that case, it would look like this.

Both of these tell me some interesting things. This graph tells me that both males and females have a tendency mostly to have no job, then have a summer job, then have a job all year. That's true for both males and females. What this one tells me is that males are more likely than females to have a job all year and in summer, and a little bit less likely than females to never have had a job.

And so to recap. Bar graphs are a nice way to view the counts in a category for a qualitative data set. We can use frequencies or we can use relative frequencies, if there's no overlap between the categories. And we can show how each category relates to the others. We can also put multiple bar graphs on the same set of axes.

Good luck. And we'll see you next time.

Source: TABLE AND PIE CHART CREATED BY AUTHOR; BOOKS, PUBLIC DOMAIN HTTP://COMMONS.WIKIMEDIA.ORG/WIKI/FILE:ALTE_BUECHER.JPG

This tutorial is going to teach you to create and interpret pie charts. Qualitative data can be displayed in a couple of different ways. One way is to display it in a bar graph. We showed you how to do that in another tutorial. Another way that this tutorial is going to deal with is called a "pie chart," and it displays relative frequencies for each category. That is, how do the categories relate to the whole?

So imagine this set of information here. These are courses taken by different majors-- so 321 economics majors, 444 biology majors, 127 chemistry majors, et cetera at a particular college. What we're going to start by doing is calculating relative frequencies. Now, how do we calculate relative frequency?

Relative frequency is the percent of the values that are in each category. So we're going to take each number, like the 321, and divide by the total. The total ends up being 2,070. We're going to divide each frequency by 2,070 to obtain a relative frequency, which is a percent.

Now, what you might notice here that might be a little problematic is 16%, 21%, 6%, 13%, 15%, 12%, 10%, and 8% don't add up to 100%. In fact, they add up to 101%. This is a little problematic. It's not a huge deal. This is mainly due to how we rounded the percents. So know that this can happen when you deal with relative frequencies, and it's not that big of a deal.

Also, we need to, for our pie chart, construct a circle. What we're going to do then is, from the center of the circle, divide it based on some central angle that we're going to make. The central angle for economics has to be 16% of the circle.

You may recall there are 360 degrees in a circle, so how do I set this up? I need 16% of 360 degrees. I multiply each percent by 360.

Remember, when you multiply this out, it needs to be 0.16 because it's 16%. 0.16 times 360 gives you about 58 degrees. I'm going to make a central angle of about 58 degrees that corresponds to economics. I'm going to do the same thing with all the categories. You go to obtain angle measurements for each of these central angles.

There's only one small problem, and that's those don't add up to 360 degrees. Again, because of this 101, these actually add up to 363.6 degrees. It's not a huge deal. It's a couple of extra degrees in a circle. So long as everything is, approximately relative to each other, the right size, we're not going to worry about it too much.

These are the sectors, but which sector corresponds to which category? I could write the words in here-- the names of the majors. It's pretty clear that this one, being the biggest slice, is biology. But which ones are the rest?

We need to create a key, so we'll add a key off to the side. We can either have written the word "economics" here in the blue sector, or we can create a blue square here and write "economics" next to it. That shows that anything that's blue means economics. And we'll do the same for all of them.

And so to recap, pie charts are visual displays, but they're only for qualitative data. What they do is they display the relative frequency, or percent, of each category by dividing a circle into sectors that relate those relative sizes.

The biggest advantage to a pie chart over something like a bar graph is that it's possible to see how each category relates to the whole. And sometimes because of rounding, much like in our example, the relative frequencies don't add up to 100%. They might add up to only 9% or 101%, as they did in our example. But as long as the relative sizes of each are in the right proportions, we're not going to make a huge deal out of it.

Also that issue of not adding to 100% can get fixed by rounding the values more precisely. And so we talked about pie charts, also called "circle graphs." Good luck, and we'll see you next time.