Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Tests for Two Populations Testing a difference in parameters 1 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Equal variances t test 2 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Equal variances t test Unequal variances t test 2 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Equal variances t test Unequal variances t test Proportion test 2 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Equal variances t test Unequal variances t test Proportion test Two sample bootstrap 2 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test 2 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test We can extend the T test to compare two population means The horned lizard has a frill of spikes around its head to provide protection from predators Researchers want to compare the spikes of live and dead lizards 3 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Samples were taken from each population and the longest spike on each lizard was measured in mm Is there any difference in the size of the spikes between the two populations We want to formally compare dead vs alive 4 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Here is a table of numeric summaries n x s Dead 10 20 78 2 22 Alive 12 23 16 2 76 The alive group tends to have larger spikes and both groups have a similar sample sd 5 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Two histograms with consistent axes can be used 6 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test We can also look at side by side boxplots 7 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Use a qq plot to assess the normality of each group 8 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test The null is that the spike lengths are the same HA D A H0 D A H0 D A 0 versus HA D A 0 versus We are testing the difference between two means against a null value of 0 9 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test If the true means are the same then XD XA should be close to 0 The general form of a T test statistic is point estimate value under H0 estimated standard error XD XA estimates D A and the value under H0 is 0 10 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Suppose the dead and live lizards have the same population variance 2 Then V XD XA 2 nD 2 nA So the standard error is se XD XA cid 17 1 nA 2 cid 16 1 cid 114 1 nD 1 nA nD 11 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test cid 114 1 cid 114 1 se XD XA 1 nA nD We estimate the common population sd with a pooled standard deviation from the data se XD XA sp 1 nA nD 12 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test The pooled sd is a weighted average of the groups cid 115 n1 1 s 2 1 n2 1 s 2 2 sp n1 n2 2 The weights are n1 1 and n2 1 cid 114 10 1 2 222 12 1 2 762 10 12 2 sp 2 531 13 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Our two sample t test statistic is cid 113 1 XD XA 0 1 sp nA nD T Our null dist is a T with nD nA 2 df t20 Calculate tobs from our data and compare it to t20 with a rejection region or p value 14 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test T test assumptions Normality Independence of data and groups Equal variances We need sD and sA to be close enough that we can assume D A Typically we check 0 5 2 sD sA 15 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test cid 113 1 XD XA 0 1 sp nA nD T xD 20 78 nD 10 xA 23 16 nA 12 Use sp 2 531 Calculate tobs for this data Use the t20 distribution to complete the test with 0 05 16 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test We can also build a 95 CI for D A xD xA t20 0 025 sp cid 114 1 1 nA nD 4 64 0 12 This interval does not contain 0 17 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test In general we can test for any difference in means HA 1 2 0 H0 1 2 0 versus The test statistic is cid 113 1 X1 X2 0 1 sp n2 n1 T and the null distribution is a t distribution with n1 n2 2 degrees of freedom 18 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test What if we can t assume equal variances Concrete is often reinforced with a different material Concrete beams with fiberglass and carbon reinforcement were poured and the strength of each beam was measured We have hypotheses H0 F C 0 versus HA F C 0 19 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Fiberglass Carbon s x n 8 33 15 2 63 11 43 53 5 06 The mean and sd for carbon looks higher Let s assess the assumptions for an equal variances T test Independence is probably safe to assume automatically 20 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test Both groups appear to be normal 21 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum test A boxplot shows that Carbon is more spread out 22 62 Equal variances t test Unequal variances t test Proportion test Two sample bootstrap Rank sum …
View Full Document