classic stat tests Flashcards

1
Q

Hypothesis test for comparing the variances of two samples

A

f-test

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

## F = 28.517, num df = 5, denom df = 4, p-value = 0.003169
## alternative hypothesis: true ratio of variances is greater than 1
## 95 percent confidence interval:
## 4.558378 Inf
## sample estimates:
## ratio of variances
## 28.51747

How can we interpret the R output?

A

It returns the following:

the value of the F test statistic.
the degrees of freedom of the F distribution of the test statistic.
the p-value of the test is 0.2105
95% confidence interval for the ratio of the population variances.
the ratio of the sample variances is 2.4081
The p-value of the F-test is p = 0.003169 which is lower than the alpha level of 0.05. In conclusion, there is a difference between the two samples.

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

hypothesis test for a single mean

A

t-test

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

One Sample t-test
## data: type_A
## t = -0.64336, df = 5, p-value = 0.5483
## alternative hypothesis: true mean is not equal to 70
## 95 percent confidence interval:
## 28.37016 94.96317
## sample estimates:
## mean of x
## 61.66667

How can we interpret the R output?

A

p-value: The two-tailed p-value that corresponds to a t test-statistic of -0.64336 and 5 degrees of freedom.

The null and alternative hypotheses for this one sample t-test are as follows:

H0: µ = 70 (the mean is 70)

HA: µ ≠ 70 (the mean is not 70)

Because the p-value of our test (0.5483) is greater than 0.05, we fail to reject the null hypothesis of the test.

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

how to compare two means of the two groups.

A

two sample t-test

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

what assumptions are made in two sample t-test

A
  1. The two groups are independent;
  2. The observations within each group are independent;
  3. The variance of the measurements within each group are similar;
  4. The observations from each of the groups are normally distributed.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Welch Two Sample t-test
##
## data: type_A and type_B
## t = -0.82687, df = 5.4177, p-value = 0.4432
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -44.14995 22.28328
## sample estimates:
## mean of x mean of y
## 61.66667 72.60000
**
Question How can we interpret the R output?

A

t: This is the t test-statistic.
The two hypotheses for this particular two sample t-test are as follows:

H0: µ1 = µ2 (the two population means are equal)
HA: µ1 ≠µ2 (the two population means are not equal)

Because the p-value of our test (0.4432) is more than alpha = 0.05, we accept the null hypothesis of the test.

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

The Mann-Whitney U test (Wilcoxon rank-sum test)

A

test is used as a substitution for the unpaired t-test, when the assumptions of normality fail to be satisfied.

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

what does the Mann-Whitney U test (Wilcoxon rank-sum test) compare

A

the median values in the two groups and not the mean like the t-test.

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

what assumption is made in the Mann-Whitney U test (Wilcoxon rank-sum test)

A

the data can be ranked. Instead of using the observations, we use their ranking.
However, if the data is normally distributed using the Mann-Whitney test would be less powerful than using the t-test for small samples.

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

Wilcoxon rank sum exact test
##
## data: type_A and type_B
## W = 13, p-value = 0.7922
## alternative hypothesis: true location shift is not equal to 0
Question How can we interpret the R output?

A

p-value of 0.7922 and the significance value we chose is 0.05, then there
is no evidence to reject the null hypothesis.

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

comparing two dependent means

A

paired t-test

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

Paired t-test
##
## data: group1 and group2
## t = 1.633, df = 4, p-value = 0.0889
## alternative hypothesis: true difference in means is greater than 0
## 95 percent confidence interval:
## -0.6109684 Inf
## sample estimates:
## mean of the differences
## 2

  1. How do we interpret the R output?
A

p value is greater than 0.05; accept the null hypothesis

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

what assumptions are made in paried t-test

A
  1. Independence: Each observation should be independent of every other observation.
  2. Normality: The differences between the pairs should be approximately normally distributed.
  3. No Extreme Outliers: There should be no extreme outliers in the differences.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

what test is applied to matched or dependent samples

A

The Wilcoxon matched pairs test (Wilcoxon signed rank
test)

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

