Hypothesis testing Flashcards

1
Q

What is a type I error?

A

The probability that we will reject the null hypothesis (concluding that there is an effect) when there actually isn’t

A false positive

Thinking you have found gold but it is actually an aluminium can

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

What is the typical level of type I errors in biological sciences?

A

0.05 / 5%

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

What is a type II error?

A

Failing to reject a false null hypothesis (when there is an effect)

A false negative

A metal detector doesn’t beep when there is gold underground

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

Test statistic for one-sample t-test

A

t = difference between measured mean and hypothesised value of the mean / SE of the mean

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

What does a one-sample t-test do?

A

Tests whether the mean of the sample of data is equal to a hypothesised mean

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

Paired t-test

A

Special case of the one-sample t-test
We have a pair of measurements per subject (before and after for example)

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

What does a paired t-test do?

A

Tests whether the mean of the set of differences is equal to zero

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

Two-sample t-test test statistic

A

t = difference between out measured difference between 2 means and the difference between 2 means that we expect under the null hypothesis / SE of the difference between 2 means

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

What does the two-sample t-test do?

A

Tests if the means of two samples of data are the same or significantly different

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

Two-sample t-tests assuming equal variances are robust for sample sizes…

A

> = 30
Per group

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

If the two groups have _____ in each group, then it is still OK to use the two-sample t-test when the SDs of the groups differ by up to ______ fold

A

Similar numbers
Three

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

What is the t-test where equal variances are not assumed?

A

Welch’s T-test

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

What is the test statistic for an ANOVA?

A

F = treatment mean square / error mean square

(explained variance (signal) / unexplained variance (noise))

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

What does an ANOVA do?

A

Tests if all the means of more than two groups are the same or significantly differ

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

What do hypothesis tests involve?

A

A test statistic
A distribution from which we expect the test statistic to come from if the null hypothesis is true
Calculation of a p-value

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

What does a p-value tell us?

A

The probability of obtaining the value of the test statistic, or a more extreme value, if the null hypothesis is true

17
Q

What is an interaction?

A

When the effect of one variable on the outcome variable differs depending on the level of another variable

The effect of a drug on blood pressure differs depending on the type of diet they eat

18
Q

Assumptions of a t-test

A

Data are normally distributed

19
Q

Assumptions of ANOVA

A

The error (residuals) is normally distributed
Variance of the unexplained variation is constant throughout the dataset (homogeneity of error/residuals)

20
Q

Chi Squared Test statistic

A

χ2 = sum( (observed - expected)2 / expected )

21
Q

How do you calculate the expected value in Chi Squared?

A

Expected = (row total x column total) / grand total

22
Q

Assumptions of a Chi Squared Test

A

All expected counts are >= 5
Mean of counts = the variance of the counts
The Poisson distribution can be approximated by a Normal distribution, which is true as long as the mean is >= 5

23
Q

If all counts aren’t >= 5 in Chi Squared Test, when is it still reasonable to run the test?

A

As long as all expected counts are >= 1
80% of the expected counts are >= 5

24
Q

How to check for normally distributed residuals?

A

Plot histogram of the residuals and check the shape

Plot the normal Q-Q plot of the residuals (the dots should be not too far from the line, shouldn’t bend away from the line in any systematic fashion)

25
Q

How to check the homogeneity of residuals/error?

A

Residuals vs fitted values plot

Looking to see that there are no obvious differences between the groups, (they don’t get bigger as the fitted values get bigger for example) scatter of positive and negative residuals in each case

26
Q

Bonferroni correction

A

overall p-value / number of tests conducted

This gives a new p-value that you can use as a threshold

27
Q

Why do we correct our p-value for multiple comparisons?

A

When we do a statistical test, there is a 5% chance that we will reject a true null hypothesis (get a false positive)
If we conduct multiple analyses, there is a 5% chance each time that this will happen, so our error gets bigger (for 3 tests there is 5 + 5 + 5% = 15% chance that we will get a false positive)
We need to correct for this so that our results still only have 5% error overall

28
Q

What can we do if our data don’t fit the assumptions of a statistical test?

A

Transform the data

29
Q

What types of transformation can we do?

A

Log the data
Square the data
Square root the data

30
Q

Non-parametric alternative to two-sample t-test

A

Mann-Whitney U Test

31
Q

Null hypothesis of Mann-Whitney U Test

A

The two groups being compared come from the same distribution, with the same median

It doesn’t matter what the shape of that distribution is

32
Q

How to conduct a Mann-Whitney U Test

A
  1. Convert the values into ranks
  2. Find the sum of ranks in both samples
  3. Calculate U for both samples
  4. Test statistic (U) = minimum of U1 and U2
33
Q

Assumptions of the Mann-Whitney U Test

A

The two groups being compared follow the same distribution (if one is left-skewed, the other group should be left skewed)