Chapter 2: Descriptive Statistics: Tabular and Graphical Methods

1.  The image below shows the bar graph of data values in the object named “nobelprizes.” Which function produces the image?

  1. barplot(nobelprizes, ylim = c(0, 20), main = 'Nobel Prize Recipients in Medicine and Physiology: 2001-2016')
  2. barplot(nobelprizes, xlab = ‘Nations/Regions’, ylab = ‘Counts’)
  3. barplot(nobelprizes, xlim=c(0,20), col = c(“palette”)
  4. barplot(nobelprizes, ylim = c(0, 20), col = c('purple', 'yellow', 'gold', 'green', 'orange', 'blue', 'red', 'cyan'), main = 'Nobel Prize Recipients in Medicine and Physiology: 2001-2016') X

Solution:

 The correct choice is d.

mcq1-ch2.jpg

2.  The first step to producing the above image involves creating an object that contains the relevant data values---in this case, the country/region of those scientists who have been recipients or co-recipients of the Nobel Prize in medicine/physiology during 2001-2016.  Which of the choices below can be used to create such an object? (Note that the object name is “medicine.”)  

  1. medicine <- c(seq(Australia, 3), seq(Canada, 1), seq(China, 1), seq(EU, 8), seq(Japan, 3), seq(S Africa, 1), seq(UK, 8), seq(US, 19))
  2. medicine <- c(rep('Australia', 3), rep('Canada', 1), rep('China', 1), rep('EU', 8), rep('Japan', 3), rep('S Africa', 1), rep('UK', 8), rep('US', 19)) X
  3. medicine <- c(seq(‘Australia’, 3), seq(‘Canada’, 1), seq(‘China’, 1), seq(‘EU’, 8), seq(‘Japan’, 3), seq(‘S Africa’, 1), seq(‘UK’, 8), seq(‘US’, 19))
  4. medicine <- c(rep(Australia, 3), rep(Canada, 1), rep(China, 1), rep(EU, 8), rep(Japan, 3), rep(S Africa, 1), rep(UK, 8), rep(US, 19))

Solution:

The correct choice is b.

3.  The second step to producing the above image involves creating the final object that is submitted to the barplot() function.  (In this case, that object has been named “nobelprizes.” See the exercise 1.) Which of the choices below can be used to create such an object?

  1. nobelprizes <- hist(medicine)
  2. nobelprizes <- summary(medicine)
  3. nobelprizes <- table(medicine) X
  4. nobelprizes <- barplot(medicine)

Solution:

The correct choice is c.

4.  This image shows the distribution of “Weight” from the “Cars93” data (see Chapter 2, exercise 4).   Which choice can be used to create this image?

  1. hist(Cars93$Weight, col = c('blue', 'gold', 'blue', 'gold', 'blue', 'gold'), xlab = "Weight (in pounds) of Vehicle", ylab = "Frequency", xlim = c(1000, 5000), ylim = c(0, 30), main = "Histogram of Vehicles by Weight (in pounds)") X
  2. hist(Cars93$Weight, breaks = 20, col = c(“palette”) )
  3. hist(Cars93$Weight, breaks = 6)
  4. hist(Cars93$Weight, breaks = c(“best subset), col = c(“blue, “gold”))

Solution:

The correct choice is a.

mcq3-ch2.jpg

5.  The image below shows plot of data values in the object named “nobelprizes” (see the first exercise above). Which function produces the image?

  1. dotchart(sort(nobelprizes / sum(nobelprizes)), xlab = "Relative Frequencies of Nation/Region", xlim = c(0, 0.50), pch = 19, col = "red") X
  2. dotchart(nobelprizes / sum(nobelprizes), xlab = "Relative Frequencies of Nation/Region", xlim = c(0, 0.50), pch = 19, col = "red")
  3. plot(nobelprizes, xlim = c(0, 0.50), pch = 19, col = "red")
  4. plot(sort(nobelprizes / sum(nobelprizes)), xlab = "Relative Frequencies of Nation/Region", xlim = c(0, 0.50), pch = 19, col = "red")

Solution:

The correct choice is a.

mcq5-ch5.jpg

6.  The image below shows the scatterplot of data values in the object named “london.” Which function produces the image?

  1. plot(Men, Women, xlim = "Times for Men", ylim = "Times for Women")
  2. plot(london$Women, london$Men, col = “purple”, pch = 17)
  3. plot(london$Men, london$Women, 20, “purple”)
  4. plot(london$Men, london$Women, pch = 20, col = "purple", main = "Plot of Winning Marathon Times for Men and Women: 1990-2015", xlab = "Times for Men", ylab = "Times for Women") X

Solution:

The correct choice d.

mcq6-ch2.jpg

7.  The image below shows the scatterplot of data values in the object named “hetero.” Which function produces the image?

  1. plot(hetero$X, hetero$Y, col = "blue", pch = 17, xlab = "X", ylab = "Y") X
  2. plot(hetero$X, hetero$Y, pch = "blue", col = 17, xlab = "X", ylab = "Y")
  3. plot(hetero$Y, hetero$X, col = "blue", pch = 17, xlab = "Y", ylab = "X")
  4. plot(hetero$X, hetero$Y, col = "blue", pch = 17, main = “A Scatterplot”)

Solution:

The correct choice is a.

mcq7-ch2.jpg

8.  The image below shows the scatterplot of data values in the object named “parabola.” Which function produces the image?

  1. plot(parabola$Y, parabola$X, xlab = "X", ylab = "Y", pch = 19)
  2. plot(parabola$X, parabola$Y, xlab = "Values of X", ylab = "Values of Y", pch = 19, col = "red") X
  3. plot(parabola$X, parabola$Y, main = “A Scatterplot, pch = 19)
  4. plot(parabola$X, parabola$Y, pch = “red”)

Solution:

The correct choice is b.

mcq8-ch2.jpg

9.  The image below shows the distribution of data values in the object named “m.” Which function produces the image?

  1. hist(m, col = "purple", xlab = “m” )
  2. hist(m, breaks = 50, col = "purple", xlim = c(40, 160 ))
  3. hist(m, breaks = 50, col = "purple" )
  4. hist(m, breaks = 50, ylab = "Frequency Distribution", col = "purple", ylim = c(0, 1500)) X

Solution:

The correct choice is d.

mcq9-ch2.jpg

10.   The image below shows the distribution of data values in the object named “n.” Which function produces the image?

  1. hist(n, breaks = 50, col = "green", main = "A Histogram")
  2. hist(n, breaks = 50, col = "green", xlim = c(0, 100), ylim = c(0, 1200))
  3. hist(n, xlim = c(0, 100), ylim = c(0, 1200), main = "A Histogram")
  4. hist(n, breaks = 50, col = "green", xlim = c(0, 100), ylim = c(0, 1200), main = "A Histogram") X

Solution:

The correct answer is d.

mcq10-ch2.jpg