MANN WHITNEY U IN MINITAB, SPSS, AND R Contents Required Software ..................................................................................................................................... 1 Introduction to U........................................................................................................................................ 1 The Dataset ................................................................................................................................................. 2 The U in Minitab ........................................................................................................................................ 3 The U in SPSS.............................................................................................................................................. 5 The U in R.................................................................................................................................................... 7 The APA Write Up ..................................................................................................................................... 8 The Template .......................................................................................................................................... 8 The Example ........................................................................................................................................... 8

Required Software

Minitab 16

SPSS 20

Importable Text File

Project File

SAV File

for R-Studio

Introduction to U The Mann-Whitney’s U test is the nonparametric version of the independent (two) samples t-test. The U should be used when both samples are taken from different populations. The test requires the use of ranked data and it’s best to leave the theory to the statistics package. Nonetheless the test follows the hypothesis test given α = 0.05:  Null Hypothesis: The two samples come from identical populations.  Alternative Hypothesis: The two samples come from different populations. You may be wondering how a test could tell you whether two samples come from identical populations. No test can do that unless you make an assumption:  Both populations are the same, except possibly for a difference in their medians regarding a single variable. Thus, if the medians are the same, then the populations are the same. Conversely, if the medians differ, so must the populations. The U really uses a test determining the equality of medians for both samples. Thus, if the medians are the same, then the U test may infer the populations are the same. Neat trick, eh?

The Dataset The dataset is a nonnormal dataset listing IQs for two samples derived from two populations. One population is addicted to M&M’s and yields the MandMs sample. The other population hates M&M’s and yields the NoMandMs sample. The U will tell us whether the samples imply the populations are the same. Here’s the data: NoMandMs MandMs 105

96

119

99

100

94

97

89

96

96

101

93

94

88

95

105

98

88

The U in Minitab We will calculate U and determine whether to reject the null hypothesis of identical populations. Step 1: Open the Minitab project file and select Stat->Nonparametrics->Mann-Whitney.

Step 2: We have to tell Minitab the sample names and our alternative hypothesis. Place one sample in each of the First and Second Sample fields. Make sure the Alternative field is not equal as to make it match the alternative hypothesis presented a the beginning of this guide. (You should also recall that not equal is statspeak for a two tailed test.) Click OK.

Step 3: Read the results!

Note: ETA is Minitab-speak for the word median. (I know, weird. Welcome to Minitab…) Thus ETA1 is the median of first sample and ETA2 is the median of the second sample from the previous screenshot. Now you have to be careful. Minitab reports the test is significant although p > α! How the heck is it significant when p > α? Easy, we blame the ties in the data! Ties occur when both samples share a value while causing the p-value calculation to fail. Our samples both contain a 96; thus 96 is a tie. (The concept comes from sports when both teams have the same score. We say the teams are tied.) Ties in statistics are common and Minitab correctly recalculates the p-value as to undo any damage left behind by the tie. All the corrections occur in memory and you will not see them displayed because they are not humanly

comprehensible. (They are ugly—trust me.) However, the programmers of Minitab were smart enough to tell us the test is significant and to reject the null hypothesis. Thus we know the medians of the samples are different, and thus, the populations are different!

The U in SPSS We will calculate U and determine whether to reject the null hypothesis of identical populations. Step 1: Open the SPSS SAV file and notice the data is stacked using a Group variable. The stacking scheme is: IQ

Group

NoMandMs

1

MandMs

2

Select Analyze->Nonparametric Test->Legacy Dialogs->2 Independent Samples.

Step 2: The IQ variable contains the measurements and you place it into thte Test Variable List box. The Group variable divides the dataset into group 1 (the NoMandMs group) and group 2 (the MandMs) group. Place Group into the Grouping Variable box and notice SPSS inserts two question marks besides the Group variable. Now check Mann-Whitney U.

Step 3: Click Define Groups… and you’ll find that SPSS wants you to identify group labels. Insert the values shown so SPSS understands how we denoted the groups using the values 1 and 2. Click Continue, notice the question marks are fixed, and then OK.

Step 4: Read the results!

Now you have to be careful. You want to read the p-value for the Asymp. Sig (2-tailed) because it correctly accounts for ties. Thus we find that p = 0.046 and reject the null hypothesis. If SPSS ever mentions the word ties, you want to use the asympototic significance because it is the corrected p-value when ties emerge within the dataset. If there are no ties, then you should notice the asympototic and exact values of p are equal. But what is a tie? Ties occur when both samples share a value while causing the p-value calculation to fail. Our samples both contain a 96; thus 96 is a tie. (The concept comes from sports when both teams have the same score. We say the teams are tied.) Ties in statistics are common and SPSS correctly recalculates the p-value as to undo any damage left behind by the tie. All the corrections occur in memory and you will not see them displayed because they are not humanly comprehensible. (They are ugly—trust me.) However, the programmers of SPSS were smart enough to tell us the test is significant and to reject the null hypothesis. Thus we know the medians of the samples are different, and thus, the populations are different!

The U in R Step 0: You will need to have installed the coin package. You may install it as follows: packages.install(“coin”) You can load the coin package as follows: library(“coin”)

We will calculate U and determine whether to reject the null hypothesis of identical populations. I believe this to be a fun calculation teaching you a lot about R. Step 1: Import your data, store it as a dataframe, and attach it: df<-as.data.frame(MannWhitneyUDataStacked) attach(df) You should notice the data is stacked using a Group variable. The stacking scheme is: IQ

