Chi-squared Flashcards
Broadly, a ‘goodness of fit’ can be described as?
How likely does the frequency match a theoretical expected distribution.
How do you get the test-statistic for a goodness of fit?
(observed - expected)2 / expected
this is run for every cateogory and then added together to get oen numbe
Does a larger x^2 indicate a better or worse fit beteen two groups?
A worse fit.
What is a goodness of fit comparing?
A goodness of fit compares observed counts to a theoretical distribution of expected counts in the population .
What does the shape of distribution under the null depend on?
degrees of freedom. k-1
what does the chi-squared distribution look like?
positivley skewed.
Karl Pearson pointed this out.
How do you estimate the expected frequencies in a chi-independence test?
Add up counts in each row. Add up counts in each column. Divide each row total by column total(s).
What is the equation for expected frequencies in a goodness of fit?
e = n x expected probability under the null
remember that this equation is run for every participant
What is the first thing you need to work out the calculate the expected frequency in a chi-independence?
We need the probability for each row. Total observations for that person / n
What is the equation for expected frequencies under the null? (chi-independence)
expected = total column observations x row probability
this is run for each row / individual
row probability is calculated: row total / n
How is df calculated for goodness of fit AND chi-independence?
Goodness of fit: rows - 1
Independence: (R -1) (C - 1)
Independence has two df values
What does effect size measure?
How big is the difference between data and null hypothesis.
How does a fisher exact test work?
Assumes rows and columns are fixed. Calculates the probability of obtaining a contingency table.
What are the conditions needed for a McNemar test, and why would you run it.
You would run this test if there was some relationship between your two groups. Outcome needs to be binary and have been measured twice.
What does a fisher exact test print?
a p-value