Means Tests MARE 250 Dr. Jason Turner Means Tests Type of stats test called a means test Tests for differences in samples based upon their average (mean) and standard deviation (variance) Several versions from 1 sample, 2 sample, through multiple samples Means Tests Response – variable of interest; variable you collect - #Fish, %Coral cover, temperature, salinity, etc Factor – variable by which response is divided; categorical - location, Date, Gender, Species Level – components of factor; - Location (Puako, Hilo Bay), Date (Jan, Feb), Gender (♂, ♀) Means Tests 2 Types: 1) Parametric Means tests – have defined assumptions including normally distributed data 2) Nonparametric Means tests – have few/no assumptions Parametric vs. Nonparametric Parametric means tests – require data to be normal, etc (assumptions) Nonparametric tests – do not require data to be normal (assumptions) Parametric vs. Nonparametric Parametric means tests – include 2 sample t-test, ANOVA Nonparametric means tests – include Mann Whitney (t-test), Kruskal Wallace (ANOVA) Means Tests Parametric – has strict assumptions 1-Sample t-test 2-Sample t-test Pooled t-test Non-pooled t-test Paired t-test Non-parametric – no assumptions 1-Sample Wilcoxon 2 Sample t-test (Mann-Whitney) When to Parametric 1 or 2-Sample t-test: 1. Requires large sample size (n=3) 2. Requires normally distributed data 3. Outliers can significantly confound results Parametric testing is the “gold standard” – it is the type of test we attempt first Has very strict criteria called assumptions When to Parametric Has 4 Assumptions: 1. Random Samples – collected randomly 2. Independent Samples – equal chance 3. Normal Populations (or large samples; n=3) 4. Variances (std. dev.) are equal When to Parametric How do we assess these 4 Assumptions: 1. Random Samples – Sampling design 2. Independent Samples – Sampling Design 3. Normal Populations - Normality test* 4. Variances - Equal Variance test* When to Nonparametric Non-parametric 1 Sample t-test (Wilcoxon) or 2 Sample t-test (MannWhitney): 1. Small sample size ok 2. Does not require normally distributed data 3. Outliers do not confound results When to Nonparametric Non-parametric test are used heavily in some disciplines – although not typically in the natural sciences Used when data are not normal, or low sample size, low “power” When to Nonparametric When do we run Nonparametric tests? 1) Sample size is too small for parametric 2) Fail assumptions tests (Normality, Equal Variance) 3) Fail to transform (rescale) data to meet assumptions Tests with One Mean Parametric 1-Sample t-test 3 assumptions (not equal variance) Nonparametric Wilcoxon test Tests with One Mean Also called 1 mean t-tests Compare collected dataset with a value For example: The FDA has issued fish consumption advisories for populations containing Hg levels greater than 1.0 ppm. Tests with One Mean Want to test whether Yellowfin tuna have levels of Hg below 1.0 ppm Blue marlin 8.3 FDA (1.0) Mako shark Wahoo King mackerel Cobia Little tunny Warsaw grouper Gag grouper Greater amberjack Key Blackfin tuna Mean SD Yellowfin tuna Dolphin 0 1 2 3 Hg (ppm) 4 5 10 15 Tests with One Mean H0: μAhi Hg = 1.0ppm H0: μAhi Hg ≠ 1.0ppm Tests with One Mean Parametric 1-Sample t-test – uses the mean and variance (std. dev.) of raw data Nonparametric Wilcoxon test – uses the median of the raw data Tests with Two Means Parametric - require 4 assumptions 2-Sample t-test Pooled Unpooled Paired Nonparametric Mann-Whitney test When to Parametric How do we assess these 4 Assumptions: 1. Random Samples – Sampling design 2. Independent Samples – Sampling Design 3. Normal Populations - Normality test* 4. Variances - Equal Variance test* Tests with Two Means Compare means from two groups of raw data H0: μurchins deep = μurchins shallow Ha: μurchins deep ≠ μurchins shallow Most widely applied statistical tests Variety of Parametric tests (3) Single Nonparametric test Which Test to Run How do we assess these 4 Assumptions: 1. Random Samples – Sampling design 2. Independent Samples – Sampling Design 3. Normal Populations - Normality test* 4. Variances - Equal Variance test* Paired T-test Parametric t-tests – data not independent Paired t-test For example: Growth study on mark-recaptured ahi July 2011 July 2012 Paired T-test Parametric t-tests Paired t-test Conduct a paired t-test - If the samples are not independent Used when there is a natural pairing of the members of two populations Calculates difference between the two paired samples Which Test to Run How do we assess these 4 Assumptions: 1. Random Samples – Sampling design 2. Independent Samples – Sampling Design 3. Normal Populations - Normality test* 4. Variances - Equal Variance test* Normality Test H0 hypothesis: data normally distributed Probability Plot of Weight Normal 99.9 Mean StDev N RJ P-Value 99 95 Percent 90 80 70 60 50 40 30 20 10 5 1 0.1 -200 -100 0 100 200 Weight 300 192.2 110.5 143 0.955 <0.010 If p value is less than α, then reject H0 Data does not follow a 400 500 distribution 600 normal Mann-Whitney T-test Nonparametric t-tests Mann-Whitney Compare medians from two groups of raw data H0: μurchins deep = μurchins shallow Ha: μurchins deep ≠ μurchins shallow Which Test to Run How do we assess these 4 Assumptions: 1. Random Samples – Sampling design 2. Independent Samples – Sampling Design 3. Normal Populations - Normality test* 4. Variances - Equal Variance test* Which Test to Run Parametric t-tests Non-pooled t-test Conduct a Non-pooled t-test - you cannot “pool” the samples because the variances are not equal In Minitab – do not check box – “Assume Equal Variances” when running 2-sample ttest Which Test to Run Parametric t-tests Pooled t-test Conduct a pooled t-test - you can “pool” the samples because the variances are assumed to be equal In Minitab - check box – “Assume Equal Variances” when running 2-sample t-test When Do I Do The What Now? “Well, whenever I'm confused, I just check my underwear. It holds the answer to all the important questions.” – Grandpa Simpson If all 4 assumptions are met: Conduct a pooled t-test - you can “pool” the samples because the variances are assumed to be equal If the samples are not independent: Conduct a paired t-test When Do I Do The What Now? “Well, whenever I'm confused, I just check my underwear. It holds the answer to all the important questions.” – Grandpa Simpson If the variances (std. dev.) are not equal: Conduct a non-pooled t-test If the data is not normal or has small sample size: Conduct a non-parametric t-test (MannWhitney)