Constructing a box-and-whisker plot Constructing a box and whisker plot to analyze data.
Constructing a box-and-whisker plot
- The owner of a restaurant wants to find out where his patrons are coming from
- one day he decided to gather data about the distance in miles that people commuted to get to his restaurant
- People reported the following distances traveled. So here are all the distances traveled.
- He wants to create a graph that helps him understand the spread of distances
- this is a key word, the spread of distances and the median distance, that people travel.
- What kind of graph should he create?
- So, the answer to what kind of graph he should create should be more straight forward
- than the actual creation of the graph which we will also do
- but he's trying to visualize the spread of information and at
- the same time he wants the median, so what graph captures both of that information?
- Well, a box and whisker plot! So let's try to draw a box and whisker plot!
- To draw a box and whisker plot we need to come up with the median and we'll also see the median of the two
- halves of the data as well, and whenever we try to take the median of something, it's
- really helpful to order our data.
- So let's attempt to order our data. So what is the
- smallest number here? Let's see, there's one 2, so we mark it off. And then we have another 2
- so we got all the 2's. And then we have this 3, then we have this 3. I think we got all the 3's
- And then we have that 4, and then we have this 4
- Do we have any 5's? No, do we have any 6's? Yup, we have that 6.
- And that looks like the only 6. Any 7's? Yep, we have this 7 over here. And I just realized
- I missed this 1 so I'm going to put it at the beginning of the set, actually I missed two 1's.
- Both 1's are right at the beginning of the set.
- So I have: 1's, 2's, 3's, 4's, no 5's this is one 6, one 7, one 8
- Let's see, any 9's? No 9's. Any 10's? Yep, there's a 10.
- Any 11's? Yes, we have an 11. Any 12's? Nope.
- We have 14 and 15. We also have a 20 and 22.
- So, we've ordered all our data is should be relatively straightforward to find the middle of our
- data. The median. So how many data points we have?
- 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
- 11, 12, 13, 14, 15, 16, 17
- So the middle number is the number that has 8 numbers larger than it
- and 8 numbers smaller than it. So let's think about it. One, two, three, four
- five, six, seven, eight. So the number 6 here
- is larger than eight of the values and if I did the calculations right
- it should be smaller than eight of the values, one, two, three, four
- five, six, seven, eight. So it is indeed
- it is indeed the median. Now when we take
- a box and whisker plot, the convention is we have our median and it is essentially dividing
- our data into two sets, now let's take the median of each of
- those sets, and the convetion is to take our median out and have the sets
- that are left over. Some times people leave it in, but the standard convention
- take this median out and look separately at this set and look separately at this set.
- So if we look at this first, the bottom half of our numbers essentially
- what's the median of these numbers?
- Well, we have one, two, three, four, five, six, seven,
- eight, data points. So we are actually gonna have two middle numbers.
- So the two middle numbers are this 2 and this 3
- three numbers less than these two and three numbers greater than them
- and so when we are looking for a median, we have this two middle numbers and we are taking the mean
- of these two numbers. So halfway between 2 and 3 is 2.5
- 2 plus 3 is 5. 5 divided by 2 is 2.5
- So here we have the median of this bottom half of 2.5.
- And then the middle of the top half, once again we have eight data points, so our
- middle two numbers are gonna be this 11 and this 14
- And so if we want to take the mean of these two numbers, 11 plus 14 is 25. Half of
- 25 is 12.5. 12.5 is exactly halfway in between 11 and 14.
- And now we have all the information we need to actually
- plot our box and whisker plot
- So let me draw a number line, so my best
- attempt at a number line. So that's my number line
- And let's say this over here is 0.
- I need to make sure I get up to 22 or beyond 22
- This is 0, this is 5, this is 10
- that could be 15, that could be 20
- this could be 25, we can keep going
- 30, maybe 35. So the first
- thing we might want to think about,there's several ways to draw it.
- We wanna think about the box part of the box and whisker
- Essentially represents the middle half of our data. So it's essentially
- trying to represent this data, right over here
- so the data between the two between the
- medians of the two halves. So this is the part we would represent
- with the box. So we would start right over here at this
- lower at this 2.5, this is essentially seperating
- the fist quartile from the second quartile, the first quarter of our numbers from the second quarter
- of our numbers. So let's put it over here, this is 2.5
- 2.5 is halfway between 0 and 5 so that's
- 2.5 and then up here we have 12.5
- and 12.5 is right over here
- It's right over here, 12.5
- This is halfway between, well halfway
- between 10 and 15 is 12.5
- 12.5 right over here, 12.5
- So that separates the third quartile from the fourth quartile
- and then our boxes, everything in between, so this is gonna be the middle half
- of our numbers, the middle half of our numbers, and we wanna
- show where the actual median is so that's actaully one of things we want to think about
- in our original.. When the owner of the restaurant
- how far people are travelling from. So the median is 6
- So we can plot it right over here
- this is about 6, that's a pink color.
- So this right over here, is 6. And then
- the whiskers of the box and whisker plot, essentially show us the range
- of our data, and so , let me do that.
- I will do it in a new color, how about orange?
- So essentially if we wanna see
- look the numbers go all the way up to 22
- this is 22 right over here, our numbers go all the way
- up to 22. Our numbers go all the way up to 22.
- And they go as low as 1
- 1 is right about here. They go as low
- as 1...
- So there you have it. We have our box and whisker plot. And you can see
- if you have a plot like this, just visually you can immediatly see
- what is the median? It is the middle of the box
- it shows the middle half, or how far spread is, the meat of the spread
- it shows beyond that, it shows the range, that goes way beyond
- that it goes. Or how far the total spread of our data
- is. So it gives us a pretty good sense of both the median and
- the spread of our data
Be specific, and indicate a time in the video:
At 5:31, how is the moon large enough to block the sun? Isn't the sun way larger?
Have something that's not a question about this content?
This discussion area is not meant for answering homework questions.
Share a tip
When naming a variable, it is okay to use most letters, but some are reserved, like 'e', which represents the value 2.7831...
Thank the author
This is great, I finally understand quadratic functions!
Have something that's not a tip or thanks about this content?
This discussion area is not meant for answering homework questions.
At 2:33, Sal said "single bonds" but meant "covalent bonds."
For general discussions about Khan Academy, visit our Reddit discussion page.
Here are posts to avoid making. If you do encounter them, flag them for attention from our Guardians.
- disrespectful or offensive
- an advertisement
- low quality
- not about the video topic
- soliciting votes or seeking badges
- a homework question
- a duplicate answer
- repeatedly making the same post
- a tip or thanks in Questions
- a question in Tips & Thanks
- an answer that should be its own question