>> In this video we're going to do histograms.
Okay. First, let me show you a picture
of what a histogram looks like
and then give you some properties.
So the first property of a histogram is
that the histogram uses quantitative data.
Quantitative data is numeric data, right,
that you can do arithmetic with.
The next thing that a histogram, one of the properties
of histogram, is that it doesn't have any gaps between the bars.
If you see gaps, if you see several gaps,
in this particular graph,
then you will most likely be looking at a bar graph.
A bar graph is used when you have categorical data, right.
Categorical data tends to be like names,
or things that are in order, right.
But a histogram usually doesn't have gaps.
If it does, it's because there's missing data.
Another thing that the histogram has is the bar width, right,
the bar width is constant in a histogram.
In books sometimes they'll say the bin size is something,
or the class size is something.
In the case of our graph here the bin size is going to be 10
and you can see that it's consistent
with all of these bars.
Okay. And then the y axis corresponds to the frequency.
Sometimes a count, in this case it's counts.
Sometimes it's going to be something
like the relative percent or something,
or some type of percent.
So, again, the vertical represents a count
or some frequency of the histogram.
Okay. So let's do a problem.
Let's say you gave a test, right.
Let's say you gave a midterm one or something.
And you have 15 students and you grade these exams and you wanted
to look at the histogram on these exams, scores.
So let's say you had these scores.
Now you can always pause the video
and you can record all these 15 scores.
Again, we want to build a histogram from the data.
And the first thing we need to do is we need to somehow figure
out this bin size, or class size, or the width of the bars.
That's very important.
How do we do that?
Well, the first thing is that we find the lowest value
and the highest value of our dataset.
And I think that's pretty reasonable.
We can probably look at what the lowest is and the highest.
Have you found the lowest yet?
Yes. The lowest is 48.
And did you find the highest value?
Okay. Probably you did, 97.
So knowing that this is an exam, right, and it goes,
usually exams are from zero to 100, right.
You can think of zero percent to 100 percent.
Yes, there are no percents here.
And usually when you think of grades you think of A,
B, and C, and so forth.
Well, you know, an A tends to have a range of 10 points
so that might be a good indicator
that because it's a test that the bin size, you know,
might be 10, might be a good size.
Now you could have chosen 12 or maybe 15, but sometimes
when you choose larger values
or smaller values your graph will tend to change.
Do some experiments on that
and you'll see what I'm talking about.
But in this case I think it's a pretty fair bet
that the bin sizes could be 10.
So what does that mean?
It means that if we're going to do a bin size of 10,
we should have multiples of 10.
And because our lowest score is 48
and our highest is 97 we don't have to start
at zero score, you know, zero score.
We can probably start at maybe 40 and then do increments of 10:
40 to 50, 50 to 60, and so forth, up to 100.
The highest score was 97 so we can go all the way to 100.
Again, that's very flexible.
You could have started at 45 and do it by tens, you know,
45 to 55, and from 55 to 65, and so forth.
But it would be a little more confusing that way.
Now before we draw the histogram we need to create some type
of table, some type of frequency count table.
This table is going to help us to draw the histogram.
So in this case we have scores and counts.
Scores of course are the bin sizes.
And the counts, well, we need to find, there's going to be 15
of these scores so we have to slot them into the bins.
So our first bin is going to be between 40 through 50.
Now this looks a little weird and it might not be the case
for your class, but I think it should give you an explanation
of what we're trying to do.
Your teacher might not accept this because it might be not
to standard but this video is more to help you
out in understanding how to, what exactly is it that I have
to do to get this histogram.
Okay. So here we have a bracket 40 comma 50
and then a parentheses.
Well, the bracket means to include
and the parentheses means not include.
What does it mean by not include?
Well, if you have a score of 40,
you put it in this slot in this bin.
And I'll tell you what that kind of means but if you had a value
in this case of 41, you'd put it in here.
You count it in this bin.
If you have a score of 50, you don't put it in this bin.
You don't count it here because it says 50 is not included.
So where would you put a 50 score?
Well, you would put it on the next one.
So there's a bracket there which is not include, I'm sorry,
which is include, right.
The bracket is to include so 50, you include 50 comma 60.
So values between 50 and 60, right, is this bin.
If you have a value of 56 or something,
you could put it in there.
But if you have a value of 60, you won't put it in there.
You would put it in the next one.
And of course we can write the rest.
Again, it's possible that you won't have these brackets
or parentheses when you do your homework
but the idea is is that, you know,
where do the numbers fit in these bins.
So let's look at our first data point which is 88.
Where would 88 go?
Oh, yeah, between 80 and 90.
That sounds right.
48, where do you think 48 goes in?
Where in these bins?
Yes, between 40 and 50.
Now we get into 60, you now, where does it go?
Well, it can't go in here because we know
that 60 is not included in this bin.
But it is included in the next bin.
So let's put it in there.
And then we have 51, well, that's between 50 and 60.
And then we got 57 which is between 50 and 60.
Now if I'm going a little too fast, all you need
to do is rewind and then just go ahead and listen.
Okay. 85, right.
So 85, where does 85 go?
Between 80 and 90.
Okay. I'm going to put it in there.
69, where's 69 go?
69, that's below 70, okay, it goes between 60 and 70.
Okay. 75, where does 75 go?
Yes. Between 70 and 80.
Let's put a mark there.
97, let's look.
Yeah. That's below 100, yeah, that's between 90 and 100.
Okay. And then 72, 71, 79, and so forth.
Okay. Good.
You can pause the video there.
All right.
So now we have our counts.
The next thing we want to do is to create our y and x axes.
And we know that our count are going to be the y.
And you can see the counts, I started at zero, 1, 2, 3, 4, 5.
I went up to 5 because if I look at my table, my frequency table,
we don't seem to have counts more than 5 it looks like.
Now for the x. Where do we start?
Do we start at zero?
We could if we wanted to but we don't have to.
As long as we mark it correctly and we tell the teacher, "Hey,
I'm starting at 40," we're fine.
Some teachers don't like that.
Some teachers will accept that.
In this case we're going to start at 40
and we're going to end up at 100.
And we got to label it.
These are scores.
And you can see the bin sizes are 10.
Okay. We decided that at the beginning.
Now we're going to draw the bar.
Let's look at the first bin, 40 through 50,
and it only has 1 count.
So the bar is drawn 1 unit.
Then 50 through 60, that's going
to be 2 units so let's draw that.
And we got to draw it where it's going to be together, right.
So we're going to draw it this way right there.
So there's no gaps.
And then the next bin, 60 through 70,
let's draw it, no gaps.
Okay. 70 through 80, again, no gaps.
That goes up to 5 by the way.
You know, it's like how high am I going?
Well, those are the counts, okay.
The counts tell me how high I'm going.
70 through 80 had 5.
The next one, 80 through 90, what is that, 80 through 90?
How high is the counts?
2. So we draw 2.
And then 90 through 100, how many counts is it?
It's going to be 1.
And we got to make sure we give it a title.
And that's it.
So the important thing is you got
to find these bins or class size.
When you find that, then you can create your bins, you know,
your scored in this case, and then you can start slotting
in all the values until you have some type
of frequency table here.
And that's going to help you create the graph.