Ordering values: Ranking
Which test should you use?
The most common statistical test that you might come across in the literature is the t-test. There are, in actual fact, a few t-tests, but the one most are familiar with, is of course, Student's t-test and its ubiquitous p-value. Not everyone, though, knows that the name Student was actually a pseudonym, used by William Gosset (1876 - 1937). Parametric tests have very strict assumptions that must be met before their use is justified. In this lesson we take a closer look at these tests, but perhaps more importantly, their strict assumptions. Once you know these, you will be able to identify when these tests are used inappropriately.
Introduction to nonparametric tests3:18
Checking for normality5:07
Thinking nonparametrically2:27
Comparing paired observations: Signs2:42
Ordering values: Ranking2:33
Paired comparisons: Sign ranks2:22
Summation of ranks: Rank sums6:04
Comparing two populations: Mann-Whitney-U test4:07
More nonparametric tests5:09
Case study 313:40
選擇語言德語(German)泰米爾語英語(English)
So in this section, let's talk about ranking.
Now, if we don't have a normal distribution to work from.
If our sample data does not come from a population parameter that is normally
distributed, we've got to create a distribution somehow.
We can't use the normal distribution.
We've got to come up with one.
And the way that we do it, is we rank the values.
Ranking from lowest to highest, in ascending order.
Now, look at this.
Right at the top there, imagine these are our values.
We've got 13, 12, 2, 14, 15, 3, and 40.
And I can certainly rank them, or at least place them in ascending order.
So, we start at the smallest value and end up with the largest one.
2, 3, 12, 13, 14, 15, 40.
And I can now just simply assign a rank to them.
1, 2, 3, 4, 5, 6, 7.
And that 1, 2, 3, 4, 5, 6, 7 is what we're going to work with.
We cannot work with the actual data values because they're not normally distributed.
We can't use a mean, a mean would not be a proper representation of those values.
We are looking at using the median.
And because the median is a value for
which half of the values will be less than and the other half more than it's important for
us to know that rank and it's that rank that we're actually going to work with.
Now, you might ask yourself what if there is a tie?
I mean, if we're dealing with sample sets of 60, 100 patients in each group,
we are going to have, or you might at least have some ties.
What do we do then?
So, imagine we have instead of the first 13, it was a 12.
So, if we wrote them in order there it would be 2,3,12,12,14, 15 and 40.
What do we do, what do we do with these ties?
And as you can see, it's actually quite easy.
The 2 would be ranked 1, the 3 would be ranked 2, and
the two 12s would have had a rank of 3 and 4, but they equal,
so you enter 3 and 4, 7 divided by 2 because they're two variables, so 3.5.
So they each get a rank of 3.5.
But remember they take up two positions, so the next one, the 14, actually has to
take up rank number 5 because 1,2,3,4,5 and that gives you the 3.5, 3.5.
So you just add all of them and divide by how any there are.
So that will leave you with a 3.5,
3.5 because it was 7 divided by two and the next rank 6 and 7.
So ranks are very, very important.
It's what we're going to use to do most nonparametric tests.
In the next section, I'm just going to use sign ranks.
So we're gonna combine what we've done up to now.