Stat Tests Flashcards

1
Q

What is the use of the one-sample t-test?

A

Compare mean in sample to known mean

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is the purpose of an independent t-test?

A

Compare means of two independent samples

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the purpose of paired sample t-test?

A

Compare mean from single sample at two points

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How is the t-statisitc used in hypothesis testing?

A
  • calculate test statisitc representing question
  • compare sample value to sampling distribution under null
  • test statistic = t-statistic under t-distribution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do the numerator and the denominator of the t-statistic represent?

A

Numerator = difference in means
Denominator = estimate of variability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What does the t-statistic represent?

A

the standardised difference in means

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the data requirements for a one sample t-test?

A
  • continuous variable
  • known mean to compare to sample mean
  • sample of data to calculate sample mean
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a t-distribution?

A

continuous probability similar to normal distribution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the key parameters of t-distribution?

A
  • degree of freedom
  • df = function of n
  • n ^ as degrees of freedom decreases t-distribution approaches normal distribution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the code for the critical values?

A
  • tibble(
    LowerCrit = round(qt(0.025, 39),2),
    UpperCrit = round(qt(0.975, 39),2),
      )
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the code for a one sample t-test?

A

t.test(dat$Age, mu=65, alternative=”…..”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What assumption tests are performed for a one-sample t-test?

A
  • Descriptive statistics
  • Shapiro-Wilks test
  • QQ- plot
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What are the requirements for assumption tests to be valid?

A
  • DV is continuous
  • Independence making sure data independent
  • Normality -> data sufficiently large, n = 30
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the three descriptive statistics?

A
  • Skew
  • Histogram
  • Density plot
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the general guidelines for skew statistics?

A
  • Skew < 1 = Generally not problematic
  • 1 > Skew < 2 = Slight concern
    -Skew > 2 = Investigate impact
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the three parts needed in histogram/density plot?

A
  • ggplot
  • geom_density
  • labs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What are QQ-plots?

A
  • plots sorted quantiles of one data set against expected data.
    Distribution vs Distribution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

How do we know if data is concerning on a QQ-plot?

A
  • The dots are deviate away from the line
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is the purpose of the Shapiro-Wilks test?

A
  • checks properties of observed data against properties normally expected from normally distributed data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What does H0 represent in Shpairo-Wilks?

A

Data came from a sample normally distributed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

If we have H0 in a Shapiro-Wilk what do we do?

A

p-value < α = reject null, data not normal

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What are the guidelines for Cohen’s D?

A

Small < 0.20
Medium = 0.50
Large > 0.80

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

What are the steps for calculating the standard error difference in independent t-tests?

A
  1. Calculate pooled standard deviation
  2. Use pooled SD to calculate SE of difference
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

What are the calculation steps for the independent t-test?

A
  1. calculate sample mean in groups x1 and x2
  2. Calculate pooled SD sp
  3. Calculate SE
  4. Check you know your n
  5. Calculate t
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

How many degrees of freedom is an independent t-test?

A

n-2

26
Q

What is the code for indepedent t-test?

A

res <- t.test(threat$Score ~ threat$Group,
alternative = “less”
,
mu = 0,
var.equal = TRUE,
conf.level = 0.95)

27
Q

What are the assumptions of the indepedent sample t-test?

A
  • indepedence of observations within and across groups
  • continuous variable normally distribution within both groups
28
Q

What is the homogeneity of variance?

A
  • test comparing variance of two groups
  • F-test used
29
Q

What does H0 mean in the homogeneity of variance?

A

H0: population variance is equal

30
Q

What does it mean when ‘p-value < α’ in a variance test?

A
  • rejecting variances differ across groups
31
Q

What is the code for variance test?

A

var.test(threat$Score ~ threat$Group, ratio = 1)

32
Q

Why is the ratio one in a variance test?

A

H0 means the variance is equal and that equates to 1
H1 the variance doesn’t equal one meaning the variance is not equal

33
Q

What is used to measure if the homogeneity is violated?

A

Welch test

34
Q

What is the difference between the welch test and independence t-test?

A

Independent t-test uses pooled standard deviation but the welch test doesn’t

35
Q

What changes occur in the Welch test?

A
  • estimation of SE of difference
  • degree of freedom
36
Q

What is the difference in the R code for the independent t-test and welch test?

A

in independent Var.equal is TRUE
Welch var.equal is FALSE

37
Q

What are the calculation steps for paired t-test?

A
  1. calculate difference in difference scores for individual di (T1 and T2)
  2. Calculate mean of difference scores dbar
  3. calculate the sd of difference scores
  4. check n is known
  5. calculate SE of mean difference SEdbar
38
Q

What is the R code to make data wide?

A

exam_wide <- exam %>%

pivot_wider(id_cols = ID,

names_from = time,

values_from = stress)

head(exam_wide)

39
Q

What type of data does chi-squared word with?

A
  • categorical data
  • count data
40
Q

What is chi-squared used for?

A

checks whether data grouped according to expectations
- compares frequencies across categories in data

41
Q

How is chi-squared test similar to t-tests?

A
  • compute test-statistic
  • locate test-statistic on distribution reflecting probability of each test statistic value, given H0 = true
  • Probability associated w test statistic small enough results are significant
42
Q

How is Chi-squared and t-tests different?

A

chi-squared not computed using sample size, uses number of groups within data

43
Q

List 3 characteristics of the chi-squared distribution?

A
  • number of comparison groups increases, the distribution curve flattens
  • chi-squared distribution begins at 0
  • distribution can only have positive value
44
Q

What direction is chi-squared p-value computed in and why?

A

p-value computed right-tailed as probability observing chi-squared statistic as big or bigger than one obtained

45
Q

What is the data requirement for chi-squared tests?

A
  • variables must be measured at ordinal or nominal level
46
Q

What are the assumptions for a chi-squared test?

A
  • expected counts greater than 5
  • observations must be independent = mutually exclusive
47
Q

What are the two types of chi-squared tests?

A
  • goodness of fit
  • test of independence
48
Q

What does the goodness of fit chi-squared test?

A
  • test whether proportions/ relative frequencies of observed values consistent with expected proportions/ relative frequencies
  • looks at distribution of data across single category
49
Q

What is the null hypothesis of a goodness of fit test?

A

expect proportions are equal

50
Q

What is the alternative hypothesis of a goodness of fit test?

A

one of the populations not as specified in the null

51
Q

What is the calculation process for a goodness of fit test?

A
  1. calculate expected accounts -> Ei = n x pi
  2. Calculate the difference between observed and expected
  3. Square each value
  4. Divide the numerator by the denominator
  5. Sum up all the values in the last column
52
Q

What are residuals and when are they use ?

A
  • Pearsons residuals
  • used when results significant and inform which category had the biggest difference
53
Q

What do residuals mean?

A
  • positive residuals indiciate observed frequency higher than expected frequency
  • negative residuals indiciate observed frequency lower than expected frequency
54
Q

What is classed as an extreme residual and what does that represent?

A

Values less than -2 = observed frequency much lower than expected
Values greater than 2 = observed frequency much higher than expected

55
Q

what does a chi-squared test of independence test?

A
  • checks whether two categorical variables from single population are independent of each other
  • tests whether membership in variable 1 is dependent upon membership upon variable 2
56
Q

What is the calculation process for a test of independence ?

A
  1. calculate expected counts for each cell for each row or column -> Eij = Ri x Cj / n -> row total x column total / overall sum
  2. calculate difference between observed and expected
  3. square the difference
  4. Divide square values by expected
  5. sum up all the rows across all of the columns
57
Q

How is the degrees if freedom calculated in chi-squared?

A

(rows -1)(columns - 1)

58
Q

List the three ways to measure effect size for chi-squared?

A
  • Phi coefficient
  • Cramer’s V
  • Odds Ratios
59
Q

What are the cut off points for phi coefficient?

A

small effect = 0.1
medium effect = 0.3
large effect = 0.5

60
Q

How is the degrees of freedom calculated for Cramer’s V?

A

min(r-1, c-1) -> use the minimum

61
Q
A