< Return to Video

How to calculate interquartile range IQR | Data and statistics | 6th grade | Khan Academy

  • 0:00 - 0:01
    - [Instructor] Let's get some practice
  • 0:01 - 0:04
    calculating interquartile ranges
  • 0:04 - 0:05
    and I've taken some exercises
  • 0:05 - 0:07
    from the Khan Academy exercises here.
  • 0:07 - 0:09
    I'm just gonna solve it on my scratch pad.
  • 0:09 - 0:10
    The following data points represent
  • 0:10 - 0:14
    the number of animal crackers
    in each kid's lunch box.
  • 0:14 - 0:16
    Sort the data from least to greatest
  • 0:16 - 0:20
    and then find the interquartile
    range of the data set
  • 0:20 - 0:23
    and I encourage you to do this
    before I take a shot at it.
  • 0:23 - 0:24
    Alright, so let's first sort it
  • 0:24 - 0:25
    and if we were actually doing this
  • 0:25 - 0:28
    on the Khan Academy exercise,
    you could just drag these,
  • 0:28 - 0:30
    you could just click and
    drag these numbers around
  • 0:30 - 0:32
    to sort 'em but I'll just do it by hand.
  • 0:32 - 0:35
    So let's see, the lowest number
    here looks like it's a four.
  • 0:35 - 0:39
    So I have that four
    then I have another four
  • 0:39 - 0:41
    and then I have another
    four and let's see,
  • 0:41 - 0:42
    are there any fives?
  • 0:42 - 0:44
    No fives but there is a six.
  • 0:44 - 0:48
    So then there is a six
    and then there's a seven.
  • 0:49 - 0:51
    There doesn't seem to
    be an eight or a nine
  • 0:51 - 0:53
    but then we get to a 10
  • 0:54 - 0:56
    and then we get to 11, 12.
  • 1:00 - 1:04
    No 13 but then we got 14 and
    then finally we have a 15.
  • 1:06 - 1:07
    So the first thing we wanna do
  • 1:07 - 1:09
    is figure out the median here.
  • 1:09 - 1:11
    So the median's the middle number.
  • 1:11 - 1:13
    I have one, two, three, four, five,
  • 1:13 - 1:16
    six, seven, eight, nine numbers
  • 1:16 - 1:18
    so there's going to be
    just one middle number.
  • 1:18 - 1:19
    I have an odd number of numbers here
  • 1:19 - 1:20
    and it's going to be the number
  • 1:20 - 1:22
    that has four to the left
    and four to the right
  • 1:22 - 1:26
    and that middle number, the
    median is going to be 10.
  • 1:26 - 1:29
    Notice I have four to the
    left and four to the right
  • 1:29 - 1:31
    and the interquartile range
  • 1:31 - 1:32
    is all about figuring out the difference
  • 1:32 - 1:34
    between the middle of the first half
  • 1:34 - 1:36
    and the middle of the second half.
  • 1:36 - 1:37
    It's a measure of spread,
  • 1:37 - 1:40
    how far apart all of these data points are
  • 1:40 - 1:42
    and so let's figure out the
    middle of the first half.
  • 1:42 - 1:43
    So we're gonna ignore the median here
  • 1:43 - 1:46
    and just look at these first four numbers
  • 1:46 - 1:48
    and so out of these first four numbers,
  • 1:48 - 1:51
    since I have an even number of numbers,
  • 1:51 - 1:54
    I'm gonna calculate the median
    using the middle two numbers
  • 1:54 - 1:55
    so I'm gonna look at the
    middle two numbers here
  • 1:55 - 1:57
    and I'm gonna take their average.
  • 1:57 - 1:58
    So the average of four and six,
  • 1:58 - 2:00
    halfway between four and six is five
  • 2:00 - 2:03
    or you could say four plus six is,
  • 2:03 - 2:05
    four plus six is equal to 10
  • 2:05 - 2:07
    but then I wanna divide that by two
  • 2:07 - 2:09
    so this is going to be equal to five.
  • 2:09 - 2:12
    So the middle of the first half is five.
  • 2:12 - 2:14
    You can imagine it right over there
  • 2:14 - 2:15
    and then the middle of the second half
  • 2:15 - 2:16
    I'm gonna have to do the same thing.
  • 2:16 - 2:18
    I have four numbers.
  • 2:18 - 2:20
    I'm gonna look at the middle two numbers.
  • 2:20 - 2:22
    The middle two numbers are 12 and 14.
  • 2:22 - 2:26
    The average of 12 and
    14 is going to be 13,
  • 2:26 - 2:27
    is going to be 13.
  • 2:27 - 2:30
    If you took 12 plus 14 over two,
  • 2:30 - 2:34
    that's going to be 26 over
    two which is equal to 13
  • 2:34 - 2:35
    but an easier way for numbers like this,
  • 2:35 - 2:40
    you say hey, 13 is right exactly
    halfway between 12 and 14.
  • 2:40 - 2:41
    So there you have it.
  • 2:41 - 2:43
    I have the middle of
    the first half is five.
  • 2:43 - 2:45
    I have the middle of the second half, 13.
  • 2:45 - 2:47
    To calculate the interquartile range,
  • 2:47 - 2:49
    I just have to find the difference
    between these two things.
  • 2:49 - 2:54
    So the interquartile range
    for this first example
  • 2:54 - 2:56
    is going to be 13 minus five.
  • 2:58 - 2:59
    The middle of the second half
  • 2:59 - 3:01
    minus the middle of the first half
  • 3:01 - 3:04
    which is going to be equal to eight.
  • 3:04 - 3:05
    Let's do some more of these.
  • 3:05 - 3:07
    This is strangely fun.
  • 3:07 - 3:09
    Find the interquartile range
  • 3:09 - 3:11
    of the data in the dot plot below.
  • 3:11 - 3:14
    Songs on each album in Shane's collection
  • 3:14 - 3:16
    and so let's see what's going on here
  • 3:16 - 3:20
    and like always, I encourage
    you to take a shot at it.
  • 3:20 - 3:22
    So this is just representing
    the data in a different way
  • 3:22 - 3:25
    but we could write this
    again as an ordered list
  • 3:25 - 3:26
    so let's do that.
  • 3:26 - 3:30
    We have one song or we have
    one album with seven songs
  • 3:32 - 3:33
    I guess you could say.
  • 3:33 - 3:34
    So we have a seven.
  • 3:34 - 3:39
    We have two albums with nine
    songs so we have two nines.
  • 3:40 - 3:44
    Let me write those, we have two nines
  • 3:44 - 3:46
    then we have three 10s.
  • 3:46 - 3:47
    Cross those out.
  • 3:47 - 3:50
    So 10, 10, 10 then we have an 11.
  • 3:52 - 3:54
    We have an 11.
  • 3:54 - 3:56
    We have two 12s, two 12s
  • 3:57 - 4:00
    and then finally, we
    have, I used those already
  • 4:00 - 4:02
    and then we have an album with 14 songs.
  • 4:02 - 4:03
    14.
  • 4:03 - 4:07
    So all I did here is I
    wrote this data like this
  • 4:07 - 4:09
    so we could see, okay,
    this album has seven songs,
  • 4:09 - 4:11
    this album has nine, this album has nine
  • 4:11 - 4:14
    and the way I wrote it,
    it's already in order
  • 4:14 - 4:15
    so I could immediately get,
  • 4:15 - 4:18
    I can immediately start
    calculating the median.
  • 4:18 - 4:20
    Let's see, I have one, two, three, four,
  • 4:20 - 4:23
    five, six, seven, eight, nine, 10 numbers.
  • 4:23 - 4:26
    I have an even number of numbers
    so to calculate the median,
  • 4:26 - 4:28
    I'm gonna have to look at
    the middle two numbers.
  • 4:28 - 4:33
    So the middle two numbers look
    like it's these two 10s here
  • 4:33 - 4:34
    because I have four to the left of them
  • 4:34 - 4:36
    and then four to the right of them
  • 4:36 - 4:39
    and so since I'm calculating
    the median using two numbers,
  • 4:39 - 4:41
    it's going to be halfway between them.
  • 4:41 - 4:43
    It's going to be the average
    of these two numbers.
  • 4:43 - 4:46
    Well, the average of 10 and
    10 is just going to be 10.
  • 4:46 - 4:48
    So the median is going to be 10.
  • 4:49 - 4:51
    Median is going to be 10
  • 4:53 - 4:55
    and in a case like this
    where I calculated the median
  • 4:55 - 4:57
    using the middle two numbers,
  • 4:57 - 5:00
    I can now include this
    left 10 in the first half
  • 5:00 - 5:03
    and I can include this
    right 10 in the second half.
  • 5:03 - 5:04
    So let's do that.
  • 5:04 - 5:09
    So the first half is going
    to be those five numbers
  • 5:09 - 5:11
    and then the second half is
    going to be these five numbers
  • 5:11 - 5:13
    and it makes sense 'cause
    I'm literally just looking at
  • 5:13 - 5:15
    first half it's gonna be five numbers,
  • 5:15 - 5:17
    second half is gonna be five numbers.
  • 5:17 - 5:19
    If I had a true middle number
    like the previous example
  • 5:19 - 5:21
    then we ignore that when we look
  • 5:21 - 5:22
    at the first and second half
  • 5:22 - 5:24
    or at least that's the
    way that we're doing it
  • 5:24 - 5:28
    in these examples but what's
    the median of this first half
  • 5:28 - 5:30
    if we look at these five numbers?
  • 5:30 - 5:31
    Well, if you have five numbers,
  • 5:31 - 5:32
    if you have an odd number of numbers,
  • 5:32 - 5:34
    you're gonna have one middle number
  • 5:34 - 5:38
    and it's going to be the one
    that has two on either sides.
  • 5:38 - 5:41
    This has two to the left
    and it has two to the right.
  • 5:41 - 5:43
    So the median of the first half,
  • 5:43 - 5:47
    the middle of the first
    half is nine right over here
  • 5:47 - 5:48
    and the middle of the second half,
  • 5:48 - 5:50
    I have one, two, three, four, five numbers
  • 5:50 - 5:52
    and this 12 is right in the middle.
  • 5:52 - 5:54
    You have two to the left
    and two to the right
  • 5:54 - 5:56
    so the median of the second half is 12.
  • 5:56 - 6:00
    Interquartile range is
    just going to be the median
  • 6:00 - 6:02
    of the second half, 12
  • 6:02 - 6:06
    minus the median of the first half, nine
  • 6:06 - 6:07
    which is going to be equal to three.
  • 6:07 - 6:09
    So if I was doing this
    on the actual exercise,
  • 6:09 - 6:11
    I would fill out a three right over there.
Title:
How to calculate interquartile range IQR | Data and statistics | 6th grade | Khan Academy
Description:

more » « less
Video Language:
English
Team:
Khan Academy
Duration:
06:12

English subtitles

Revisions