
Title:
Formula for Location of Median  Intro to Descriptive Statistics

Description:

Let's go over each of these individually. And let's say that n is 4. So, we

have four values here in order, from least to greatest. So if n is 4, the rank

of this value is 1, and the rank of this value is 4. And the actual values are

these. So, for this one, n divided by 2 would be 4 divided by 2, which is 2. X

sub 2 is this one. Is this the median? No, because since it's an even data set,

the median is going to be the average of these 2. But now, we know that this

data value is Xn divided by 2. The rank n minus 1 divided by 2 would be 4 minus

1, which is 3. And then divided by 2, which is 1.5. And that doesn't exist. We

don't have any with a rank of a decimal value, only integer value. What about

this one? We have X sub n plus 2 plus X sub n plus 2 plus 1. So, if this is the

rank n divided by 2, n divided by 2 plus 1 is 3. And then, if we divide it by

2, we get the average of these two values. So here, we have our answer. And you

see that this value is this third one. Using this logic, we can extend these

formulas for any even numbered data set. Okay, let's say that n is 5. So, we

have 5 values in order. Can we divide 5 by 2? No. If n is odd, then we can't

have a decimal rank. What about 5 plus 1 divided by 2? Well, that's 6 divided

by 2. And 6 divided by 2 is 3. So that means we would get the value in the

third rank. And that is the median. Let's still explore the others. If we have

5 minus 1 divided by 2, that gives us 4 divided by 2, which is 2. And the value

in this second rank is not our median. And finally, we have 5 divided by 2,

which is 2.5, plus 1, which is 3.5. And again, we don't have a value that's

ranked 3.5, only integer values. This is probably kind of confusing. So before

we finish this solution, let's just apply this one to the Udacion's Facebook

friend data set that we had before. Remember, we had 27 values. So, we want the

value in the n plus 1 over 2 place. So if we plug n in, then we get 27 plus 1

divided by 2, which is 28 divided by 2, which is the 14th place. And then, when

we looked for that value in the 14th way, we found that the median was 479.

Hopefully, that makes some sense and that it's getting you more familiar with

using symbolic notation. Good Job.