Wilcoxon signed rank test with continuity correction
##
## data: group_1 and group_2
## V = 15, p-value = 0.05791
## alternative hypothesis: true location shift is not equal to 0

How do we interpret the R output?

A

p value is greater than 0.05; accept the null hypothesis

17
Q

A binomial test

A

when an experiment has two possible outcomes (i.e. success/failure) and you have an idea about what the probability of success is. A binomial test is run to see if observed test results differ from what was expected.

18
Q

##
## data: 90 and 200
## number of successes = 90, number of trials = 200, p-value = 0.179
## alternative hypothesis: true probability of success is not equal to 0.5
## 95 percent confidence interval:
## 0.3797536 0.5217507
## sample estimates:
## probability of success
## 0.45

A

The p-value of the test is 0.179. Since this is greater than 0.05, we can accept the null hypothesis

19
Q

Assumptions for the Binomial Test

A

Items are dichotomous (i.e. there are two of them) and nominal.
The sample size is significantly less than the population size.
The sample is a fair representation of the population.
Sample items are independent(one item has no bearing on the probability of another).

20
Q

one sample z-test is used to

A

test whether the mean of a population is less than, greater than, or equal to some specific value.

21
Q

what does the z-test assume

A

assumes that the population standard deviation is known.
The data are continuous (not discrete).
The data is a simple random sample from the population of interest.
The data in the population is approximately normally distributed.

22
Q

two sample z-test is used to

A

test whether two population means are equal.

23
Q

what assumptions are made in two sample z-test

A

The data from each population are continuous (not discrete).
Each sample is a simple random sample from the population of interest.
The data in each population is approximately normally distributed.
The population standard deviations are known.

24
Q

comparing counts in contigency tables

A

Pearson’s chi-squared test

25
the hypothesis of a Pearson’s chi-squared test
H0: (null hypothesis) The two variables are independent. H1: (alternative hypothesis) The two variables are not independent.
26
## ## Pearson’s Chi-squared test ## ## data: count ## X-squared = 35.334, df = 1, p-value = 2.778e-09 How can we interpret the R output?
p value less than 0.05 so refect null hypothesis
27
Fisher’s Exact test
is to test if there is association between variables in a contigency table concept, but for small samples
28
The power of a test is affected by a number of different things (4)
1. The significance level. Tests with a lower level have a lower power. 2. The sample size. A larger sample size means more power. 3. The standard deviation of the data. If the data are very spread, it is harder to tell the difference between two means - hence the power is lower. 4. The effect size. i.e. the true difference between the two groups. The larger this is, the easier it is to spot in the data, and hence, the larger the power.
29
What are the differences and similiraties between the unpaired t-test and the Mann-Whitney U test?
The Mann-Whitney test is used as a substitution for the unpaired t-test, when the assumptions of normality fail to be satisfied. compares the median values in the two groups and not the mean like the t-test.
30
Is the Wilcoxon signed rank test, a parametric test?
no, its a Non-parametric test same as The Mann-Whitney U test (Wilcoxon rank-sum test)
31
What are the Type I and Type II errors?
type I is faslse positive type II is false negative
32
nonparametric test doesn’t assume
normality
33
what kind of test is used ff the data is not normally distributed but are symmetrically distributed around the mean
valid to use parametric tests. This is because the central limit theorem, the means of samples which are symmetrically distributed tend to be normally distributed if the sample size is large enough
34
what is done if the data is postive or negative skewed
transformation to make the distribution more symmetrical
35
25 students took a test; the mean was predicited to be 58% what test would used to test the different?
one sample t-test
36
Students were tested on their ability to predict how moving bodies behave, both before and after attending a course on Newtonian physics. what test would see if attending the course have a significant effect on their test scores
paired t-test
37
The pH of cactus cells was measured at dawn and at dusk using microprobes. The cactus was identifiable, and two sets of measurements were carried out on it. what test to anaylse?
two sample t-test
38
We can never use a Normal approximation to test whether two proportions are equal or not.
false
39
compare the proportion in one random sample to a specified population proportion
normal approximation