6 - chi squared tests Flashcards
hypothesis test of independence
H0 are independent - no association
H1 arent - is association
expended values
find the expected proportion by doing the total of row/ total * total of column
chi squared
tests goodness of fit
sum ( (O-E)^2 / E)
v in an n by m table
v = (n-1)(m-1)
all E need to be
> = 5
if less then 5 combine rows/ columns with next lowest
critical value chi squared
if 5% look at the 0.95 - look at the upper tail always - to find the critical acleu
yates correction
used when v = 1 (2*2) as chi squared isn’t a good approximation
= sum( (O-E - 0.5)^2 /E)
fitting a distribution hypothesis
H0 follows distribution
H1 doesn’t follow distribution
v in goodness of fit tests
number of data - number of constraints
(normally -1 unless you estimate a parameter then it’s -2)
how to estimate p binomial
E(X) = sum of (fx)/ sum of (f) = np
p = E(X) /n