Group

NoMandMs

1

MandMs

2

Step 2: Run the wilcox_test(). You have to tell R that the Group is the factor by using the as.factor() technique. Notice the tilde (~). The tilde is important because it tells R that IQ is has a factor following the tilde: wt<-wilcox_test(IQ~as.factor(Group)) The result of the test is stored in wt. Type wt and press enter as to see the results of the test: Asymptotic Wilcoxon Mann-Whitney Rank Sum Test data: IQ by as.factor(Group) (1, 2) Z = 1.994, p-value = 0.04615 alternative hypothesis: true mu is not equal to 0

Thus we find that p = 0.046 and reject the null hypothesis. R reports the asympototic significnce because it is the corrected p-value when ties emerge in the dataset. Ties occur when both samples share a value while causing the p-value calculation to fail. Our samples both contain a 96; thus 96 is a tie. (The concept comes from sports when both teams have the same score. We say the teams are tied.) Ties in statistics are common and R correctly recalculates the p-value as to undo any damage left behind by the tie. All the corrections occur in memory and you will not see them displayed because they are not humanly comprehensible. (They are ugly—trust me.) However, the programmers of R were smart enough to tell us the test is significant and to reject the null hypothesis. Thus we know the medians of the samples are different, and thus, the populations are different!

The APA Write Up The template reveals whether you rejected the null hypothesis.

The Template A Mann-Whitney U test was conducted to evaluate the hypothesis that [group 1] and [group 2] have equal [variable name] medians. The results of the test [rejected or failed to reject] the null hypothesis and inferred the samples were derived from [different or the same] populations, [z or W] = #, p = #.

The Example A Mann-Whitney U test was conducted to evaluate the hypothesis that non-consumers of M&Ms and consumers of M&Ms have equal IQ medians. The results of the test rejected the null hypothesis and inferred the samples were derived from different populations, z = 1.994, p = 0.046.

Mann Whitney U.pdf

There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Mann Whitney ...

805KB Sizes 1 Downloads 234 Views

Recommend Documents

Mann-Whitney Test
Treatments. N. Mean Rank. Sum of Ranks. Treatment A (new hybrid). 2. 4.00. 8.00. Treatment B (current variety). 3. 2.33. 7.00. Total. 5. ShrubGirth. Mann-Whitney U. 1.000. Wilcoxon W. 7.000. Z. -1.155. Asymp. Sig. (2-tailed) .248. Exact Sig. [2*(1-ta

Five-Point Likert Items: t test versus Mann-Whitney ...
Likert questionnaires are widely used in survey research, but it is unclear whether the item data should be investigated by means of parametric or nonparametric ...

whitney westgate westbound.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. whitney ...

DigitalPlayground Whitney Westgate.pdf
Whoops! There was a problem loading this page. Retrying... Whoops! There was a problem loading this page. Retrying... DigitalPlayground Whitney Westgate.pdf. DigitalPlayground Whitney Westgate.pdf. Open. Extract. Open with. Sign In. Main menu. Displa

720 whitney westgate.pdf
720 n. larrabee, two river place, river north in chicago, illinois. Download. redirected 2014 x264 720p unrated brrip dualaudio. Download redirected 2014 x264 720p unrated brrip dualaudio. Dated material do not delay cases reported. 15698 whitney ln,

whitney westgate westbound.pdf
Mcdonald 39 s uk mcdonalds.co.uk. Jeff petrea fidopetey twitter. Panoramio photos by. www.photographersnature.combnsf. Tacoma daily index, may 08, 2013 ...

understanding nutrition whitney pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. understanding ...

Whitney westgate ariana marie
Gangsta 03 mp4.73187368813 ... seeks Friar's help,and in return headvises her to takeasleeping-draught, which forever ... Tony buzan speed memory.pdf.

cindy hope and whitney conroy.pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. cindy hope and ...

babbu mann hashar movie songs.pdf
Babbu mann hashar movie songs. Page 1 of 1. babbu mann hashar movie songs.pdf. babbu mann hashar movie songs.pdf. Open. Extract. Open with. Sign In.

1491 charles mann pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. 1491 charles ...

Whitney Sosnoski LEGL140 000270084 NAME ...
NAME. ADDRESS. OCCUPATION. CLASS AND NOMINAL AMOUNT. OF SHARES. DATE. NO. OF. CERTIFICATE. ISSUED. NO. OF. CERTIFICATE.

whitney houston funeral program pdf
whitney houston funeral program pdf. whitney houston funeral program pdf. Open. Extract. Open with. Sign In. Main menu. Whoops! There was a problem ...

the mockingbirds daisy whitney pdf
pdf. Download now. Click here if your download doesn't start automatically. Page 1 of 1. the mockingbirds daisy whitney pdf. the mockingbirds daisy whitney pdf.

Mann - Essentials of Human Nutrition 2e (Oxford, 2002).pdf ...
Page 3 of 683. Oxford University Press makes no representation, express or implied, that the drug. dosages in this book are correct. Readers must therefore always check the product infor- mation and clinical procedures with the most up-to-date publis

Mann - Essentials of Human Nutrition 2e (Oxford, 2002).pdf ...
and data sheets provided by the manufacturers and the most recent codes of conduct. and safety regulations. The authors and the publishers do not accept ...