We now study how to compare two or more populations when
the response variable has two or more categories and how to
test whether two categorical variables are independent
The methods in this chapter answer questions such as:
o Are men and women equally likely to suffer lingering
fear symptoms after watching scary movies like jaws an
poltergeist at a young age?
o Is there an association between texting while driving
and automobile accidents?
o Does political preference predict making contributions
online?
Inference for Two-Way Table
We now record counts of all the outcomes in a two-way table
r x c table – to describe a two-way table of counts with r rows
and c columns
two categorical variables e.g. gender and frequent binge
drinker
The hypothesis; no association
the null hypothesis of interest in a two-way table is, there is no
association between the row variable and the column variable
The alternative hypothesis is that there is an association
between these two variables
o We cannot describe Ha as either one-sided or two-sided
Expected cell counts
To test the null hypothesis in r x c tables, we compare the
observed cell counts with expected cell counts calculated
under the assumption that the null hypothesis is true
The expected cell count is the product of the row and column
totals divided by the table total
row total ×column total
expected cell count=
n
The chi-square test
To test the null hypothesis that there is no association
between the row and column classifications, we use statistic
that compares the entire set of observed counts with the set
of expected counts
, The chi-square statistic is a measure of how much the
observed cell counts in a two-way table diverge from the
expected cell counts.
( observed count−expected count )2
X 2= ∑
expected count
Where observed represents an observed cell count, expected
represents the expected count for the same cell, and the sum is
over all r x c cells in the table
Large values of X2 provide evidence against the null hypothesis
and indicate that the expected and observed counts are very
different
Chi-square distribution X2 – like the t distribution, the chi-square
distribution form a family described by a single parameter, the
degrees of freedom
Chi-square test for two-way tables
The null hypothesis is that there is no association between the
row an column variables in a two-way variable. The alternative
is that these variables are related.
If H0 is true, the chi-square statistic has approximately a chi-
square distribution with (r – 1)(c – 1) degrees of freedom.
The P-value for the chi-square test is: P( x2 ≥ X2 )
Where x2 is a random variable having the x2 (df) distribution
with df = (r – 1)(c – 1)
The chi-square test uses always the upper tail of the chi-
square distribution, because any deviation from the null
hypothesis makes the statistic larger
The approximation of the chi-square distribution becomes
more accurate as the cell counts increases
Confounding … !
Our data don’t allow us to investigate possible confounding
variables
o Often a randomized comparative experiment can settle
the issue of causation
The chi-square test and z test
A comparison of the proportions of successes in two
populations leads to a 2 x 2 table
Chi-square test and two-sample z test give always exactly the
same result
o Because the chi-square statistic is equal to the square of
the z statistic, and the distribution values are the same
The advantage of the z test is that we can test either one-
sided or two-sided alternatives
The chi-square test always tests the two-sided alternative
Voordelen van het kopen van samenvattingen bij Stuvia op een rij:
Verzekerd van kwaliteit door reviews
Stuvia-klanten hebben meer dan 700.000 samenvattingen beoordeeld. Zo weet je zeker dat je de beste documenten koopt!
Snel en makkelijk kopen
Je betaalt supersnel en eenmalig met iDeal, creditcard of Stuvia-tegoed voor de samenvatting. Zonder lidmaatschap.
Focus op de essentie
Samenvattingen worden geschreven voor en door anderen. Daarom zijn de samenvattingen altijd betrouwbaar en actueel. Zo kom je snel tot de kern!
Veelgestelde vragen
Wat krijg ik als ik dit document koop?
Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.
Tevredenheidsgarantie: hoe werkt dat?
Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.
Van wie koop ik deze samenvatting?
Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper Jana1234. Stuvia faciliteert de betaling aan de verkoper.
Zit ik meteen vast aan een abonnement?
Nee, je koopt alleen deze samenvatting voor €2,99. Je zit daarna nergens aan vast.