Vous êtes sur la page 1sur 2

Instructions for performing a Kruskal-Wallis test and post hoc Mann-Whitney U-test in Minitab.

First you need to load the MINI-tab program either using the computers in the library or in the 5 West
I suggest you set up a table of data just as I drew on the board during the practical. Thus you need 6
columns which I suggest you label Mount A, Mount B, Mount C, Shake A, Shake B, and Shake C. Then
type in the data going down the columns for each behaviour and treatment. You should end up with the
values in columns c1-c3 for Attempt Mounting behaviour and in columns c4-c6 for Shake behaviour. If
you now click on Stat (found on top menu bar) > Basic Statistics > Display Descriptive Statistics and then
click on each of the columns listed in the dialogue box you will get a table of summary statistics printed in
the session window for each of the columns. If you also click on the Graphs... button before clicking OK
then you can also get plot of your data for each column (I suggest a histogram plot). This will give you all
the summary data I requested for your report. All OK so far?
Now for the Statistical tests.
Kruskal-Wallis test: Minitab requires data for this test to be stacked into one column. To achieve this type
in the following at the MTB > (this assumes your data is typed into Minitab in the columns c1 - c6 as
indicated above) making sure the punctuation is identical. First, click on the top session window, then click
Editor in the top row of options and then click on Enable Command Language. This will raise the MTB
> cursor in the session window where you can type various commands to control Mini-Tab. Now tell MiniTab to stack your data as follows;
stack c1 c2 c3 c7;
subs c8. (notice semi-colon and full stop

these are important)

stack c4 c5 c6 c9;
subs c10.
You will now have four additional columns c7-c10. C7 now has all the Mount data stacked while c9 has all
the Shake data stacked. Column c8 contains numbers 1, 2 and 3 indicating which data set the numbers in
c7 originally came from. Likewise the numbers in c10 refer to the data now stacked in c9.
Now perform the KW test by clicking on Stat > Nonparametrics > Kruskal-Wallis...
A dialogue box will open. Click your cursor in the 'RESPONSE' box, now double click on c7 in the
adjacent list. Now click your cursor in the 'FACTOR' box, now double-click on c8 in the adjacent list. [NB
c7 contains the stacked Mount data, while c8 indicates the origin of the data in c7]. Now click OK.
The results of the KW test will now be presented in the session window.
Check that the Median values given agree with those obtained earlier in the descriptive stats. Present your
data as;
H(df)= value, P< value
insert the number of degrees of freedom, the H value and P value accordingly.
Thus, for example,
H(2)=21.86, P<0.001 (adjusted for ties)
Repeat this for the Shake data.
If the result of the KW test indicates significant variation in the data (i.e. P<0.05) then you are justified in
comparing groups of data using the Mann-Whitney U-test.

To compare Mount A to Mount B, thus;

Click on Stat > Nonparametrics > Mann-Whitney... A dialogue box will open. Click your cursor in the
'FIRST SAMPLE' box, now double click on c1 in the adjacent list. Now click your cursor in the
'SECOND SAMPLE' box, now double-click on c2 in the adjacent list.[NB c1 contains the Mount data for
treatment A, while c2 contains the Mount data for treatment B]. Now click OK. The results for the
MWUT are tabulated in the session window.
Now repeat the MWUT for all the other justifiable comparisons.
All you have to do now is draw up 2 summary box plots to summarise the data for both Mount and Shake
behaviour against treatment group (A, B or C) and indicate which groups are significantly different from
each other.