Comparing Two Groups Flashcards
How do you compare two unrelated groups (apples and oranges)?
By comparing their z score (standard deviation)
What test do you use to compare your data against a theoretically predicted mean?
One sample t-test
In one-sample t-tests, what do these symbols mean?
X = The sample mean we actually observed
μ = true population mean if the null hypothesis is correct
In one-sample t-tests, what does σ mean?
SEM (standard error of the mean)
What is the R code for one-sample t-tests?
t.test(x, y)
x = the variable containing raw data
y = true population mean, according to null hypothesis
alternative: oneSampleTTest(x, y)
What is the symbol for the test statistic in a one-sample t-test?
t
Since one-sample t-tests are unsure about what the true standard deviation is, how do they obtain the overall sampling distribution for the t-statistic?
Average over lots of possible choices for the standard deviation.
What happens to the sampling distribution of t as the sample size (N) grows larger?
Our estimate of the standard deviation is more precise and the t-distribution grows similar to normal.
How are degrees of freedom calculated for a t-distribution?
N-1
N = number of data points
1 = number of constraints (i.e. the mean)
How is the t-tests t statistic calculated
(Sample mean we observed - true population mean if the null hypothesis is correct)
/ (divided by)
(The true population standard deviation / SEM)
Because the width of the t distribution depends on sample size, the size of the rejection region changes as ___ increases
N
(number of data points)
What is Cohen’s d?
A simple measure of effect size
How do you interpret Cohen’s d (roughly)
How do you run Cohen’s d in R?
library(lsr)
>cohensD(x, y)
(x,y same as t-test)
How do you write up the results of a one-sided t-test
e.g. (t(19) = 3.42, p = .003)
How do you write the null hypothesis and the alternative hypothesis for one-sided and two-sided one-sample t-tests?
Two-sided one-sample t-test:
H0: the true mean is (x)
H1: the true mean isn’t (x)
One-sided one sample t-test:
H0: the true mean is x or less (or more if the other way)
H1: the true mean is above x
What is the R command for one-sided t-tests in R?
t.test(x, y, alternative=”greater”)
x = sample mean
y = theorised mean
alternative = ‘greater’ or ‘less’ depending on direction
When do you use an independent samples t-test?
When comparing two groups
How do you write the null hypothesis and alternative hypothesis for independent samples t-tests?
What assumptions are made in an independent samples t-test?
population distributions are normal
observations are independently sampled
groups have the same standard deviation
(a.k.a. “homogeneity of variance”, “homoscedasticity”)
What is the diagnostic test statistic for independent samples t-tests?
What is the sampling distribution?
test statistic: t
Sampling distribution: t, with N1+N2-2 degrees of freedom
If the null hypothesis is true in an independent sample t-test, what should the sampling distribution of t be?
Close to 0
If different, substantially different from 0
Student t-test assumes what about variance?
Equal variance
What is the R command for a student t-test?
t.test( price ~ colour, wines, var.equal=TRUE )
just like independent samples but with added variance