Stat Tests Flashcards
What is the use of the one-sample t-test?
Compare mean in sample to known mean
What is the purpose of an independent t-test?
Compare means of two independent samples
What is the purpose of paired sample t-test?
Compare mean from single sample at two points
How is the t-statisitc used in hypothesis testing?
- calculate test statisitc representing question
- compare sample value to sampling distribution under null
- test statistic = t-statistic under t-distribution
What do the numerator and the denominator of the t-statistic represent?
Numerator = difference in means
Denominator = estimate of variability
What does the t-statistic represent?
the standardised difference in means
What are the data requirements for a one sample t-test?
- continuous variable
- known mean to compare to sample mean
- sample of data to calculate sample mean
What is a t-distribution?
continuous probability similar to normal distribution
What are the key parameters of t-distribution?
- degree of freedom
- df = function of n
- n ^ as degrees of freedom decreases t-distribution approaches normal distribution
What is the code for the critical values?
- tibble(
LowerCrit = round(qt(0.025, 39),2),
UpperCrit = round(qt(0.975, 39),2),)
What is the code for a one sample t-test?
t.test(dat$Age, mu=65, alternative=”…..”)
What assumption tests are performed for a one-sample t-test?
- Descriptive statistics
- Shapiro-Wilks test
- QQ- plot
What are the requirements for assumption tests to be valid?
- DV is continuous
- Independence making sure data independent
- Normality -> data sufficiently large, n = 30
What are the three descriptive statistics?
- Skew
- Histogram
- Density plot
What are the general guidelines for skew statistics?
- Skew < 1 = Generally not problematic
- 1 > Skew < 2 = Slight concern
-Skew > 2 = Investigate impact
What are the three parts needed in histogram/density plot?
- ggplot
- geom_density
- labs
What are QQ-plots?
- plots sorted quantiles of one data set against expected data.
Distribution vs Distribution
How do we know if data is concerning on a QQ-plot?
- The dots are deviate away from the line
What is the purpose of the Shapiro-Wilks test?
- checks properties of observed data against properties normally expected from normally distributed data
What does H0 represent in Shpairo-Wilks?
Data came from a sample normally distributed
If we have H0 in a Shapiro-Wilk what do we do?
p-value < α = reject null, data not normal
What are the guidelines for Cohen’s D?
Small < 0.20
Medium = 0.50
Large > 0.80
What are the steps for calculating the standard error difference in independent t-tests?
- Calculate pooled standard deviation
- Use pooled SD to calculate SE of difference
What are the calculation steps for the independent t-test?
- calculate sample mean in groups x1 and x2
- Calculate pooled SD sp
- Calculate SE
- Check you know your n
- Calculate t