MCQs on Descriptive and Inferential Statistics | R

This set of 30 multiple-choice questions focuses on descriptive and inferential statistics in R, covering topics like summary statistics, distributions, hypothesis testing, and correlation and regression techniques.


Chapter: Descriptive and Inferential Statistics in R – MCQs

1. Summary Statistics and Distributions (10 Questions)

  1. Which function is used to calculate the mean of a vector in R?
    a) mean()
    b) avg()
    c) sum()
    d) median()
  2. What does the sd() function in R compute?
    a) Standard deviation
    b) Sum of squares
    c) Variance
    d) Median
  3. Which function would you use in R to calculate the variance of a vector?
    a) variance()
    b) var()
    c) sd()
    d) mean()
  4. What is the result of the summary() function in R when applied to a dataset?
    a) Displays the summary statistics (mean, median, etc.)
    b) Displays the dataset in a tabular format
    c) Creates a plot of the data
    d) Performs a t-test
  5. Which of the following functions in R generates a histogram of data?
    a) hist()
    b) summary()
    c) boxplot()
    d) barplot()
  6. In R, which function is used to compute the mode of a data set?
    a) mode()
    b) mode() is not available in base R
    c) mean()
    d) find_mode()
  7. What does the quantile() function do in R?
    a) Computes the mode
    b) Computes specific percentiles
    c) Computes the mean
    d) Computes the standard deviation
  8. Which distribution is used by default in R for generating random numbers with a normal distribution?
    a) rbinom()
    b) rnorm()
    c) runif()
    d) rexp()
  9. Which of the following R functions generates random numbers from a uniform distribution?
    a) rnorm()
    b) runif()
    c) rbinom()
    d) rexp()
  10. What does the density() function in R compute?
    a) The correlation of a vector
    b) The density estimate of a vector
    c) The variance of a vector
    d) The quantile of a vector

2. Hypothesis Testing (t-tests, ANOVA, Chi-square) (10 Questions)

  1. Which of the following tests is used to compare the means of two independent samples in R?
    a) t-test
    b) ANOVA
    c) Chi-square test
    d) Correlation test
  2. What does the t.test() function in R return?
    a) The correlation coefficient
    b) The p-value and confidence interval
    c) The variance
    d) The summary statistics
  3. What type of test is performed by the aov() function in R?
    a) t-test
    b) ANOVA
    c) Chi-square test
    d) Correlation test
  4. When should you use the Chi-square test in R?
    a) When comparing means
    b) When comparing variances
    c) For categorical data comparison
    d) For correlation analysis
  5. Which of the following is the null hypothesis for a two-sample t-test in R?
    a) The means are equal
    b) The means are different
    c) The variances are equal
    d) The data follows a normal distribution
  6. What is the default assumption of the t.test() function in R regarding the variances of the two groups?
    a) Equal variances
    b) Unequal variances
    c) Homogeneous variances
    d) It does not assume anything
  7. What does a significant p-value (less than 0.05) in a hypothesis test indicate in R?
    a) Reject the null hypothesis
    b) Accept the null hypothesis
    c) The data follows a normal distribution
    d) The variance is equal
  8. Which of the following is a key assumption of the ANOVA test in R?
    a) The samples must be independent
    b) The samples must have equal variances
    c) The data must be normally distributed
    d) All of the above
  9. In R, which test would you use to determine if there is a relationship between two categorical variables?
    a) t-test
    b) ANOVA
    c) Chi-square test
    d) Linear regression
  10. How do you perform a one-way ANOVA in R?
    a) aov()
    b) t.test()
    c) chisq.test()
    d) cor.test()

3. Correlation and Regression Basics (10 Questions)

  1. Which function in R is used to compute the correlation coefficient between two variables?
    a) cor()
    b) regress()
    c) lm()
    d) cov()
  2. What does a correlation coefficient of -1 indicate in R?
    a) No correlation
    b) Perfect positive correlation
    c) Perfect negative correlation
    d) A strong relationship
  3. In R, which function is used to fit a linear regression model?
    a) regress()
    b) lm()
    c) glm()
    d) model()
  4. What is the purpose of the summary() function when applied to a linear model in R?
    a) Displays the R-squared value
    b) Displays the coefficients and p-values
    c) Displays the residuals
    d) All of the above
  5. In linear regression, what does the lm() function in R return?
    a) A summary of the data
    b) A linear model object
    c) A correlation matrix
    d) The predicted values
  6. What does an R-squared value of 0.85 in a regression model indicate?
    a) 85% of the variation is explained by the model
    b) 85% of the data is normal
    c) 85% of the residuals are zero
    d) There is no relationship between variables
  7. Which of the following is a key assumption for performing linear regression in R?
    a) Homoscedasticity
    b) Linear relationship between variables
    c) Independence of residuals
    d) All of the above
  8. What is the main purpose of the cor.test() function in R?
    a) To perform a correlation test
    b) To perform a t-test
    c) To fit a regression model
    d) To test for normality
  9. Which function in R would you use to test for the goodness-of-fit of a regression model?
    a) fit.test()
    b) summary()
    c) cor.test()
    d) lm()
  10. In R, how do you interpret a p-value from a regression model?
    a) A p-value greater than 0.05 suggests a statistically significant relationship
    b) A p-value less than 0.05 suggests a statistically significant relationship
    c) A p-value of 1 indicates no correlation
    d) A p-value of 0 indicates perfect correlation

Answers

QNoAnswer (Option with the text)
1a) mean()
2a) Standard deviation
3b) var()
4a) Displays the summary statistics (mean, median, etc.)
5a) hist()
6b) mode() is not available in base R
7b) Computes specific percentiles
8b) rnorm()
9b) runif()
10b) The density estimate of a vector
11a) t-test
12b) The p-value and confidence interval
13b) ANOVA
14c) For categorical data comparison
15a) The means are equal
16a) Equal variances
17a) Reject the null hypothesis
18d) All of the above
19c) Chi-square test
20a) aov()
21a) cor()
22c) Perfect negative correlation
23b) lm()
24d) All of the above
25b) A linear model object
26a) 85% of the variation is explained by the model
27d) All of the above
28a) To perform a correlation test
29b) summary()
30b) A p-value less than 0.05 suggests a statistically significant relationship

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top