Presentation is loading. Please wait.

Presentation is loading. Please wait.

BS704 Class 7 Hypothesis Testing Procedures

Similar presentations


Presentation on theme: "BS704 Class 7 Hypothesis Testing Procedures"— Presentation transcript:

1 BS704 Class 7 Hypothesis Testing Procedures

2 Please complete Quiz 8 Before Oct 26
HW Set #6 Chapter 7 Problems 4, 7, 8, 20 and 25 R Problem Set 6 (on Blackboard) Due October 26 Please complete Quiz 8 Before Oct 26

3 Objectives Define null and research hypothesis, test statistic, level of significance and decision rule Understand Type I and Type II errors Differentiate hypothesis testing procedures based on type of outcome variable and number of samples

4 Hypothesis Testing Research hypothesis is generated about unknown population parameter Sample data are analyzed and determined to support or refute the research hypothesis

5 Hypothesis Tests About m
Example: A large, national study was conducted in 2007 and found that the mean systolic blood pressure for males aged 50 was In 2008, an investigator hypothesizes systolic blood pressures have increased. To test this hypothesis we set up two competing hypotheses Null H0: m = 130 Research H1: m > 130

6 Hypothesis Tests About m
To test the hypotheses a random sample is selected from the population of interest. Suppose a sample of n=108 males age 50 in 2008 is selected and their systolic blood pressures are analyzed. Of primary interest is the mean systolic blood pressure in the sample ( ).

7 If the sample mean is 130, which is more likely true?

8 If the sample mean is 150, which is more likely true?

9 If the sample mean is 135, which is more likely true?

10 Hypothesis Tests About m
We must determine a critical value such that if our sample mean is less than the critical value we will conclude that H0 is true (i.e., m=130), and if our sample mean is greater than the critical value we will conclude that H1 is true (i.e., m > 130).

11 Hypothesis Tests About m
Instead of determining critical values for the sample mean - which would be specific to each application (since depends on the unit of measurement), - appeal to the Central Limit Theorem.

12 Hypothesis Tests About m
For large n - is approximately normally distributed. Assuming that H0 is true (or "under the null hypothesis") we can standardize , producing a Z score (test statistic). If  130 then Z  0  H0 probably true. If >130 then Z > 0  H1 probably true. What value of Z is considered “large” ? In Example suppose that s=15 and n=108.

13 Hypothesis Tests About m
We must select a level of significance, denoted a, which is defined as the probability of rejecting H0 when H0 is true. The level of significance is generally in the range of 0.01 to 0.10. Once a level of significance is selected, a decision rule is formulated.

14 Hypothesis Tests About m
Decision rule:  Reject H0 if Z > Do Not Reject H0 if Z < 1.645 Once the decision rule is in place, we compute the value of the test statistic. Suppose in example, X=135.

15 Hypothesis Tests About m
The final step - draw a conclusion. The test statistic falls in the rejection region - we reject H0 (3.46 > 1.645). We have significant evidence, a = 0.05, to show that the mean systolic blood pressure for males aged 50 in 2008 has increased from 130.

16 Hypothesis Testing Procedures
1. Set up null and research hypotheses, select a 2. Select test statistic 3. Set up decision rule 4. Compute test statistic 5. Draw conclusion & summarize significance (p-value)

17 P-values P-values represent the exact significance of the data
Estimate p-values when rejecting H0 to summarize significance of the data (can approximate with statistical tables, can get exact value with statistical computing package) P-value is the smallest a where we still reject H0

18 Hypothesis Testing for m
Continuous outcome 1 Sample H0: m=m0 H1: m>m0, m<m0, m≠m0 Test Statistic n> (Find critical value in Table 1C, n< Table 2)

19 Hypothesis Testing for m
The National Center for Health Statistics (NCHS) reports the mean total cholesterol for adults is Is the mean total cholesterol in Framingham Heart Study participants significantly different? In 3310 participants the mean is with a standard deviation of 36.8.

20 Hypothesis Testing for m
1. H0: m=203 H1: m≠203 a=0.05 2. Test statistic 3. Decision rule Reject H0 if z > 1.96 or if z < -1.96

21 Hypothesis Testing for m
4. Compute test statistic 5. Conclusion. Reject H0 because < We have statistically significant evidence at a=0.05 to show that the mean total cholesterol is different in the Framingham Heart Study participants.

