Week 6 day 2 Flashcards
What is the difference between a chi-squared Goodness of Fit Test and a chi-square test for independence?
What are residuals?
They are the difference of what was expected.
The difference between observed and expected values.
Does a test statistic need to be a single number?
yes.
As X-square values increase, are we more likely to reject the null?
Yes.
How are the degrees of freedom calculated for chi-square tests for independence?
df = (R-1)(C-1)
R - number of rows.
C - number of columns.
How to calculate the p-value for a chi-square in R?
1-pchisq(95th quantile x-square value,df=…)
95th quantile X-square: qchisq(0.95,df=…)
Do people ever use Pearson residuals and ‘standard’ or ‘adjusted’ residuals?
Yes.
What effect size is used often with chi-square testing?
Cramer’s V.
What does effect size tell us?
Tell how big an observed difference is, regardless of p-value.
Why don’t we just use chi-square stat for an effect size measure?
What function do we use to calculate Cramer’s V?
CramerV() from DescTools package.
In the chisqr() function, if we do not specify the p= argument, what does it assume it is?
It assumes that the expected frequency is an equal distribution across all variables.
What are the assumptions for a chi-square test?
- “Large” expected frequencies.
- Independence of the data.
How do we determine whether our assumptions for our test are met “enough”?
What is the FIscher Exact Test, and when do we use it?
The Fischer Exact Test is used when there are low expected frequencies (generally less than 5) per cell.