BIOL2300 Biostatistics Chapter 9 - Boston...

64
BIOL2300 Biostatistics Chapter 9 Hypothesis testing in case of 2 proportions, 2 means, and 2 variances (or standard deviations)

Transcript of BIOL2300 Biostatistics Chapter 9 - Boston...

Page 1: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

BIOL2300 BiostatisticsChapter 9

Hypothesis testing in case of 2 proportions, 2 means, and 2

variances (or standard deviations)

Page 2: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 3: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 4: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 5: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 6: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 7: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Test statistic z when H0 is “p1=p2”

Page 8: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Confidence interval for difference p1-p2 between proportions in two populations

Page 9: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Test statistic z when H0 is “p1 = p2+c”

Page 10: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Justification

Page 11: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 12: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 13: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

P-value versus test statistic in rejection region

Page 14: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 15: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 16: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 17: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 18: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 19: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 20: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 21: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 22: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 23: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 24: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 25: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 26: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 27: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 28: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 29: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 30: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 31: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 32: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 33: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 34: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Matched vs unmatched pairs

• Two samples are dependent if members of one sample can be used to determine members of the second sample. Such samples are said to be matched.

• Two samples are independent if members selected in first sample are chosen randomly, with no relation and no regard to members in the second sample. Such samples are said to be unmatched.

Page 35: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 36: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 37: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Answer: B

• The samples are independent. Knowledge of who is in one class gives no information about who is in the other class -- i.e. independent, not matched pairs.

Page 38: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 39: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Answer: A

• Matched pairs, since it is the SAME person before and after application of a medication.

Page 40: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Test statistic for difference in means(unmatched case)

Page 41: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 42: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 43: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Confidence interval for difference of means

Page 44: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Test statistic for difference in means(matched pairs)

Page 45: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 46: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 47: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 48: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 49: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 50: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Odds ratio (OR) and risk ratio (RR)

Page 51: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 52: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 53: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

HYPOTHESIS TESTING FOR VARIANCES OF TWO SAMPLES

Page 54: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 55: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Requirements• The two populations are independent of each other

(i.e. samples are not matched or paired and the two populations are unrelated in any manner)

• The two populations are each normally distributed. WARNING: Methods for testing assertions about variances from two populations are extremely sensitive to departures from normality. If test statistic is in the rejection region, then this could mean that the null hypothesis is not true OR that there was an unobserved departure from normality.

Page 56: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

F-distribution

Page 57: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Test the indicated claim about the variances or standard deviations of two populations. Assume that the populations are normally

distributed. Assume that the two samples are independent and that they have been randomly selected.

• A random sample of 16 women resulted in blood pressure levels with a standard deviation of 22.6 mm Hg. A random sample of 17 men resulted in blood pressure levels with a standard deviation of 21 mm Hg. Use a 0.025 significance level to test the claim that blood pressure levels for women have a larger variance than those for men.

Page 58: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 59: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

Using EXCEL functions• F.INV(0.975,15,16)=2.787517572Critical value F such that area from –infty to F is ®This convention is OPPOSITE that of TABLE A-5•• F.DIST(2.7875,15,16,TRUE)=0.974999322Returns cumulative area from –infty to critical value

• F.DIST.RT(2.7875,15,16)=0.02500067Returns right tailed area from critical value to +infty

Page 60: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 61: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,
Page 62: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

EXCEL function for T-test• T.TEST(array1,array2,tails,type) returns the

p-value for 1-tailed or 2-tailed T-test. Here “type” indicate type of T-test to perform: 1 mean a PAIRED test, 2 means a two-sample, equal variance test, 3 performs a two-sample unequal variance test.

• If there are N subjects, with measurements before/after then use 1; otherwise generally use 3

Page 63: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

EXCEL functions for equality hypothesis testing of two variances

• F.TEST(array1, array2) returns the two-tailed probability that the variances in array1 and array2 are not significantly different

• The following function computes the critical value. WARNING: Excel formalism different than tables in book! See next page as well.

• F.INV(®,df1,df2) = x if and only if F.DIST(x,df1,df2,TRUE) = ® . For example, F.DIST(5,9,11,TRUE)=0.992534009 F.INV(0.992534009,9,11)=5

Page 64: BIOL2300 Biostatistics Chapter 9 - Boston Collegeclavius.bc.edu/~clote/courses/BIOL2300/Notes/Notes/LECTURES/chap9.pdfChapter 9 Hypothesis testing in case of 2 proportions, 2 means,

EXCEL functions for equality hypothesis testing of two variances

• F.DIST(x,df1,df2,TRUE) returns P( F<x ), where F is a random variable that has an F distribution with degrees of freedom df1 for variance (s1)2 and variance (s2)2, where s1 ¸ s2 . NOTE: not F.DIST here, but other functions are F.

• F.DIST.RT(x,df1,df2) returns P( F>x ), where F is a random variable that has an F distribution with df1 and df2