Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Comparing Two Groups: Bivariate Analysis and Hypothesis Testing - Prof. Rickie Domangue, Study notes of Statistics

The comparison of two groups using bivariate analysis and hypothesis testing. It covers the concepts of response variable and explanatory variable, independent and dependent samples, assumptions, hypotheses, test statistics, and confidence intervals for the difference between two population proportions and means. The document also includes examples and calculations.

Typology: Study notes

Pre 2010

Uploaded on 02/13/2009

koofers-user-iva
koofers-user-iva 🇺🇸

10 documents

1 / 16

Toggle sidebar

Related documents


Partial preview of the text

Download Comparing Two Groups: Bivariate Analysis and Hypothesis Testing - Prof. Rickie Domangue and more Study notes Statistics in PDF only on Docsity! Chapter 9 Comparing Two Groups 9.0 Introduction A. Bivariate Analyses: A Response Variable and a Binary Explanatory Variable • Example - Response Variable Categorical – Response Variable = Student Binge drinker or not – Explanatory Variable = Gender • Example - Response Variable Quantitative – Response Variable = GPA – Explanatory Variable - Gender 1 2 B. Dependent and Independent Samples • Independent Samples – Experiment - subjects randomly assigned to two treatments, A and B. A and B are values of binary explanatory variable. Example: 100 patients with disease randomly assigned to new treatment (A), standard treat- ment (B), with 50 assigned to each. Binary Explanatory variable is treatment received. Re- sponse variable is length of life after treat- ment. – Observational study: one sample chosen at random from one population A and another sample chosen independently and at random from a second population B. A and B are val- ues of binary explanatory variable. Example: From one list of males(A), select random sample; from one list of females(B), select random sample. Binary response vari- able is gender. Response variable = GPA. – Observation study: subjects selected at ran- dom from one population, and then grouped by binary variable (A or B). Example: From one list of students, select a sample and then split sample into two accord- ing to live on campus (A) and live off campus (B). Binary explanatory variable is live on or off campus. Response variable = study time. 5 • Assumptions – Categorical response variable for two groups (here groups defined by binary explanatory variable: duct tape and liquid nitrogen groups; categorical response variable is wart removed (SUCCESS) or not removed (FAILURE)) – Independent random samples in survey or ran- dom assignment in experiment (this example: 204 subjects randomly assigned to two treat- ments) – Two sample sizes n1 and n2 are sufficiently “large” to ensure that sampling distribution of p̂1 − p̂2 is approximately normal Rule of Thumb: Number of successes and num- ber of failures in both samples at least 10. Here, for liquid nitrogen group, 60 successes and 40 failures both at least 10, and for duct tape group, 88 successes and 16 failures, both at least 10. • Hypotheses – Let p1 = population proportion of warts suc- cessfully removed by freezing and p2 = popu- lation proportion of warts successfully removed with duct tape treatment. – Ho : p1 = p2 (that is p1 − p2 = 0) – Ha : p1 < p2 (that is p1 − p2 < 0) • Test Statistic – Let p̂1 be the random variable, sample propor- tion of 100 subjects assigned to liquid nitrogen treatment whose warts are removed 6 – Let p̂2 be the random variable, sample pro- portion of 104 subjects assigned to duct tape treatment whose warts are removed – Test Statistic z = (p̂1−p̂2)−0√ p̂(1−p̂)( 1n1 + 1 n2 ) p̂ = proportion of successful removals pooled across both groups • P value – Suppose that H0 is true. The z test statistic has an approximate stan- dard normal distribution when Ho is true – Calculated p̂1 = 60/100 = 0.60 Calculated p̂2 = 88/104 = 0.85 Calculated p̂ = (60+88)/(100+104) = 148/204 = 0.73 Calcuated z = (.60−85)−0√ 0.73(1−.73)( 1 100 + 1 104 ) Calculated z = −.250.062 = −4.03 – P-value = P [z ≤ −4.03] ≈ 0 • Conclusion (Interpretation of P-value, conclusion about hypotheses, answer questions posed). Interpretation: It is practically impossible (P − value ≈ 0) to obtain a difference in sample proportions like - 0.25 from sampling error if in fact the population proportions of successful wart removals for the two treatments are the same (null true). Conclusion about hypotheses: The P-value, being about 0, is smaller than our significance level of 0.05, so the null hypothesis 7 is rejected and the alternative hyp. is accepted. Answer question: Yes, the data do suggest that freezing is less successful than duct tape in re- moving warts. 2. Example 2 A consumer magazine polls car owners to see if they are happy enough with their vehicles that they would purchase the same model again. They randomly selected 450 owners of American- made cars and 450 owners of Japanese models. 342 of the 450 owners of American-made cars said they would purchase the same model again. 351 of the 450 owners of the Japanese model said they would pur- chase the same model again. Is there sufficient evi- dence of a difference in opinion among the two types of car owners? Use a significance level α = 0.05. • Assumptions – Categorical response variable for two groups (here groups defined by binary explanatory variable: own American-made car, own Japanese- made car; categorical response variable is would purchase same model again (SUCCESS) or not purchase same model again (FAILURE)) – Independent random samples in survey or ran- dom assignment in experiment (this example: two samples of car owners were randomly and independently selected) – Two sample sizes n1 and n2 are sufficiently “large” to ensure that sampling distribution of p̂1 − p̂2 is approximately normal 10 9.1.2 Confidence Interval for the difference between two population proportions A. Large Sample Confidence Interval: (p̂1 − p̂2) ± (z) √ p̂1(1−p̂1) n1 + p̂2(1−p̂2) n2 z score depends on confidence level, such as 1.96 for 95% confidence B. Assumptions: 1. Independent random samples/random assignment for two groups 2. Large enough sample sizes n1 and n2 so that there are at least 10 successes and 10 failures in each group. C. Example (DeVeaux, Velleman, Bock). There has been debate among doctors over whether surgery can prolong life among men suffering from prostate cancer, a type of cancer that typically develops and spreads very slowly. In the summer of 2003, The New England Journal of Medicine published results of some Scandinavian research. Men diagnosed with prostate cancer were randomly assigned to either un- dergo surgery or not. Among the 347 men who had surgery, 16 eventually died of prostate cancer, com- pared with 31 of the 348 men who did not have surgery. Construct a 95% confidence interval for the difference in rates of death for the two groups of men. Binary Explanatory variable = surgery or not Response variable = died from prostate cancer (suc- cess) or not (failure) No surgery group: p̂1 = 31/348 = 0.089 11 Surgery group: p̂2 = 16/347 = 0.046 z score for 95% confidence is 1.96 (0.089−0.046)± (1.96) √ (0.089)(1−0.089) 348 + (0.046)(1−0.046) 347 0.043 ± 0.037 0.006 < p1 − p2 < 0.080 Interpretation: We are 95% that among persons diagnosed with prostate cancer, the rate of death from prostate cancer is somewhere between 0.6% and 8% higher for those not having surgery as compared to those having surgery. Assumptions: 1. Subjects randomly assigned to two treatment groups 2. Samples sizes are large: 31/317 successes/failures (at least 10) in surgery group; and 16/331 successes/failures (at least 10) in non surgery group; 12 9.2 Quantitative Response: How Can We Com- pare Two Means 9.2.1 Significance Testing About Two Proportions 1. Example 1 (Source: Devore and Peck. To assess the impact of oral contraceptive use on bone mineral density (BMD), researchers in Canada carried out a study comparing BMD for women who had used oral contraceptives for at least 3 months to BMD for women who had never used oral contraceptives (“Oral Contraceptive Use and Bone Mineral Density in Premenopausal Women,” Canadian Medical As- sociation Journal [2001]: 1023-1029). Data on BMD (in grams per centimeter) consistent with summary quantities given in the paper appear in the follow- ing table (the actual sample sizes for the study were much larger): Never used oral contraceptives: 0.82, 0.94, 0.96, 1.31, 0.94, 1.21, 1.26, 1.09, 1.13, 1.14 Used oral contraceptives: 0.94, 1.09, 0.97, 0.98, 1.14, 0.85, 1.30, 0.89, 0.87, 1.01 Is there sufficient evidence to conclude that women who use oral contraceptives have a lower mean BMD than women who have never used oral contracep- tives? Use a significance level α = 0.05. 15 9.2.2 Confidence Interval for the difference between two population means A. Confidence Interval: (x1 − x2) ± (t) √ s21 n1 + s 2 2 n2 t percentile depends on confidence level. B. Assumptions: 1. Independent random samples for obs. study/random assignment to groups for experiment 2. Two sample sizes n1 and n2 are both large (in general, 30 or larger), or population distributions are normal C. Example (Peck, Olsen, Devore). Does talking el- evate blood pressure, contributing to the tendency for blood pressure to be higher when measured in a doctor’s office than when measured in a less stressful environment (called the white coat effect)? The ar- ticle “The Talking Effect and ‘White Coat’ Effect in Hypertensive Patients: Physical Effort or Emotional Content” (Behavioral Medicine[2001]: 149-157) de- scribed a study in which patients with high blood pressure were randomly assigned to one of two groups. Those in the first group (the talking group) were asked questions about their medical history and about the sources of stress in their lives in the minutes be- fore their blood pressure was measured. Those in the second group (the counting group) were asked to count aloud from 1 to 100 four times before their blood pressure was measured. The following data values for diastolic blood pressure (in millimeters 16 Hg) are consistent with summary quantities appear- ing in the paper: Talking 104, 110, 107, 112, 108, 103, 108, 118 n1 = 8, x1 = 108.75,s1 = 4.74 Counting 110,96,103,98,100,109,97,105 n2 = 8, x2 = 102.25,s2 = 5.39 df = smaller of n1 − 1,n2 − 1 = 7 t score for 95% confidence is 2.365 (108.75 − 102.25) ± (2.365) √ (4.74)2 8 + (5.39)2 8 6.5 ± (2.365)(2.54) 6.5 ± 6.01 (0.49, 12.5) 0.49 < µ1 − µ2 < 12.5 Interpretation: We are 95% confident that the mean diastolic blood pressure when talking is higher than the mean when counting by somewhere between 0.49 and 12.5 mm Hg. Assumptions: 1. Subjects randomly assigned to two treatment groups 2. Blood pressure is normally distributed for each group
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved