Topic 10: Tests for Mean Flashcards
Describe the Z test (1 sample)
Similar to Proportion test, BUT
- The population SD is known (in peanut data example, popSD was calculated)
- Usually continuous data, only applicable to binary data if the sample size is large enough
Why do we usually prefer T test over Z test?
In Z test, the population SD is assumed to be known. In most cases, we only have the sample, not the population so the popSD cannot be known. In T test, popSD is replaced by sample SD.
What is degree of freedom?
Degree of freedom is the degree of wide-ness of the TS distribution when the sample SD vary depending on the sample size
State the TS formula for 1 sample T test
TS = (OV-EV)/(sampleSD/sqrt(n))
Describe the paired T test
Answers to the question of “Is there any difference?”
–> H0: mean exhaustion time difference = 0
Both data sets will be used to generate the difference between them –> the differences is now 1 sample that we use
Contrast SD and SE
- SD: how far each cyclist varies from the mean in this example sample of 9
- SE: how far the sample means vary from the true population mean (all elite cyclists)
Describe hypothesis and assumptions of the 2 sample T test
- Hypothesis: H0 can be something like there is no change/no difference (for the question does red bull change the heart rate in students?) mean1=mean2
- Assumptions:
+ 2 samples are independent
+ 2 populations have equal spread (SD/variance)
+ 2 populations are Normal
State the formula for TS in 2 sample T test
TS = (OV-EV)/SE = (mean1-mean2-0)/SE
SE = sqrt(poolSD^2 * (1/n1 + 1/n2))
poolSD^2 = (((n1-1)SD1^2) + ((n2-1)SD2^2)) / (n1+n2-2)
Identify and describe the test used for equal spread + R code
Levene’s Test (F-Test) - tests the null hypothesis that the spread is equal between two populations
var.test()
Identify and describe the tests used for normality
- Q-Q plot: graphs theoretical quantiles based on the normal curve vs. actual quantiles
+ If the dots can be connected by a fairly straight line –> conclude Normality - Shapiro-Wilk test: tests the null hypothesis that the data is Normal
+ shapiro.test()
How can comparative boxplots test normality and equality of variance?
- Normality: whether the boxes look symmetrical
- Equality of variance: how data is spread (the box and the line)
Identify and describe situations in which assumptions for 2 sample T test are not met and other tests to replace
- 2 samples have unequal spread/SD/variance: Welch 2 Sample T test
+ t.test(data1,data2, var.equal=F) - 2 samples are not Normal:
+ transformations or non-parametric tests (eg wilcox.test) - 2 sample are not independent:
+ paired T-test (sample of difference)