Biomeasurement www.biomeasurement.net Continued from last week: t- and Mann-Whitney U tests Background reading: Chapter 7 Lecture Content • Comparing t- & MWU tests • t-test • Mann Whitney U test Mann-Whitney U Test • • • • • Comparison to t-Test When to use Example data Four steps Example from literature Similarities Bone Density (g/cm2) Females 0.972 0.732 0.874 0.943 1.024 0.755 0.779 1.007 0.816 0.755 0.871 0.721 0.727 0.796 0.612 0.775 0.849 0.773 0.649 0.865 Males 0.905 1.016 0.873 0.74 0.861 0.817 0.897 0.962 0.851 0.821 0.763 0.876 0.944 0.993 0.774 0.785 0.892 1.076 0.888 0.865 Brine Shrimp Length (mm) Medium Salinity 5.5 6.0 5.0 7.0 5.5 6.0 7.0 8.0 6.0 8.0 6.0 7.0 6.0 7.0 6.0 8.0 6.0 7.0 7.5 6.0 7.5 High Salinity 6.0 7.0 7.5 6.0 7.5 8.0 11.0 9.0 8.0 11.0 8.0 8.0 7.0 7.0 7.0 9.0 . . . . . Birth weight (kg) of babies born to Non smokers Heavy smokers 3.99 3.18 3.79 2.84 3.60 2.90 3.73 3.27 3.21 3.85 3.60 3.52 4.08 3.23 3.61 2.76 3.83 3.60 3.31 3.75 4.13 3.59 3.26 3.63 3.54 2.38 3.51 2.34 2.71 • Difference • Two samples • Unrelated Differences t-test • Parametric • Scale data only Mann-Whitney U test • Nonparametric • Scale or ordinal data Speed of swimming Medium Salinity High Salinity Slow Fast Fast Medium Slow Very slow Very Fast Very Slow Slow Fast Medium Slow Fast Slow Very Fast Fast Medium Very slow Slow Very Fast Very Fast Very Fast Fast VerySlow Time spent Playing (hours/day) Enrichment Control 4.5 4.3 5.3 6.4 4.9 3.7 5.2 3.5 6.3 7.8 4.3 4.6 5.1 When to use • • • • Difference. Two samples. Unrelated data. Dependent variable: Scale level Do not use if... • Comparing frequency distributions. Example Data Bone Density (g/cm2) Females 0.972 0.732 0.874 0.943 1.024 0.755 0.779 1.007 0.816 0.755 0.871 0.721 0.727 0.796 0.612 0.775 0.849 0.773 0.649 0.865 Males 0.905 1.016 0.873 0.74 0.861 0.817 0.897 0.962 0.851 0.821 0.763 0.876 0.944 0.993 0.774 0.785 0.892 1.076 0.888 0.865 Choosing Chart for Graphs Tests on counts/frequencies For counts/frequencies in categories Tests of Relationship For scale/ordinal data from two variables Pie Charts Scatterplots 1 set of Categories 2 sets of Categories Regression Correlation One Pie Chart Two Pie Charts Scatterplot Scatterplot Tests of Difference For scale/ordinal dependent variable data in categories distinguished by the independent variable Errorplots or Boxplot ©Hawkins & Carter 2004 Parametric Nonparametric Errorplots Boxplots The Four Steps 1. Construct a Null Hypothesis (Ho). 2. Decide Critical Significance Level (a). 3. Calculate Statistic. 4. Reject or Accept the Null Hypothesis. 1. Construct Ho In general no difference between the samples. Ho: There is no difference between the bone density of males and females over 50 years old. 2. Decide a. a = 5% = 0.05. 3. Calculate Statistic. U Size of sample 1 Sum of ranks of sample 2 Check: U1 + U2 = n1 n 2 U is the the lower value of U1 or U2. More about R R1 R2 U U = 120.5 n1 = 20 n2 = 20 Using SPSS Dependent Variable Independent Variable 4. Reject or Accept. Using Critical Values. Reject if your t is bigger than tcritical. Where do you get these from? Using P Values Reject if P is less than or equal to a. Using Critical Values. If U </= Ucritical REJECT H0 significant result. From... Step 2: a = 0.05 120.5< 273 Reject Bone density between males & Step 3: U=120.5, n1=20, n2=20 females over 50 is different Using P Values. If P </= a reject the null hypothesis. If P > a accept the null hypothesis. 0.032< 0.05 Reject Bone density between males & females over 50 is different Example from Literature Drews (1995), BEHAVIOUR 133 The pattern and context of injuries was studied in a troop of yellow baboons in Mikumi National Park (Tanzania). TABLE 7. Median and range of healing times in days for baboon injuries. N Median Total sample* 35 23.0 Small injuries (<5cm) 15 14.0 Large injuries (>5cm) 11 24.0 Min 8 8 10 Max 120 114 120 * The sample is composed of 24 cuts, 4 punctures, 1 tear, 1 case of limping, 1 bruise, and 3 injuries of unspecified shape. Quote from results: The difference between small and large wounds (Table 7) was not statistically significant (Mann-Whitney test, Z= -1.461, N1=15, N2=11, p=0.14). What is Z? - bone example revisted. Back to baboons…. QUESTIONS: • What were the two samples? Sample sizes? • What might the raw data have looked like? • Why might he have used a MannWhitney U test instead of a t-test? Lecture Content • Comparing t- & MWU tests • t-test • Mann Whitney U test