Statistical tests in R Flashcards

(37 cards)

1
Q

What command is used in R to conduct an independent samples t-test?

A

t.test

The t.test function is used to compare means between two groups.

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

What is the null hypothesis in a two-sample test comparing means?

A

There will be no significant difference in the means

This hypothesis assumes that any observed difference is due to sampling error.

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

What assumptions must be checked before conducting an independent samples t-test?

A
  • The scatter of points around the means is roughly equal
  • The scatter of points around the means follows a normal distribution
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What R command checks for equal variance?

A

var.test

This command tests whether two samples have equal variances.

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

What is the alternative hypothesis in a two-sample test comparing means?

A

There will be a significant difference in the means

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

What is the R command for the Mann-Whitney U test?

A

wilcox.test

Used for comparing the medians of two groups when the distribution is not normal.

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

What is the primary purpose of the paired samples t-test?

A

To compare means of two paired samples

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

What is the command for a one-way ANOVA in R?

A

aov

One-way ANOVA is used to compare means across three or more groups.

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

What is the null hypothesis in a one-way ANOVA?

A

There will be no significant difference in the means among the groups

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

What command is used to conduct a Kruskal-Wallis test in R?

A

kruskal.test

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

What statistical test is used to analyze the relationship between two numerical variables?

A

Linear regression

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

What is the R command for performing linear regression?

A

lm

The lm function fits a linear model.

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

What does a correlation coefficient range from?

A

-1 to 1

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

What are the assumptions for performing Pearson’s correlation?

A
  • Linear relationship between variables
  • Both variables have normal distributions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What command is used to perform a Pearson’s correlation in R?

A

cor.test(VARIABLE A, VARIABLE B, method = ‘pearson’)

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

What is the purpose of a Chi-squared contingency table test?

A

To test the association between two categorical variables

17
Q

What command is used in R for the Chi-squared test?

A

chisq.test(x)

18
Q

What is the alternative hypothesis in a test of association between two categorical variables?

A

There is a significant association between the variables

19
Q

What is the significance level often used in hypothesis testing?

20
Q

What is the Bonferroni correction used for?

A

To adjust the significance level when multiple tests are conducted

21
Q

What does the p-value indicate in hypothesis testing?

A

The probability of observing the data if the null hypothesis is true

22
Q

What is the command to check for normal distribution in R?

A

hist(model$residuals)

23
Q

What are the three different surgical techniques being compared for follow-up pain?

A

Technique A, Technique B, Technique C

Specific techniques are not detailed in the text.

24
Q

Is socio-economic status (SES) associated with the severity of COVID-19 infection?

A

Yes

SES is often linked to health outcomes.

25
Does the frequency of growth inhibition of bacteria depend on the bacterial strain and the antibiotic used?
Yes ## Footnote Different strains may respond variably to antibiotics.
26
What is the test statistic used in the Pearson's Chi-squared test?
χ2 ## Footnote This statistic compares observed and expected values.
27
What are the assumptions for the Chi-squared test?
None of the expected values should be too small (<5) ## Footnote Ensures validity of the test results.
28
What is a key feature of R in terms of flexibility?
R is insanely flexible ## Footnote Allows for extensive customization.
29
What type of graphs can R produce?
Publication-quality graphs ## Footnote Fully customizable for specific needs.
30
What is one benefit of R's modularity?
Analyses can be automated easily ## Footnote Streamlines repetitive tasks.
31
What is R's stance on cost?
R is free ## Footnote Open-source software accessible to everyone.
32
What is a common source of error in R coding?
Wrong case (R is case sensitive) ## Footnote Case sensitivity can lead to errors.
33
What are some statistical tests you have the code for?
* t-tests (independent samples and paired samples) * One-way ANOVA * Linear regression * Correlation (Pearson’s and Spearman’s) * Chi-squared test ## Footnote These tests are fundamental for data analysis.
34
What should be tested for in t-tests and ANOVA?
Equal variance ## Footnote Ensures valid comparisons between groups.
35
What is an alternative to ANOVA if residuals are non-normal?
Kruskal-Wallis test ## Footnote Non-parametric alternative to ANOVA.
36
Fill in the blank: R is _______.
fun ## Footnote Many users find R enjoyable to work with.
37
What is the command to create a boxplot in ggplot?
ggplot(prac1B, aes(x=rainfall, y=phosphate)) + geom_boxplot() ## Footnote This command visualizes the relationship between rainfall and phosphate.