22 Hypothesis Testing for m
Significance of the findings. Z = Table 1C. Critical Values for Two-Sided Tests a Z p<

23 Interpreting P-Values
If p < a then reject H0

24 Errors in Hypothesis Tests
Conclusion of Statistical Test Do Not Reject H0 Reject H0 H0 true Correct Type I error H0 false Type II error Correct

25 Practice Example – Is social networking a health risk?
Hypertexting (>120 text messages per day) has been associated with health risks (Frank et al, Nov 2010). In 2010, the mean number of texts per day was 55. Is texting increasing in 2012? A sample of 75 teens report sending a mean of 61 texts per day (SD = 15). Is there evidence of an increase in texting in 2012?

26 Practice Example – Is social networking a health risk?
1. H0: m = 55 H1: m > 55 a=0.05 2. Test statistic Test Statistic 3. Decision rule Reject H0. Reject H0 if z > 1.645

27 In an upper tailed test with a=0. 05. If Z=-2
In an upper tailed test with a= If Z=-2.5 would you reject H0: m=50? Yes No

28 We run a test and do not reject H0. Which is most likely…
We made the correct decision We committed a Type I error We committed a Type II error 1 or 2 1 or 3

29 New Scenario Outcome is dichotomous (p=population proportion)
Result of surgery (success, failure) Cancer remission (yes/no) One study sample Data On each participant, measure outcome (yes/no) n, x=# positive responses,

30 Hypothesis Testing for p
Dichotomous outcome 1 Sample H0: p=p0 H1: p>p0, p<p0, p≠p0 Test Statistic (Find critical value in Table 1C)

31 Hypothesis Testing for p
The NCHS reports that the prevalence of cigarette smoking among adults in 2002 is 21.1%. Is the prevalence of smoking lower among participants in the Framingham Heart Study? In 3536 participants, 482 reported smoking (482/3536=0.136).

32 Hypothesis Testing for p
1. H0: p=0.211 H1: p< a=0.05 2. Test statistic 3. Decision rule Reject H0 if z <

33 Hypothesis Testing for p
4. Compute test statistic 5. Conclusion. Reject H0 because < We have statistically significant evidence at a=0.05 to show that the prevalence of smoking is lower among the Framingham Heart Study participants. (p<0.0001)

34 Practice Example – Is social networking a health risk?
Hypertexting (>120 text messages per day) has been associated with health risks (Frank et al, Nov 2010). In 2010, 19% of teens were hypertexting. Is hypertexting increasing in 2012? In a sample of 75 teens, 16 report sending more than 120 texts per day. Is hyper-texting increasing in 2012?

35 Practice Example – Is social networking a health risk?
1. H0: p=0.19 H1: p > a=0.05 2. Test statistic Test Statistic 3. Decision rule Do not reject H0. Reject H0 if z > 1.645 Sample Data: n=75, x=16 𝑝 = =0.21

36 New Scenario Outcome is continuous SBP, Weight, cholesterol
Two independent study samples Data On each participant, identify group and measure outcome

37 Two Independent Samples
RCT: Set of Subjects Who Meet Study Eligibility Criteria Randomize Treatment 1 Treatment 2 Mean Trt 1 Mean Trt 2

38 Two Independent Samples
Cohort Study - Set of Subjects Who Meet Study Inclusion Criteria Group 1 Group 2 Mean Group 1 Mean Group 2

39 Hypothesis Testing for (m1-m2)
Continuous outcome 2 Independent Sample H0: m1=m2 (m1-m2 = 0) H1: m1>m2, m1<m2, m1≠m2

40 An RCT is planned to show the efficacy of a new drug vs
An RCT is planned to show the efficacy of a new drug vs. placebo to lower total cholesterol. What are the hypotheses? H0: mP=mN H1: mP>mN H0: mP=mN H1: mP<mN H0: mP=mN H1: mP≠mN

41 Hypothesis Testing for (m1-m2)
Test Statistic n1>30 and (Find critical value n2> in Table 1C, n1<30 or Table 2) n2<30

42 Pooled Estimate of Common Standard Deviation, Sp
Previous formulas assume equal variances (s12=s22) If 0.5 < s12/s22 < 2, assumption is reasonable

43 Hypothesis Testing for (m1-m2)
A clinical trial is run to assess the effectiveness of a new drug in lowering cholesterol. Patients are randomized to receive the new drug or placebo and total cholesterol is measured after 6 weeks on the assigned treatment. Is there evidence of a statistically significant reduction in cholesterol for patients on the new drug?

