1 00:00:00,000 --> 00:00:08,490 A t-test is the comparison 2 00:00:08,490 --> 00:00:10,530 of average values between two groups. 3 00:00:10,530 --> 00:00:13,500 For example, you could be comparing whether teaching 4 00:00:13,500 --> 00:00:15,435 evaluations of male instructors 5 00:00:15,435 --> 00:00:17,595 is the same for female instructors. 6 00:00:17,595 --> 00:00:19,800 You can either assume that the variance or 7 00:00:19,800 --> 00:00:22,815 standard deviation is equal or unequal. 8 00:00:22,815 --> 00:00:25,215 How do we determine this? 9 00:00:25,215 --> 00:00:28,350 We have the teaching evaluation data. 10 00:00:28,350 --> 00:00:30,480 We calculated the average teaching evaluation 11 00:00:30,480 --> 00:00:32,010 for female instructors to be 12 00:00:32,010 --> 00:00:36,280 3.9 with a standard deviation of 0.53. 13 00:00:36,280 --> 00:00:38,180 The average teaching evaluations for 14 00:00:38,180 --> 00:00:40,085 male instructors on the other hand, 15 00:00:40,085 --> 00:00:46,085 was calculated as 4.06 with a standard deviation of 0.55. 16 00:00:46,085 --> 00:00:48,050 When we conduct a t-test, 17 00:00:48,050 --> 00:00:49,730 we are faced with whether to assume 18 00:00:49,730 --> 00:00:51,770 equal or unequal variances. 19 00:00:51,770 --> 00:00:53,420 We have a t-test called 20 00:00:53,420 --> 00:00:57,170 Levene's test to determine the equality of variances. 21 00:00:57,170 --> 00:00:58,940 The null hypothesis of 22 00:00:58,940 --> 00:01:01,460 the Levene's test is that population variances 23 00:01:01,460 --> 00:01:07,325 are equal if the p-value of the test is less 0.05, 24 00:01:07,325 --> 00:01:09,260 reject the null hypothesis of 25 00:01:09,260 --> 00:01:11,210 equal variances and assume 26 00:01:11,210 --> 00:01:13,490 that the variances are unequal. 27 00:01:13,490 --> 00:01:16,100 Let us look at the example for that of teaching 28 00:01:16,100 --> 00:01:18,930 evaluation scores for male and female instructors. 29 00:01:18,930 --> 00:01:21,110 We will use the Levene's function 30 00:01:21,110 --> 00:01:23,720 in the psi pi.stats package. 31 00:01:23,720 --> 00:01:26,435 We will run it against both samples and we will 32 00:01:26,435 --> 00:01:29,270 specify the center argument as mean. 33 00:01:29,270 --> 00:01:32,405 Since our t-tests, we test for mean differences, 34 00:01:32,405 --> 00:01:35,630 we will get a p-value of 0.66, 35 00:01:35,630 --> 00:01:38,525 which is greater than 0.05. 36 00:01:38,525 --> 00:01:41,120 That means we will fail to reject 37 00:01:41,120 --> 00:01:43,550 the null hypothesis and we will assume 38 00:01:43,550 --> 00:01:46,540 equal variances when conducting our t-test. 39 00:01:46,540 --> 00:01:48,420 When you run your t-test, 40 00:01:48,420 --> 00:01:51,380 you set the equal underscore var option to 41 00:01:51,380 --> 00:01:55,505 true and if you got a p-value less than 0.05, 42 00:01:55,505 --> 00:01:58,100 you set that option to false. 43 00:01:58,100 --> 00:02:00,815 If you were to do a t-test by hand, 44 00:02:00,815 --> 00:02:02,300 the formula would be different for 45 00:02:02,300 --> 00:02:05,330 calculating equal versus unequal variances. 46 00:02:05,330 --> 00:02:09,650 You must calculate the pooled variance as shown here. 47 00:02:09,650 --> 00:02:11,674 Then calculate the standard deviation 48 00:02:11,674 --> 00:02:13,670 that you will use in the t-test. 49 00:02:13,670 --> 00:02:15,965 If the variances were unequal, 50 00:02:15,965 --> 00:02:18,140 calculate the t-test with each of 51 00:02:18,140 --> 00:02:21,220 the individual standard deviations and sample size. 52 00:02:21,220 --> 00:02:23,090 You will need to find the degree of 53 00:02:23,090 --> 00:02:25,300 freedom to check the t-test table. 54 00:02:25,300 --> 00:02:27,380 With this formula the rule of thumb for 55 00:02:27,380 --> 00:02:30,050 assuming equal variance when calculating by hand, 56 00:02:30,050 --> 00:02:32,660 is defined by the ratio of the larger groups 57 00:02:32,660 --> 00:02:34,070 variance to the smaller groups 58 00:02:34,070 --> 00:02:36,990 variance to be less than 1.5.