Practical 4 - Comparing two groups Flashcards
Describe how the following types of data should be described/represented
a) Categorical - nominal/ordinal
b) Continuous - continuous/discrete
a) Descriptive - frequencies/percentages
Dispersion - bar chart / pie chart
b) Descriptive - mean (median if skewed
Dispersion - SD (min/max or IQR if skewed)
One sample - to compare mean of our sample to external specific value
Outline when you would use the three different t tests
One sample t tests - to compare mean of our sample to external specific value already proposed (mew symbol). For example does the sample mean = 25
Independent sample t test - does the mean of one group differ to the mean of another group (where individuals can only relate to one group). (young vs old // city a vs city b)
paired sample t test - where individuals can belong to both groups i.e. mean at one time vs mean at another time. (before / after)
For the three t tests (one sample, independent groups, paired sample) - we need to check if the data is normally distributed
Can you name the alternative t tests for the respective above tests if the data is not normally distributed
One sample -
Independent sample - Mann Whitney U Test
Paired samples - Wilcoxon Matched Pair Test
How would we check the distribution of numerical data?
Check the histogram and see if there is a bell shaped curve
Some numerical tests that can be used - Kolmogorov-Smirnov tests - however these tests can be too conservative and will easily say the data is not normally distributed when at times it should be regarded so.
For normal distribution - Kolmogorov-Smirnov test is p > 0.05 (asymp. statistic)
Null is no difference between your data and normality - therefore if significant value would side with alternative hypothesis and reject the null
What p value would indicate you reject the null hypothesis
< 0.05
What symbol indicates…
a) the sample mean?
b) the population mean
a) X
b) mew
What are the assumptions of the one sample t test?
- Observations are randomly and independently drawn
- There are no outliers
3, The data is normally distributed
What format would a 1 sample t test be reported?
Based on our sample the expected age of males was 4.5 years less than 65 (95% CI). This difference was/was not statistically significant (t test, df, p value)
What are the assumptions of two groups (independent samples) test
Observations and randomly and independent drawn (participants only belong to one of two groups)
Symmetrical observations in each group - normal distribution
No outliers in each group
What is Levenne’s test for equality of variance?
Determines if the variance in each group of an independent samples t test is different
If the test is significant then there is a difference in variable of two groups and we read from “equal variance not assumed” - i.e. if significant read from 2nd/bottom row
What are the assumptions for a paired sample t test
- Independently and randomly drawn paired observations
- Normally distributed difference in the data
- No outliers
In a paired sample t test how would check if the data is suitable?
Need to check if the difference between groups is normally distributed.
Compute variable: weight after - weight before
Do analyse descriptives - frequencies - normal distribution curve?
Describe the different chi square tests?
One sample chi sqaure test - used to test if the proportion in a population is equal a certain value
Independent chi square tests (Pearson’s) - tests if proportion of a condition in one group is different to the proportion of a group in another group
Paired samples chi square tests (McNemar) - is proportion of a group in one condition
What are the assumptions for one sample chi square
Randomly and independently drawn observations
Number of cells with expected frequencies less than 5 < 20%
Minimum expected frequencies is 1
How would one sample chi test be reported?
Based on our sample the proportion of men and women is not equal (chi square, df, p)
When do we use Pearson’s square?
If two categorical variables are related - are there different proportions of one variable in one group compared to another
i.e. men vs women (height)
Assumptions as before (independently and random observations, not paired, minimum expected frequencies at least 1, < 20% of cells have expected frequencies less than 5)
How do you run Pearson’s (independent samples) chi square
Analyse - crosstabs - choose column for how you want to interpret - dependent in column
Statistic –> Chi Square
Cells –> observed
Remember - do not compare percentages that add up to 100%
What are the assumptions of McNemar test?
Paired samples chi square
- The data are paired
- The observations are randomly and independently drawn
- There are at least 25 observations in the discordant cells (this refers to the change categories)
Concordant cells would be yes/yes (before - after) and no/no (before -after)
Discordant cells are the other ones - add these up and they should be > 25
How do you run the McNemar tests?
Analyse - crosstabs - put before/after or each condition in
Statistics - Chi Square & McNemar
Cells - observed (ticket) but for percentages tick total
How does the comparison of Pearson interpretation differ from McNemar total?
The interpretation of McNemar total uses total percentages - i.e. total of yes before vs total yes after (these are found in the total sections of the table)
For Pearson’s the comparison would use values within rows/columns