Multiple Choice Questions

Before completing the book’s Coder/Hacker chapter exercises, take this multiple-choice pre-test from the end of the chapter.

Next, visit the Coder and Hacker Chapter exercises page for more.

1: Which of the following measures would be most appropriate for describing the central tendency of a variable that is continuous and normally distributed?

  1. Mean
  2. Variance
  3. Median
  4. Mode

Ans: A

2: Which of the following measures would be most appropriate for describing the spread of a variable that is extremely right-skewed?

  1. Standard deviation
  2. Range
  3. IQR
  4. Mode

Ans: C

3: True or False? In R, categorical variables are best represented by the factor data type and continuous variables are best represented by the numeric data type.

  1. True
  2. False

Ans: A

4: Custom functions are useful when doing which of the following?

  1. Loading a library
  2. Visualizing the distribution of one variable
  3. Working with continuous variables
  4. Doing the same thing multiple times

Ans: D