# testing means, part iii the two-sample t-test. sample null hypothesis the population mean is equal...

Post on 19-Dec-2015

212 views

Category:

## Documents

Embed Size (px)

TRANSCRIPT

• Slide 1
• Testing means, part III The two-sample t-test
• Slide 2
• Sample Null hypothesis The population mean is equal to o One-sample t-test Test statistic Null distribution t with n-1 df compare How unusual is this test statistic? P < 0.05 P > 0.05 Reject H o Fail to reject H o
• Slide 3
• Sample Null hypothesis The mean difference is equal to o Paired t-test Test statistic Null distribution t with n-1 df *n is the number of pairs compare How unusual is this test statistic? P < 0.05 P > 0.05 Reject H o Fail to reject H o
• Slide 4
• 4 Comparing means Tests with one categorical and one numerical variable Goal: to compare the mean of a numerical variable for different groups.
• Slide 5
• 5 Paired vs. 2 sample comparisons
• Slide 6
• 6 2 Sample Design Each of the two samples is a random sample from its population
• Slide 7
• 7 2 Sample Design Each of the two samples is a random sample from its population The data cannot be paired
• Slide 8
• 8 2 Sample Design - assumptions Each of the two samples is a random sample In each population, the numerical variable being studied is normally distributed The standard deviation of the numerical variable in the first population is equal to the standard deviation in the second population
• Slide 9
• 9 Estimation: Difference between two means Normal distribution Standard deviation s 1 =s 2 =s Since both Y 1 and Y 2 are normally distributed, their difference will also follow a normal distribution
• Slide 10
• 10 Estimation: Difference between two means Confidence interval:
• Slide 11
• 11 Standard error of difference in means = pooled sample variance = size of sample 1 = size of sample 2
• Slide 12
• 12 Standard error of difference in means Pooled variance:
• Slide 13
• 13 Standard error of difference in means df 1 = degrees of freedom for sample 1 = n 1 -1 df 2 = degrees of freedom for sample 2 = n 2 -1 s 1 2 = sample variance of sample 1 s 2 2 = sample variance of sample 2 Pooled variance:
• Slide 14
• 14 Estimation: Difference between two means Confidence interval:
• Slide 15
• 15 Estimation: Difference between two means Confidence interval: df = df 1 + df 2 = n 1 +n 2 -2
• Slide 16
• 16 Costs of resistance to disease 2 genotypes of lettuce: Susceptible and Resistant Do these differ in fitness in the absence of disease?
• Slide 17
• 17 Data, summarized Both distributions are approximately normal.
• Slide 18
• 18 Calculating the standard error df 1 =15 -1=14; df 2 = 16-1=15
• Slide 19
• 19 Calculating the standard error df 1 =15 -1=14; df 2 = 16-1=15
• Slide 20
• 20 Calculating the standard error df 1 =15 -1=14; df 2 = 16-1=15
• Slide 21
• 21 Finding t df = df 1 + df 2 = n 1 +n 2 -2 = 15+16-2 =29
• Slide 22
• 22 Finding t df = df 1 + df 2 = n 1 +n 2 -2 = 15+16-2 =29
• Slide 23
• 23 The 95% confidence interval of the difference in the means
• Slide 24
• 24 Testing hypotheses about the difference in two means 2-sample t-test
• Slide 25
• 25 2-sample t-test Test statistic:
• Slide 26
• 26 Hypotheses
• Slide 27
• 27 Null distribution df = df 1 + df 2 = n 1 +n 2 -2
• Slide 28
• 28 Calculating t
• Slide 29
• 29 Drawing conclusions... t 0.05(2),29 =2.05 t
• Sample Null hypothesis The two populations have the same mean 1 2 Two-sample t-test Test statistic Null distribution t with n 1 +n 2 -2 df compare How unusual is this test statistic? P < 0.05 P > 0.05 Reject H o Fail to reject H o
• Slide 32
• Quick reference summary: Two-sample t-test What is it for? Tests whether two groups have the same mean What does it assume? Both samples are random samples. The numerical variable is normally distributed within both populations. The variance of the distribution is the same in the two populations Test statistic: t Distribution under H o : t-distribution with n 1 +n 2 -2 degrees of freedom. Formulae:
• Slide 33
• 33 Comparing means when variances are not equal Welchs t test
• Slide 34
• 34 Burrowing owls and dung traps
• Slide 35
• 35 Dung beetles
• Slide 36
• 36 Experimental design 20 randomly chosen burrowing owl nests Randomly divided into two groups of 10 nests One group was given extra dung; the other not Measured the number of dung beetles on the owls diets
• Slide 37