T-Tests and Nonparametrics Flashcards
what are the parametric statistics?
t-tests
one sample t-tests
paired sample t-tests
2 independent sample t-tests
what is a paired sample t-test?
comparing pre and post data
what is a 2 independent sample t-test?
2 unrelated samples compared
what are the nonparametric statistics?
wilcoxon signed tank test
mann whitney U test
what are the parametric statistics assumptions?
it is continuous data (DV)-interval and ratio variables
n is greater than or equal to 30/normally distributed data
homogeneity of variance (homoscedasticity)
what is homoscedasticity?
the variability of group is similar (not applicable when there is only one sample)
when is nonparametric testing used?
when the DV is measured on a continuous scale but n<30/data is not normally distributed
when DV’s level measurement is categorical (ordinal and nominal)
is the assumption of normality violated in parametric or nonparametric testing?
nonparametric testing
t/f: you can’t assume normal distribution with nonparametric testing
true
what is a t distribution?
a symmetrical curve about the mean
shape of the curve depends on the degrees freedom (df)
what is the degrees freedom?
n-1
why use a t distribution instead of a z distribution?
bc using z scores tends to be inaccurate w/small sample sizes
as the t distribution nears 30, does the curve become more or less like a z distribution?
more
t/f: if you can’t assume n=30, you can’t use z
true
what kind of variables are used in t tests?
continuous variables (interval and ratio)
what are the types of t tests?
one sample
two samples (independent and dependent)
what are the assumptions for t tests?
samples were drawn from a normally distributed population
samples are random
homogeneity of variance (only for independent samples t test)
continuous variables
what is homogeneity of variance?
similarity in variance
what are independent samples?
data points that have no relation
ie. one person’s knee angle doesn’t affect another person’s knee angle
do parametric tests use mean or median?
mean
do nonparametric tests use mean or median?
median
what does a one sample t test do?
compares one population mean to a hypothesized value (mu0)
what is the assumption of a one sample t test?
the population is at least approximately normally distributed
OR
the sample size is big enough (typically n is greater than or equal to 30)
what are the 3 possible hypotheses for a one sample t test?
1) H0: mu=mu0; Ha: mu is not equal to mu0 (2-sided)
2) H0: mu is less than or equal to mu0; Ha: mu>mu0 (1-sided)
3) H0: mu is greater than or equal to mu0; Ha: mu<mu0 (1-sided)
what are the different ways of testing the assumptions of normality?
graphical interpretation
numerical values (skewness and kurtosis, statistic tests)
what are the types of statistical tests for assessing the assumption of normality?
Shapiro Wik (most used)
Kolmogorov-Smirnov
Anderson-Darling
what is the graphical interpretation for normality testing?
comparing the histogram of the sample data to a normal probability curve
what is the advantage of the graphical interpretation?
normality testing can be overly sensitive, but this will still work
what is the disadvantage of graphical interpretation?
it can be subjective
what is the advantage of the numerical values to test normality?
it is objective
what is the disadvantage of the numerical values to test normality?
it is sometimes not going to be sensitive enough w/a smaller sample size
what is a widely used test for normality using numerical values?
the Shapiro-Wilk (SW) test
is the SW test a one or two sample testing procedure?
one sample testing procedure
what are the hypothesis of the SW test?
H0: the data are normally distributed (distribution=normal)
Ha: the data are not normally distributed (distribution is not equal to normal)
do you have to reject or fail to reject (accept) H0 to use parametrics?
you have to fail to reject H0 to use parametrics
why does H0 have to be accepted to use parametrics?
bc this means that it is a normal distribution
if p>alpha, do we reject or fail to reject H0? why?
fail to reject H0 bc this means the change is not significant
are the hypothesis for SW testing one or two sided?
two sided bc there is not directionality
with the SW test, if p>alpha, is the data normal or not normal? is parametric testing ok?
the data is normal and you can use parametric testing
with the SW test, if p is less than or equal to alpha, is the data normal or not normal? is parametric testing ok?
the data is not normal, so parametrics should not be used
what kind of variable is IQ?
ratio
we are trying to see if LA residents have a dif IQ than the national average of 100 (alpha=0.05), and 7 LA residents are randomly sampled with the following data: 107, 96, 97, 92, 95, 109, 101.
what is the n?
what is H0?
what is Ha?
are the hypothesis one or two sided?
n=7
H0: mu=100
Ha: mu is not equal to 100
these are 2-sided hypotheses
if we were to hypothesize that residents of LA were dumber than the national IQ of 100, what would the hypotheses be? would these be one or two sided?
H0: mu is greater than or equal to 100
Ha: mu < 100
these are one sided hypotheses
if a SW test has a p value of .433 do we reject or fail to reject H0?
fail to reject because p is greater than .05 (alpha)
if we have t=-.18, df=6, and p=.87, with the LA residents example, what would a conclusion be?
the mean IQ of LA residents isn’t significantly different from the national average (t=-.18, df=6, p=.87)
how do we report confidence intervals (CI)?
(% CI: lower values, upper value)
if we have a CI of 95%, how would we report this?
(95% CI: 93.68, 105.47)
if the LOC is 95%, what is the probability of error (alpha)?
5% (0.05)
if the LOC is 99%, what is the probability of error (alpha)?
1% (0.01)
if H0 is mu=100 and Ha is mu is not equal to 100, and we have a CI of (93.68, 105.47) do we reject or fail to reject H0?
we fail to reject H0 because 100 is contained in the range
if H0 is mu=100 and Ha is mu is not equal to 100, and we have a CI of (90,99) do we reject or fail to reject H0?
reject H0 bc 100 is not in this range
in the nonparametric approach, do we use the mean or median?
median
do we typically make assumptions about the distribution with the nonparametric approach?
no
if the assumptions of normality fail and we incorrectly use parametric testing instead of nonparametric testing, what happens?
inaccurate p value
greater type 1 and 2 errors than stated (alpha is no longer held at 0.05)
our decision (accept or reject H0) is more likely to be wrong
you have 12 pediatric ER patients with ulnar fractures that you ask to rate their pain on a VAS of 0-10. determine if the center of the pain score for this population is different from 5:
data: 6, 10, 9, 4, 10, 3, 5, 7, 9, 10, 3, 9
what is H0?
what is Ha?
are the hypothesis one or two sided?
H0: m=5
Ha: m is equal to 5
these are two sided hypothesis
what type of variable is a pain scale?
ordinal
if p<0.05, do we reject or fail to reject H0?
we reject H0 bc the distribution is not normal
what are the assumptions of the Wilcoxen Signed Rank test?
the samples were selected independently and at random from their respective populations
the data used is not a normal distribution
with the Wilcoxen Signed Rank test, do we use the mean or median?
median bc it is nonparametric
what are the hypothesis for Wilcoxen Signed Rank test?
H0: m=m0
Ha: m is not equal to m0
H0: m is less than or equal to m0
Ha: m>m0
H0: m is greater than or equal to m0
Ha: m<m0
what is the procedure for the Wilcoxen Signed Rank test?
1) calculate di=xi-m0
2) calculate |di|
3) rank absolute values (1=smallest, n=largest) and make corrections for ties)
4) sign each rank according to the sign of the difference di
5) add up the + ranks to get T+ and - ranks to get T-
6) calculate test statistics z and p based on T+ and/or T-
you have 12 pediatric ER patients with ulnar fractures that you ask to rate their pain on a VAS of 0-10. determine if the center of the pain score for this population is different from 5:
data: 6, 10, 9, 4, 10, 3, 5, 7, 9, 10, 3, 9
di: 1, 5, 4, -1, 5, -2, 0, 2, 4, 5, -2, 4
|di|: 1, 5, 4, 1, 5, 2, 0, 2, 4, 5, 2, 4
ranks: 2.5, 11, 8, 2.5, 11, 5, 1, 5, 8, 11, 5, 8
signed: 2.5, 11, 8, -2.5, 11, -5, 1, 5, 8, 11, -5, 8
p=0.035
z=2.103
what is T+?
what is T-?
what is the test statistic used?
do we reject or fail to reject H0?
what is the conclusion?
T+=54.5 (I got 65.5???)
T-=-12.5
test statistic (z)=2.103
reject H0 bc p<alpha
conclusion: the median pain rating was significantly different from 5 (z=2.103, p=0.035)
if T+ and T- are closer, should we reject or fail to reject H0?
fail to reject H0
if T+ and T- are very different, do we reject or fail to reject H0?
reject H0
what are the advantages of the Wilcoxen Signed Rank test?
it accounts for the magnitude of differences
is doesn’t;t require normally distributed data
what are the disadvantages of the Wilcoxen Signed Rank test?
the ranking differences results in info loss (we don’t know how big of a difference their is bw 1st and 2nd place for example)
t/f: the advantages and disadvantages of the Wilcoxen Signed Rank test apply to other nonparametric tests too
true
when choosing a one sample test when would we not run a SW test?
when the n is greater than or equal to 30 (bc it can be assumed to be a normal distribution so we don’t have to test normality)
if p>alpha, should we run a parametric or nonparametric test?
parametric
if p is less than or equal to alpha, should we run a parametric or nonparametric test?
nonparametric
if data is categorical, should we automatically run a parametric or nonparametric test?
nonparametric
is the Wilcoxen Signed Rank test a parametric or nonparametric test?
nonparametric
is age a continuous variable?
yes, it is a ratio variable
how do you find the lower limit?
mean - (mean differnce-lower CI for dif)
how do you find the upper limit?
mean + (mean difference-upper CI for dif)
what does it mean for two samples to be independent?
data points in one sample are unrelated to data points of the other sample
when you compare two population means what is being compared?
a group of data points to another group of data points
what are examples of independent samples?
is BP higher in those who drive to work compared to those who walk to work?
is the mean weight of football players dif from the mean weight of baseball players?
is there a dif in cholesterol levels bw the French and American citizens?
do independent samples t tests require the sample sizes of the 2 groups to be the same?
nope
what is the assumption of independent samples t tests?
the 2 samples are drawn from normally distributed populations OR both sample sizes are big enough (n is greater than or equal to to 30)
2 populations are independent from each other
homogeneity of variance (homoscedasticity)
if homoscedasticity is not met, is this a deal breaker for independent samples t tests?
nope
what are the hypothesis in this independent sample t-test example? is the variable continuous? is n>30?
suppose we measure SBP in 2 pops (commuters and walkers). Is the mean SBP in commuters higher than the mean SBP in walkers at the 5% significance level?
H0: mu(commuters) is less than or equal to mu(walkers)
Ha: mu(commuters) >mu(walkers)
continuous variable
n<30
if p>alpha, with 2 samples, what test do we run?
2 indpendent samples test
if p<alpha, with 2 samples, what test do we run?
a nonparametric test
if 2 samples are continuous data and have n<30, how do we test for normality?
run a separate SW test for each sample
what are the hypothesis for normality testing?
H0: normal
Ha: not normal
t/f: both samples in an independent samples t test need to satisfy the normality assumptions to run the t-test
true
the SPSS output shows 2 dif scenarios with independent samples t test, what are they and how do we decide which to use?
equal variance assumed or not assumed
we decide which to use by running the Levene test for equality of homodescacity
are true population variances known?
nope
what are 2 possibilities for population variances with independent samples?
the variance in 2 populations may be equal (homogeneity of variance/homoscedasticity)
the variance in 2 populations may be unequal
t/f: the test statistic (t) and p-value differ depending on the equal or unequal variances
true
how do we decide if 2 samples have equal variance?
graphical interpretation (box plot)
statistical test (Levene’s test)
what do we use for graphical interpretation of variance?
box plot
what do we use for statistical testing of variance?
Levene’s test
is the graphical or statistical test of variance better to use for objective info?
statistical test of variance
what is Levene’s test?
a comparison of variance from at least 2 groups that uses absolute deviations from some “center” to define variability, then forms a ratio
does the Levene’s test have any assumptions?
nope
can Levene’s test be used with data that isn’t normal?
yes!
what is the disadvantage of Levene’s test?
it doesn’t make excessive type 1 errors, but does make excessive type 2 errors
when is the trimmed mean used in Levene’s test?
when the normal distribution has a heavier tail
when is the mean used with Levene’s test?
with parametrics
when is the median used with Levene’s test?
with nonparametrics
what are the hypothesis for Levene’s test?
H0: population variances are equal (sigma 1 squared=sigma 2 squared)
Ha: population variances are not equal (sigma 1 squared is not equal to sigma 2 squared)
t/f: the hypothesis for Levene’s test are always 2 sided
true
what test statistic does Levene’s test use?
F
if the p value of a Levene’s test is >0.05, what is the conclusion?
the variances are equal (fail to reject the null)
if the p value of a Levene’s test is less than or equal to 0.05, what is the conclusion?
the variances are unequal (reject the null)
if a Levene’s test has a p value of 0.053, what is the conclusion?
p>alpha–> fail to reject the null=variances are equal
when is equal variance assumed?
when p>alpha
fail to reject the null
when is unequal variance assumed?
when p is less than or equal to alpha
reject the null
what are the parametric independent samples tests?
independent samples t test for equal variances
independent samples t test for unequal variances
what are the assumptions of parametric independent samples tests?
the data is normally distributed
OR
n is greater than or equal to 30 for all samples
what is the nonparametric independent samples test?
Mann Whitney U test
t/f: the Mann Whitney U test doesn’t require normally distributed data
true
can the Mann Whitney U test use categorical data?
yes
what are the assumptions of the Mann Whitney U test?
the samples are selected independently and randomly from their respective populations
the measurements scale is at least ordinal
can you run a Mann Whitney test with nominal data?
no
what is the hypothesis for the Mann Whitney U test testing?
the equality of medians from 2 populations (m1, m2)
what are the 2 sided hypotheses for the Mann Whitney U test?
H0: m1=m2
Ha: m1 doesn’t equal m2
what are the 1 sided hypotheses for the Mann Whitney U test?
H0: m1 is less than or equal to m2; Ha: m1>m2
H0: m1 is greater than or equal to m2; Ha: m1<m2
what is the procedure of the Mann Whitney U test?
1) pool data fromt he 2 groups into 1 sample
2) rank the observations in the pooled sample
3) sum the ranks w/in groups
4) calculate the test statistic U
5) calculate p-value
there are 20 patients w/ulnar fxs in a peds ER that are asked to rate their pain on a VAS scale 1-20
10 were randomly given a stuffed animal upon admission and 10 weren’t. conduct a test to determine if the median pain scores for these groups were significantly different.
stuffed animal group: 9,8,4,12,14,9,14,6,5,7
no stuffed animal group: 6,5,19,8,10,13,20,12,12,15
pooled stuffed animal: 8.5,6.5,1,12,15.5,3.5,2,5
pooled no stuffed animal: 3.5,17.5,19,6.5,10,14,20,12,12, 17.5
U=31.500
p (2 sided)=0.161
is the data categorical or continuous?
what is the hypothesis?
what are the rank sums?
if this one or two sided?
what is the conclusion?
the data is ordinal (categorical)=nonparametrics
m1: median for pts who received stuffed animals
m22: median for pts who didn’t receive stuffed animals
H0: m1=m2
Ha: m1 is not equal to m2
rank sum for m1: 78
rank sum for m2: 132
this is two sided
conclusion: VAS scores in children who got the stuffed animal is similar to the children who didn’t get the stuffed animal (U=31.500, p=0.161)
fail to reject H0 bc p>alpha
if n is less than 30 and the data is continuous, what test should be run?
SW
if the p of two independent samples is greater than alpha, what test should be run?
independent samples t test
how do we decide whether to run the independent samples t test for equal or unequal variances?
run the Levene’s test
if one of the p values of 2 independent samples is less than or equal to alpha, what test do we run?
Mann Whitney U test
t/f: when comparing 2 related population means, the observations from 2 “sets” are naturally paired together
true
do sample sizes have to be the same in both sets when comparing related samples?
yes
what is the test called that compares 2 related population means?
paired sample(s) t test
what are the drawbacks of using independent variables in testing?
randomization is good but not perfect and may lead to samples being imbalanced w/regard to important factors (more of one age in a group)
“no intervention” groups aren’t “controlled” (what if one beings a diet/exercise regimine during the study?)
what are the benefits of using 2 related samples in testing?
subjects serve as “self control”
removes any variability from the randomization process (bc there is only one group that everyone falls under)
more directly measures the impact of the intervention
what is the most common example of paired data?
b4 and after studies
what are examples of paired sample tests?
intervention studies
twin studies
comparative studies of spousal characteristics
what are the assumptions of paired sample t tests?
2 samples are drawn from normally distributed populations
OR
sample sizes are big enough (greater than 30) for both samples
if the samples are not large enough in a paired t test, what test should be run?
SW
t/f: the sample sizes of of related samples is the # of pairs, not the # of observations
true
how do we test the assumption of normality in paired samples?
calculate the difference (di) bw paired values and run the SW test
what are the 3 possible hypotheses for the paired samples t test?
H0: mu1=mu2; Ha: mu1 is not equal to mu2
H0: mu1 is less than or equal to mu2; Ha: mu1>mu2
H0: mu1 is greater than or equal to mu2; Ha: mu1<mu2
OR
H0: mud=0; Ha: mud is not equal to 0
H0: mud is less than or equal to 0; Ha: mud>0
H0: mud is greater than or equal to 0; Ha: mud<0
what is mu d?
mu1-mu2
we measure a preferred overground gait speed in 8 ambulatory individuals with SCI b4 and after 30 sessions of intensive locomotor training (1 hr/session, 5 days/week)
is the intensive locomotor training effective in increasing the preferred overground gait speed in ppl w/motor-incomplete SCI?
p (normality test)=.420
t=-2.986
p=0.020
what are the hypotheses?
is it one or two sided?
what kind of data is it?
what is n?
should a SW test be run?
what is the p value?
what is the conclusion?
H0: mu pre is greater than or equal to mu post
Ha: mu pre < mu post
ratio variable
n<30
SW test should be run
p=0.010
conclusion: intensive locomotor training significantly increased the mean preferred gait speed in ppl w/motor-incomplete SCI (t=-2.986, DF=7, p=0.010)
what is the alternative paired samples t test?
identical to the one sample t test on the within-pair differences
let xi and to be the pair of data (b4 and after)
calculate the differences di=xi-yi
run a one sample t test on the difference di
what is the procedure for the Wilcoxon signed rank test for paired samples?
1) let xi and to be the pair (before and after)
2) calculate the difference di=xi-yi
3) run the Wilcoxon signed rank test on the differences di
10 individuals are recruited to attend a public health education forum. before attending a 20 question test was administered testing health knowledge. individuals attended the forum then take a similar 20 question test. researchers want to test if the median # of correct answers improved.
before: 10,12,9,14,8,5,15,17,13,4
after: 12,15,8,18,18,14,10,18,11,19
differences: -2,-3,1,-4,-10,-9,5,-1,2,-15
ranks: 3.5,5,1.5,6,9,8,7,1.5,3,5,10
signed: -3.5,-5,1.5,-6,-9,-8,7,-1.5,3,5,-10
DF=10
p(normality test)=0.008
p-value (2 sided)=0.114
what kind of data is this?
what is n?
what is the hypothesis?
what is the conclusion on normality?
what is the test statistic?
what is p?
what is the conclusion?
continuous variable
n<30
H0: m pre is greater than or equal to m post / md is greater than or equal to 0
Ha: m pre<m post / md < 0
conclusion on normality: p<alpha=nonparametrics
test statistic=Z
p=0.057
conclusion: the median test scores didn’t significantly improve after attending the forum; the health knowledge of the attendees of the forum didn’t significantly improve after the forum (Z=, p=0.057)
when choosing paired samples testing, if n is less than 30, what should we do?
run the SW test on the within pair differences (di)
when choosing paired samples testing, if p>alpha, what test should be run?
paired samples t test
when choosing paired samples testing, if p<alpha, what test should be run?
Wilcoxen signed rank test
if you have a sample with 1 group and want to run a parametric test, what test would you run?
one-sample t test
if you have a sample with 1 group and want to run a nonparametric test, what test would you run?
Wilcoxon rank test
if you have a 2 paired sample dataset and want to run a parametric test, what test would you run?
paired sample t test
if you have a 2 paired sample dataset and want to run a nonparametric test, what test would you run?
Wilcoxon signed rank test
if you have 2 independent samples in your dataset and want to run a parametric test, what tests could you run?
independent samples t test w/equal variances
independent samples t test w/unequal variances
if you have 2 independent samples in your dataset and want to run a nonparametric test, what test would you run?
Mann Whitney U test