Final: Ch 11-20 Flashcards
Numerical Variables from a Single Sample
When is Ȳ normally distributed?
whenever:
- Y is normally distributed, OR
- n is large
Numerical Variables from a Single Sample
If Ȳ is normally distributed, what can we convert its distribution to?
standard normal distribution
Numerical Variables from a Single Sample
What does a standard normal distribution do?
gives a probability distribution of the difference between a sample mean and the population mean
Numerical Variables from a Single Sample
What is used to calculate the confidence interval of the mean?
t-distribution
What does a one-sample t-test do?
compares the mean of a random sample from a normal population, with the population mean proposed in a null hypothesis
What are the hypotheses for a one-sample t-test?
H0: mean of the population is µ0
HA: mean of the population is not µ0
What is the degrees of freedom for a one-sample t-test?
df = n-1
What are the assumptions of a one-sample t-test? (2)
- variable is normally distributed
- sample is a random sample
Tests that compare means have what type of variables?
one categorical and one numerical variable
Paired vs. 2-sample t-tests
paired comparisons: allow us to account for a lot of extraneous variation
- ie. before and after treatment
- ie. upstream and downstream of power plant
- ie. identical twins – one with treatment, one without treatment
- ie. how to get earwigs in each ear out – compare tweezers to hot oil
2-sample comparisons: sometimes easier to collect data for
What are paired comparisons?
data from the two groups are paired
- each member of pair shares much in common with the other, except for the tested categorical variable
- there is one-to-one correspondence between the individuals in the two groups
- in each pair, there is one member that has one treatment/group and another who has another treatment/group
What do we used to compare two groups in paired comparisons?
use mean of the difference between the two members of each pair
What is a paired t-test?
one sample t-test on the differences
What does a paired t-test do?
compares mean of the differences to a value given in null hypothesis
for each pair, calculate the difference
What is the number of data points in a paired t-test?
number of pairs – NOT number of individuals
What is the degrees of freedom for a paired t-test?
df = number of pairs - 1
What are the assumptions of a paired t-test?
- pairs are chosen at random
- differences (NOT individuals) have normal distribution
What does a 2-sample t-test do?
compares means of numerical variable between two populations
What is the degrees of freedom for a 2-sample t-test?
df1 = n1 - 1 df2 = n2 - 1
What are the assumptions of a 2-sample t-test? (3)
- both samples are random samples
- both populations have normal distributions
- variance of both populations is equal
What does Welch’s t-test do?
compares means of two groups without requiring the assumption of equal variance
What is different about the degrees of freedom for Welch’s t-test compared to other tests?
degrees of freedom is not necessarily an integer
Wrong Way to Make Comparison of Two Groups
–
“Group 1 is significantly different from a constant, but Group 2 is not. Therefore Group 1 and Group 2 are different from each other.”
What does Levene’s test do?
compares variances of two (or more) groups
use R to calculate
What does the F test do?
most commonly used test to compare variances
Why do we usually use Levene’s test instead of F test?
F test is very sensitive to its assumption that both distributions are normal
What are the 2 tests that compare variances?
- Levene’s test
- F test
What 2 tests can conduct two-sample comparisons?
2-sample t-test or Welch’s t-test
What 2 tests can conduct two-sample comparisons?
2-sample t-test or Welch’s t-test
What does 2-sample t-test and Welch’s t-test both assume?
normal distributed variables
What assumption differs between 2-sample t-test and Welch’s t-test?
- 2- sample t-test assumes equal variance
- Welch’s t-test does NOT assume equal variance
What can you compare the means of two groups using? (2)
- mean of paired differences
- mean difference between two groups
What are the assumptions of all t-tests? (2)
- random sample(s)
- populations are normally distributed
(for 2-sample t-test only): populations have equal variances
What are methods to detect deviations from normality? (4)
- previous data / theory
- histograms
- quantile plots
- Shapiro-Wilk test
What does normal data look like in a quantile plot?
points form an approximately straight line
What is the Shapiro-Wilk Test used for?
to test statistically whether a set of data comes from a normal distribution
What do you do when assumptions are not true? (5)
- if sample sizes are large, sometimes parametric tests work OK anyway
- transformations
- non-parametric tests
- permutation tests
- bootstrapping
Why do parametric tests on large samples work relatively well even for non-normal data?
means of large samples are normally distributed
rule of thumb: if n > ~50, then normal approximations may work
What parametric test is ideal when assumptions are not true?
Welch’s t-test
if sample sizes are equal and large, then even a 10x difference in variance is approximately OK – but Welch’s is still better
What are data transformations?
changes each data point by some simple mathematical formula
then carry out the test on transformed data
When is log transformation useful? (3)
- variable is likely to be the result of multiplication or division of various components
- frequency distribution of data is skewed right
- variance seems to increase as mean gets larger (in comparisons across groups)
What are some other types of transformations? (3)
- arcsine transformation
- square-root transformation
- reciprocal transformation
What are characteristics of valid transformations? (3)
- require same transformation be applied to each individual
- have one-to-one correspondence to original values
- have monotonic relationship with original values (ie. larger values stay larger)
What should you consider when choosing transformations? (3)
- must transform each individual in the same way
- transformed values must still carry biological meaning
- you CANNOT keep trying transformations until P < 0.05
What do non-parametric (“distribution-free”) methods assume?
assume less about underlying distributions
What do parametric methods assume?
assume a distribution or a parameter
What are some non-parametric tests? (3)
- sign test
- RANKS
- Mann-Whitney U test
What does the sign test do?
compares data from one sample to a constant
How is a sign test conducted?
- for each data point, record whether individual is above (+) or below (–) hypothesized constant
- use binomial test to compare result to ½
Does sign test have high or low power?
has very low power – therefore it is likely to NOT reject false null hypothesis
What does it mean for a test to have high power?
more power → more information → higher ability to reject false null hypothesis
What is RANKS?
used by most non-parametric methods
rank each data point in all samples from lowest to highest – ie. lowest data point gets rank 1, next lowest gets rank 2, …
What does the Mann-Whitney U test do?
compares central tendencies of two groups using ranks (equivalent to Wilcoxon rank sum test)
How is a Mann-Whitney U Test conducted?
- rank all individuals from both groups together in order (for example, smallest to largest)
- sum the ranks for all individuals in each group → R1 and R2
- calculate U1: number of times an individual from population 1 has lower rank than an individual from population 2, out of all pairwise comparisons
What are the assumptions of the Mann-Whitney U Test? (2)
- both samples are random samples
- both populations have the same shape of distribution – only necessary when using Mann-Whitney to compare means
What is a permutation test used for?
for hypothesis testing on measures of association – can be done for any test of association between two variables
How is a permutation test conducted?
- variable 1 from an individual is paired with variable 2 data from a randomly chosen individual – this is done for all individuals
- estimate is made on randomized data
- whole process is repeated numerous times – distribution of randomized estimates is null distribution
What does it mean if permutation tests are done without replacement?
all data points are used exactly once in each permuted data set
What are the goals of experiments? (2)
- eliminate bias
- reduce sampling error (increase precision and power)
What are some design features that reduce bias? (3)
- controls
- random assignment to treatments
- blinding
What is a control?
group which is identical to the experimental treatment in all respects aside from the treatment itself
What is random assignment?
individuals are randomly assigned to treatments
How does random assignment reduce bias?
averages out effects of confounding variables
What is blinding?
preventing knowledge of experimenter (or patient) of which treatment is given to whom
How do the results of unblinded studies compare to blinded studies?
unblinded studies usually find much larger effects (sometimes 3x higher) – shows the bias that results from lack of blinding
How can you reduce sampling error?
increase signal to noise ratio
if ‘noise’ is smaller, it is easier to detect a given ‘signal’ – can be achieved with smaller s or larger n
What are some design features that reduce the effects of sampling error? (4)
- replication
- balance
- blocking
- extreme treatments
What is replication?
carry out study on multiple independent objects
What is balance?
nearly equal sample sizes in each treatment