Comparing data Flashcards
Parametric test for comparing paired, continuous data?
Paired t-test
What are the assumptions for the paired t-test
Differences are plausibly normally distributed
Differences are independent of each other
Steps to calculate a p-value from a paired t-test
- Calculate the differences between the values in each group (d)
- Calculate the mean + standard deviation of the means
- Calculate the standard error of the mean difference
- Calculate the test statistic (t)
- Under the null hypothesis, t is distributed as Student’s t, with n-1 degrees of freedom
- Look up this value in tables to find p-value (gives two-tailed p value)
How is the test statistic (t) calculated for paired t-test?
dbar(-0)/SE(dbar)
dbar = mean of the differences
How is the 100% (1-α)% confidence interval for the mean difference in the population calculated?
d(bar)-[txSE(dbar)] to dbar+[txSE(dbar)]
dbar = mean difference
t taken from t distribution table with n-1 degrees of freedom
What is the non-parametric equivalent of the paired t-test? (for assessing paired data)
Wilcoxon (matched pairs) signed rank test
What does the Wilcoxon signed rank test test?
Test of null hypothesis that there is no tendency for the outcome under one set of conditions to be higher or lower than under the comparison set of outcomes
What is the parametric test for independent, continuous data?
Independent samples t-test
What are the assumptions for the independent two sample t-test
Two independent groups
Continuous outcome
Outcome data in both groups is normally distributed
Outcome data in both groups have similar standard deviations
Steps to calculate a p value from the independent two sample t-test
- Calculate the difference between means of groups
- Calculate the pooled standard deviation of the means
- Calculate the standard error of the difference between two means
- Calculate the test statistic (t)
- Compare the test statistic with the t distribution with n1+n2-2 degrees of freedom
- Look up this value in tables to find p-value (gives two-tailed p value)
How is pooled SD for two independent groups calculated?
√[(n1-1)SD1^2+(n2-1)SD2^2]/n1+n2-2
How is standard error of difference between two means calculated for two independent groups?
pooled SDx√(1/n1)+(1/n2)
How is the test statistic (t) calculated for independent samples t test?
d/SE
d = observed difference in means
SE = standard error of difference in means
How is the 100% (1-α)% confidence interval for the difference between means in the population calculated?
(xbar1-xbar2) +/- [txSE(difference)]
What is the non-parametric equivalent of the independent samples t-test?
Mann-Whitney U test
What does the Mann-Whitney U test show?
Test of the null hypothesis that the distribution of the outcome variable in the two groups is the same
Steps for Mann-Whitney U test
- Arrange all data in increasing order
- Choose one group: for each observation in that group, count how many observations in the other group lie below it
- All numbers added up = U-statistic
- Compare U test statistic with theoretical distribution under null hypothesis (that samples come from the same population)
What two tests can be used when assessing more than two independent groups?
Analysis of variance technique (ANOVA) = parametric
Kruskal-Wallis test = non-parametric
How can we compare binary outcome data?
Comparison of two proportions
What are the requirements for a comparison of two proportions?
Only makes sense in 2x2 tables e.g. yes or no outcome
Two independent samples or groups
Large sample with all expected frequences >5
- np and n(1-p) should both exceed 5
- n = total number of individuals in both samples
- p = proportion of individuals with condition
Assumes a common proportion
How is the common proportion calculated in a comparison of two proportions?
p=(n1p1 + n2p2)/(n1+n2)
n = sample size
p = proportion with condition
How is the standard error for the difference in proportions calculated, where a common proportion is assumed?
SE(p1-p2) = √p(1-p)(1/n1+1/n2)
Where p is the common proportion calculated
How is the test statistic (z) calculated in the comparison of two proportions
z=(p1-p2)(-0)/SE(p1-p2)
How is the 95% confidence interval for the difference in proportions calculated?
(p1-p2)+/- [1.96xSE(p1-p2)]