12. comparing the means of 2 groups Flashcards
Situation of comparing means
two variables, one categorical with two categories, and one numerical
compare means of numerical variable between the two diff groups
paired comparisons
use the mean of the difference between two members of each pair
ex. upstream - downstream
paired designs
data from 2 groups are paired
each member of pair has a LOT in common with the other, except for the tested categorical variable
there is a 1 to 1 correspondence btwn individuals in the 2 groups
EX. before and after treatment for same individual! where 2 groups are before and after
*** takes advantage of individuals being very similar, thus making standard error relatively smaller
Why are paired designs useful?
allows to account for variation that we don’t care about, if two individuals paired differ only in variable being studied
Paired t-test
Compares the mean of differences between each pair to a value given by the null hypothesis
calc difference between each pair
= one sample t-test on differences
use of t vs Z distribution
ALWAYS t, accounts better for the fact that we have to estimate the variance/sd from the data
Hypothesis test for difference in means
variables??
2-sample t-test - is difference in means 0 or not?
2 variables, 1 categorical (which group ind. belongs to), 2nd variable = numerical!
Assumptions of 2 sample t-test
Both samples = random samples
both populations have normal distributions
the variance of both populations is equal!
elaboration on equal variance assumption of 2 sample t-test
assumes variance of both POPULATIONS is equal to each other, NOT of the samples!!
accounted for by pooled variance, which uses both samples to make an est. for shared variance
Welch’s t-test diff from two sample t
Purpose: compare means of two groups
DOESN’T assume both populations have equal variance
different way to calculate t, and df
when variances ARE similar/equal the t-sample t test has more POWER
POWER
= ability to reject a false null hypothesis
95% conf int bars DONT overlap
two means ARE significnatly different
95% conf int. - one mean inside error bars of the other
two means NOT significantly different
95% conf int error bars overlapping BUT don’t overlap w/ mean of other group
Difference in means unknown, must go to other statistical tests!
Comparing variance of groups
Applicable when part of scientific question
NOT to test assumptions
Not responsible for this by hand
Levene’s test purpose
compare the variance of two groups
insensitive to normality assumption!!!
Problems with F test
VERY sensitive to assumption that both distributions are normal!
Strategies to compare the means of two groups
the mean of paired differences (for paired design)
the mean diff between two groups
For paired data:
conf ints are just like from a single sample CI on the differences
paired t-tests are like one sample t-tests on differences
two separate groups
Two sample t-test
welch’s t-test
Both assume normal distributed variables
2-sample assumes equal var, welches’ doesnt
Compare variances
Levene’s!