Inference for Tables
Chi-Square Test of Independence The chi-square( 2 ) test for independence/association test if the variables in a two-way table are related (single random sample) H o : the variables are independent H a : the variables are dependent
A study compared noncombat mortality rates for U.S. military personnel who were deployed in combat situations to those not deployed. The results of a random sample of 1580 military personnel: At the 0.05 significance level, test the claim that the cause of a noncombat death is independent of whether the military person was deployed in a combat zone. Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Cause of death
H o : Deployment status and cause of death are independent H a : Deployment status and cause of death are dependent Expected values table? Chi-square test of independence Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed What are we expecting to be true about the table? Cause of death So, if deployment status and cause of death are independent, then…
Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed So, if there are 1580 troops, how many would be expect to be both deployed and die because of illness?
Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Expected count formula
Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Expected count formula Unintentional Injury IllnessHomicide or Suicide Deployed?41.68? Not deployed??? Observed Expected
Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Expected count formula Unintentional Injury IllnessHomicide or Suicide Deployed ? Not deployed??? Observed Expected
Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Expected count formula Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Observed Expected
H a : Deployment status and cause of death are dependent Expected values table: Given two-way table is from a random sample. Sample is large enough to safely use chi-square since all expected counts are greater than 5. Chi-square test of independence Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed H o : Deployment status and cause of death are independent
Formula: df=(2 – 1)(3 – 1)= 2 Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed Unintentional Injury IllnessHomicide or Suicide Deployed Not deployed
Chi-Square Table We reject Ho, since p-value< there is enough evidence to believe that cause of death depends on deployment status. df=2
Chi-Square Test of Homogeneity The chi-square( 2 ) test for homogeneity allows the observer to test if the populations within a two-way table are the same (multiple random samples) H o : all the populations are the same for the given variable H a : all the populations are different
In the past, a number of professions were prohibited from advertising. In 1977, the U.S. Supreme Court ruled that prohibiting doctors and lawyers from advertising violated their right to free speech. The article “Should Dentists Advertise?” compared the attitudes of consumers and dentists toward the advertising of dental services. Separate random samples of 101 consumers and 124 dentists were asked to respond to the following statement “I favor the use of advertising by dentists to attract new patients.” The data is presented below: The authors of the article were interested in determining whether the two groups differed in their attitudes toward advertising.
H o : the opinions of consumers and dentists are the same H a : the opinions of consumers and dentists are different Expected values table: Given table is from two independent random samples. Sample is large enough since all expected counts are greater than 5. It is safe to use the chi-square procedures. Chi-square test of homogeneity
Formula: df=(2 – 1)(5 – 1)= 4
Chi-Square Table We reject Ho, since p-value< there is enough evidence to believe the opinions of consumers is different than the opinions of dentists. df=4
Summary of All Chi-Square Tests Test for Goodness of Fit –Comparing the distribution of a variable to what is expected (given % or equally likely) Chi-Square test for homogeneity of populations –Comparing a single variable, multiple populations Chi-Square test of association/independence –Comparing two variables within the same population