Presentation is loading. Please wait.

Presentation is loading. Please wait.

TESTING HYPOTHESES. Two ways of arriving at a conclusion 2. Inductive inference samplepopulation samplepopulation 1. Deductive inference.

Similar presentations


Presentation on theme: "TESTING HYPOTHESES. Two ways of arriving at a conclusion 2. Inductive inference samplepopulation samplepopulation 1. Deductive inference."— Presentation transcript:

1 TESTING HYPOTHESES

2 Two ways of arriving at a conclusion 2. Inductive inference samplepopulation samplepopulation 1. Deductive inference

3 IF YOUR DATA ARE: 1. Continuous data 2. Ratio or interval 3. Approximately normal distribution 4. Equal variance (F-test) 5. Conclusions about population based on sample (inductive) 6. Sample size > 10 samplepopulation

4 Imagine the following experiment: 2 groups of crickets Group 1 – fed a diet with extra supplements Group 2 – fed a diet with no supplements Weights 12.113.913.012.1 14.912.212.914.9 13.612.013.513.6 12.015.912.412.0 10.912.111.010.9 9.18.911.010.1 9.99.28.011.9 8.69.08.59.6 10.010.99.48.0 11.97.110.08.9 Mean = 12.8 Mean = 9.49

5 What you’re doing here is comparing two samples that, because you’ve not violated any of the assumptions we saw before, should represent populations that look like this: 9.4912.8 Are the means of these populations different?? Frequency Weight

6 Are the means of these populations different?? To answer this question – use a statistical test A statistical test is just a method of determining mathematically whether you definitively say ‘yes’ or ‘no’ to this question What test should I use??

7 IF YOU HAVEN’T VIOLATED ANY OF THE ASSUMPTIONS WE MENTIONED BEFORE…… Number of groups compared 2 other than 2 T -test Direction of difference specified? YesNo One-tailedTwo- tailed Does each data point in one data set (population) have a corresponding one in the other data set? YesNo Paired t-testUnpaired t-test Are the means of two populations the same? Are the means of more than two populations the same? Number of factors being tested 12>2 Does each data point in one data set (population) have a corresponding one in the other data sets? Two way ANOVA ANOVA YesNo One way ANOVA Repeated Measures ANOVA Other tests

8 A simple t-test 1. State hypotheses H o – there is no difference between the means of the two populations of crickets (i.e. the extra nutrients had no effect on weight) H 1 – there is a difference between the means of the two populations of crickets (i.e. the extra nutrients had an effect on weight)

9 A simple t-test 2. Calculate a t-value (any stats program does this for you) 3. Use a probability table for the test you used to determine the probability that corresponds to the t- value that was calculated. (for the truly masochistic)

10 A simple t-test 2. Calculate a t-value (any stats program does this for you) 3. Use a probability table for the test you used to determine the probability that corresponds to the t- value that was calculated. DataTest statisticProbability

11 Unpaired t test Do the means of Nutrient fed and No nutrient differ significantly? P value The two-tailed P value is < 0.0001, considered extremely significant. t = 7.941 with 38 degrees of freedom. 95% confidence interval Mean difference = -3.307 (Mean of No nutrient minus mean of Nutrient fed) The 95% confidence interval of the difference: -4.150 to -2.464 Assumption test: Are the standard deviations equal? The t test assumes that the columns come from populations with equal SDs. The following calculations test that assumption. F = 1.192 The P value is 0.7062. This test suggests that the difference between the two SDs is not significant. Assumption test: Are the data sampled from Gaussian distributions? The t test assumes that the data are sampled from populations that follow Gaussian distributions. This assumption is tested using the method Kolmogorov and Smirnov: Group KS P Value Passed normality test? =============== ====== ======== ======================= Nutrient fed 0.1676 >0.10 Yes No nutrient 0.1279 >0.10 Yes

12 Interpretation of p <.0001? This means that there is less than 1 chance in 10,000 that these two means are from the same population. In the world of statistics, that is too small a chance to have happened randomly and so the H o is rejected and the H 1 accepted

13 For all statistical tests that you’ll use, it is convention that the minimum probability that two samples can differ and still be from the same population is 5% or p =.05

14 Nonparametric Statistics (Nominal Data) & Goodness-of-Fit Tests

15 What happens if you violate any of the assumptions? Step 1 - Panic

16 What happens if you violate any of the assumptions? Step 1 - Panic Step 2 - It depends on what assumptions have been violated. AssumptionOther testsAnother solution? 1. Continuous dataYes 2. Ratio/intervalYes 3. Normal distributionYesTransform the data 4. Equal varianceYes - Welch’s 5. Sample PopulationYes 6. N<10YesTake more samples

17 Nonparametric Tests These tests are used when the assumptions of t-tests and ANOVA have been violated They are called “nonparametric” because there is no estimation of parameters (means, standard deviations or variances) involved. Several kinds: 1)Goodness-of-Fit tests - when you calculate an expected value 2)Non-parametric equivalents of parametric tests

18 Goodness-of-Fit Tests Use with nominal scale data e.g. results of genetic crosses Also, you’re using the population to deduce what the sample should look like

19 Classic example - genetic crosses Do they conform to an “expected’ Mendelian ratio? Back to our little ball creatures - Critterus sphericales Phenotypes: A_B_ A_bb aaB_ aabb Mendelian inheritance -Predict a 9:3:3:1 ratio

20 -sampled 320 animals A_B_A_bbaaB_aabb Observed (o)19453676

21 -sampled 320 animals A_B_A_bbaaB_aabb Observed (o)19453676 Expected (e)18060 20

22 -sampled 320 animals A_B_A_bbaaB_aabb Observed (o)19453676 Expected (e)18060 20 o - e14-77-14

23 -sampled 320 animals A_B_A_bbaaB_aabb Observed (o)19453676 Expected (e)18060 20 o - e14-77-14 (o - e) 2 19649 196

24 -sampled 320 animals A_B_A_bbaaB_aabb Observed (o)19453676 Expected (e)18060 20 o - e14-77-14 (o - e) 2 19649 196 (o - e) 2 e 1.08.82 9.8

25 -sampled 320 animals A_B_A_bbaaB_aabb Observed (o)19453676 Expected (e)18060 20 o - e14-77-14 (o - e) 2 19649 196 (o - e) 2 e 1.08.82 9.8 (o -e) 2 e   2 = = 1.08 +.82 +.82 + 9.8 = 12.52 df = number of classes -1 = 3

26 X 2 = 12.52Critical value for 3 degrees of freedomat.05 level is7.82 X 2 Table Conclusion: Probability of these data fitting the expected distribution is <.05, therefore they are not from a Mendelian population The actual probability of X 2 =12.52 and df = 3 is.01 > p >.001

27 A little X 2 wrinkle - the Yates correction Formula is (o -e) 2 e   2 = Except of df = 1 (i.e. you’re using two categories of data) Then the formula becomes (|o -e| - 0.5) 2 e   2 =

28 A second goodness-of-fit test G-test or Log-Likelihood Ratio Use if |o - e | < e e.g. if o is 12 and e is 7 G = 2 o ln= 4.60517 * o log 10 oeoe oeoe 

29 Type of dataNumber of samples Are data related? Test to use Nominal2YesMcNemar Nominal2NoFisher’s Exact Nominal>2YesCochran’s Q Summary!

30 Type of dataNumber of samplesAre data related?Test to use Nominal2YesMcNemar Nominal2NoFisher’s Exact Nominal>2YesCochran’s Q Ordinal1NoKomolgorov- Smirnov Ordinal+2YesWilcoxon (paired t-test analogue) Ordinal+2NoMann Whitney U (unpaired t-test analogue) Ordinal+>2NoKruskal Wallis (analogue of one- way ANOVA Ordinal>2YesFriedman two-way ANOVA All of the parametric tests (remember the big flow chart!) have non-parametric equivalents (or analogues)


Download ppt "TESTING HYPOTHESES. Two ways of arriving at a conclusion 2. Inductive inference samplepopulation samplepopulation 1. Deductive inference."

Similar presentations


Ads by Google