>>Dr. Barker: What we want to discuss in this video is the depiction of qualitative variables.
We said that a couple of primary ways to depict the count of qualitative variables would be
with a bar graph or with a pie chart, okay? And remember again with these qualitative
variables, it’s difficult to depict them unless we’re talking about their count in
a data set. So let’s take a look at an example from a quality control context. Let’s say
we have an assembly for bicycles, let’s just say. In fact, the product type here is
bicycle. And let’s say we’ve inspected 2,217 of these bicycles and there’s some
number of them, 144 of those 2,217, that has some kind of non-conformity. Okay? So for
example, 21 of those bicycles had blisters on the paint. Thirty-eight of them had a light
spray area on the paint of the bicycle. Twenty-two had drips, 11 had over sprays, 47 had runs,
and then for five of those other bicycles there was some kind of non-conformity dealing
with the paint that just fell in another category. Okay, so 144 of those bikes had some kind
of non-conformity in the painting process. And we’ve got a count for each one of the
occurrences of these…qualitative categories, okay? So we have a qualitative variable here.
That qualitative variable would be called non-conformity type, and we have six different
values that this qualitative variable can take on. And again, they are qualitative categories
and we’ve got counts of each of those qualitative categories. And we want to depict this graphically
somehow, okay. So we go over here in Excel, and we’re going to use Excel just briefly
for these examples. Excel is not the very best way to portray data, whether it’s qualitative
or quantitative, but we don’t want to get too deep into a different…software package.
Let’s just use Excel quickly and then move on, okay? So what we’re going to do is go
up to the “Insert” function, okay. And here we’re going to insert – let’s first
do a bar graph. Okay, so here’s the “Insert” function and here is a column chart. You could
represent a bar graph either as a column or a horizontal chart, okay, row chart. But let’s
go ahead and let’s just use a 2D column here, okay. So we’ve got this open canvas
here. We’re going to right-click in the chart area. Excuse me, right click here, and
we’re going to select “Data,” okay? Once we do that we’re going to enter a series,
okay, so we’re going to add. The series name here is going to be the count, and the
series value – we’re going to delete what’s there and we’re going to insert these. Okay,
so that’s going to be the values that we’re going to be reading into this bar graph, okay?
Then we want categories along the horizontal access; we don’t just want one, two, three,
and four, we actually have names for those categories. So let’s add in our names, which
are here. Okay, and there we have it. So now we have a bar graph depicting this data. So
I always remove the label here. If I’m going to insert this into a document, I’m probably
going to put a label down at the bottom in the text. You know, “Table 1” and then
give some longer descriptor of what this – or probably Figure 1 and what this figure is
representing. I, I never like to put the label at the top. So if you highlight on that textbook
you can just hit the delete key and remove it. Okay, so let’s move this over a little
ways. Okay, so what do we see here? We see that runs are most populous; others in the
“Other” category least numerous. And we get some depictions of how these – how the
counts, how the frequency of each of these categories relate to each other, okay? That’s
generally speaking what we get from a bar graph, okay. The other option for us is a
pie chart. Pie charts…in the technical community, in the data analysis community, pie charts
are viewed upon negatively. There – if you search the Web, you can find a lot of different
alternatives to a pie chart that describes – that describe essentially the same thing
that a pie chart can. But let’s go ahead and just, for completeness because this is
a fundamentals class, let’s go ahead and introduce the pie chart and how to, and how
to perform one in Excel. So we’ll go to “Insert,” and we’ll go to insert a pie
chart icon. And let’s just insert a 2D pie chart, okay? And so same kind of idea here:
we have an empty canvas, we’re going to right-click on that canvas and hit “Select
Data.” And we’re going to enter in the same series that we did previously. So here’s
the series name, the series values are in this column right here. And let’s insert
labels that are more descriptive than just the default categories one, two, three, four,
five and six, and let’s enter in this range right here for the items. Okay, so that’s
it. And so now we have a pie chart – again, I like to remove the label here. So what does
this pie chart tell us? It gives us the breakdowns of, for example, runs versus over sprays.
We see – or pardon me, light spray. We see Others, the smallest category, and so on,
okay? For both of these – let me move this down here. For both of these we have some
different options on sprucing things up a bit. If we go to the “Insert” again – pardon
me, if we go to “Designs” we’re clicking on, we’ve clicked on the pie chart. And
we have a lot of different ways to make this look, okay, relative to the default option.
So here, for example, we still have the same categories but now we have labels for the
percentages of each one. Okay, that might be a little more useful to not just get a
graphical depiction, but also a quantitative measure. And there are different coloring
schemes. You can go over here and change colors to different coloring scheme throughout, okay?
So a few different options for graphically depicting this thing, okay. And likewise for
the bar graph, we have a few different options at least color-scale wise. So for example
if this was the default…so we have labels on each one of these giving their magnitude
of count, okay? You can have lines – horizontal lines – going across. Change it up a little
bit: no lines going across, a completely different shading, still numbers, and so on. Okay, so
a few different options to play around with and of course, we can always change the color
– color scheme to whatever matches the color scheme we’re using in the document, okay?
So again, graphically depicting qualitative variables. We’ve got bar graphs and pie
charts depicting the same data set. This gives us an idea of the frequency of different categories.
Same kind of idea here if we can assume that all those categories make up the whole, okay,
and we’ve got a percentage of the whole for each one.