44 Hypothesis Testing for (m1-m2)
Sample Size Mean Std Dev New Drug Placebo

45 Hypothesis Testing for (m1-m2)
1. H0: m1=m2 H1: m1<m2 a=0.05 2. Test statistic 3. Decision rule, df=n1+n2-2 = 28 Reject H0 if t <

46 Assess Equality of Variances
Ratio of sample variances: 28.72/30.32 = 0.90

47 Hypothesis Testing for (m1-m2)
4. Compute test statistic 5. Conclusion. Reject H0 because < We have statistically significant evidence at a=0.05 to show that the mean cholesterol level is lower in patients on treatment as compared to placebo. (p<0.005)

48 A two sided test for the equality of means produces p=0.20. Reject H0?
Yes No Maybe

49 New Scenario Outcome is continuous SBP, Weight, cholesterol
Two matched study samples Data On each participant, measure outcome under each experimental condition Compute differences (D=X1-X2)

50 Two Dependent/Matched Samples
Subject ID Measure 1 Measure 2 . Measures taken serially in time or under different experimental conditions

51 Crossover Trial Treatment Treatment Eligible R Participants
Placebo Placebo Each participant measured on Treatment and placebo

52 Hypothesis Testing for md
Continuous outcome 2 Matched/Paired Sample H0: md=0 H1: md>0, md<0, md≠0 Test Statistic n> (Find critical value in Table 1C, n< Table 2)

53 Hypothesis Testing for md
Is there a statistically significant difference in mean systolic blood pressures (SBPs) measured at exams 6 and 7 (approximately 4 years apart) in the Framingham Offspring Study? Among n=15 randomly selected participants, the mean difference was -5.3 units and the standard deviation was 12.8 units. Differences were computed by subtracting the exam 6 value from the exam 7 value.

54 Hypothesis Testing for md
1. H0: md=0 H1: md≠0 a=0.05 2. Test statistic 3. Decision rule, df=n-1=14 Reject H0 if t > or if t <

55 Hypothesis Testing for md
4. Compute test statistic 5. Conclusion. Do not reject H0 because < < We do not have statistically significant evidence at a=0.05 to show that there is a difference in systolic blood pressures over time.

56 New Scenario Outcome is dichotomous
Result of surgery (success, failure) Cancer remission (yes/no) Two independent study samples Data On each participant, identify group and measure outcome (yes/no)

57 Hypothesis Testing for (p1-p2)
Dichotomous outcome 2 Independent Sample H0: p1=p2 H1: p1>p2, p1<p2, p1≠p2 Test Statistic (Find critical value in Table 1C)

58 Hypothesis Testing for (p1-p2)
Is the prevalence of CVD different in smokers as compared to nonsmokers in the Framingham Offspring Study? Free of CVD History of CVD Total Nonsmoker 2757 298 3055 Current smoker 663 81 744 3420 379 3799

59 Hypothesis Testing for (p1-p2)
1. H0: p1=p2 H1: p1≠p2 a=0.05 2. Test statistic 3. Decision rule Reject H0 if Z < or if Z > 1.96

60 Hypothesis Testing for (p1-p2)
4. Compute test statistic

61 Hypothesis Testing for (p1-p2)
5. Conclusion. Do not reject H0 because < < We do not have statistically significant evidence at a=0.05 to show that there is a difference in prevalent CVD between smokers and nonsmokers.

62 Study of Single verses Weekly Antenatal Corticosteroids
What do p-values mean in Table 1? What do p-values mean in Table 3?

63 Study of Single verses Weekly Antenatal Corticosteroids
Did randomization work?

64 Primary outcome Is trial a success?

65 Practice Problem Run Test for Primary Outcome
Composite Morbidity Group Sample Size # Events Weekly Single

66 Solution 3. Decision rule Reject H0 if Z < -1.96 or if Z > 1.96
1. H0: p1=p2 H1: p1≠p2 a=0.05 2. Test statistic 3. Decision rule Reject H0 if Z < or if Z > 1.96

67 Solution 4. Compute test statistic
5. Do not Reject H0 since -1.96<-1.294<1.96.


Download ppt "BS704 Class 7 Hypothesis Testing Procedures"

Similar presentations


Ads by Google