EAB - T-Test And Chi Squared Tests Flashcards
what is the difference between a paired and unpaired t-test
paired = matched samples (ie the same thing or same person, measuring blood pressure in 30 people over a month)
unpaired = independent samples (ie height in girls vs height in boys)
whats the function of a t-test?
T-tests compare TWO means
what is a chi-squared test used for? How is it different to t test
Test for an association between 2 categorical variables
The t-test is used to compare means between two groups, typically for continuous data, to determine if there is a significant difference between them. Chi-square test, on the other hand, is used to determine if there is a significant association between two categorical variables. It’s used when data are frequencies or counts, rather than continuous values.
So t test compares difference, chi squared tests association
what are 2 assumptions of a t-test
- continuous data, normally distributed
- variances/SD same
what is chi squared test based on?
Based on the chi-squared distribution with n degrees of freedom where n is given by (no. of rows-1) x (no. of columns-1)
what is the chi squared test equivalent to?
Equivalent to the z test for two proportions (where each variable has only 2 categories)
what does a chi squared test give you?
Gives a P value but no direct estimate or confidence interval for the estimates
What is the null hypothesis?
In the population where the samples come, there is no association between the two variables
What are the 4 rationales of chi-squared tests?
- Calculates the expected frequencies if there were no association (i.e. null hypothesis is true)
- Compares the observed frequencies with these expected values
- If the observed frequencies are very different to the expected values this provides evidence that there is an association
- The test uses a formula based on the chi-squared distribution to give a P value
What are the 4 assumptions of the chi-squared test?
- ‘Large sample’ test
- Rule of thumb for test to be valid:
- at least 80% of expected frequencies must be greater than 5
- For 2x2 test this will be true if all frequencies >5
- If assumptions don’t hold, consider collapsing the table if multi- category, or using Fisher’s exact test
what 3 things do you need to make sure when using a chi squared test?
use FREQUENCIES not percentages
works for all size tables
test is usually done with a computer programme