MCQ Collection
Data Visualization MCQs
Practice Data Visualization questions with answers and explanations.
Choose an option to check your answer.
A.
Missing values always equal zero
B.
Charts cannot contain numeric values
C.
Missingness guarantees independence
D.
Missingness can distort summaries and may itself contain information
Show Answer
Correct Answer: D. Missingness can distort summaries and may itself contain information
Explanation:
Ignoring missing values can change the apparent distribution or relationship.
The pattern of missingness may also reveal a data collection problem.
Choose an option to check your answer.
A.
The first three elements of x
B.
All elements except the third
C.
The length of x
D.
The third element of x
Show Answer
Correct Answer: D. The third element of x
Explanation:
Square brackets select elements by position or condition.
A single index of 3 retrieves the third element.
Choose an option to check your answer.
A.
rbind()
B.
append_rows()
C.
factor()
D.
cbind()
Show Answer
Correct Answer: D. cbind()
Explanation:
cbind() binds objects by column and therefore adds variables horizontally.
Rows should correspond correctly across the combined objects.
Choose an option to check your answer.
A.
A mapping from data values to properties such as position, length, or color
B.
A method for encrypting a dataset
C.
A formula for generating random numbers
D.
A rule for naming variables
Show Answer
Correct Answer: A. A mapping from data values to properties such as position, length, or color
Explanation:
Visual encoding translates abstract values into perceivable graphical features.
Good encodings allow viewers to compare values accurately.
Choose an option to check your answer.
A.
str()
B.
plot()
C.
rm()
D.
setwd()
Show Answer
Correct Answer: A. str()
Explanation:
The str() function gives a compact description of an object's components and types.
It is especially useful when first examining a data frame.
Choose an option to check your answer.
A.
A container that can hold elements of different types and structures
B.
A vector restricted to logical values
C.
A matrix with one column
D.
A function that sorts rows
Show Answer
Correct Answer: A. A container that can hold elements of different types and structures
Explanation:
Lists can contain vectors, data frames, functions, or even other lists.
This flexibility makes them useful for complex analysis results.
Choose an option to check your answer.
A.
Area of irregular shapes
B.
Position along a common scale
C.
Color hue
D.
Three-dimensional volume
Show Answer
Correct Answer: B. Position along a common scale
Explanation:
People compare aligned positions more accurately than areas, hues, or volumes.
This is why dot plots and aligned bars are often effective.
Choose an option to check your answer.
A.
A 3-by-3 matrix
B.
A numeric vector containing 2, 4, and 6
C.
A logical comparison
D.
A character factor
Show Answer
Correct Answer: B. A numeric vector containing 2, 4, and 6
Explanation:
The c() function combines its arguments into a vector.
Numeric inputs produce a numeric vector.
Choose an option to check your answer.
A.
NULL only
B.
NA
C.
Inf only
D.
NaN only
Show Answer
Correct Answer: B. NA
Explanation:
NA is the standard marker for a missing value in R.
It is distinct from NULL, which generally represents the absence of an object.
Choose an option to check your answer.
A.
The audience determines the sample mean
B.
The audience changes the raw observations
C.
The level of detail and terminology should match viewers' needs and knowledge
D.
The audience eliminates uncertainty
Show Answer
Correct Answer: C. The level of detail and terminology should match viewers' needs and knowledge
Explanation:
A technical audience may need detail that would overwhelm a general audience.
Design choices should support the decisions the intended viewers must make.
Choose an option to check your answer.
A.
==
B.
%in%
C.
<-
D.
:
Show Answer
Correct Answer: C. <-
Explanation:
The assignment operator stores the value on the right in the name on the left.
Although = can work in some contexts, <- is the conventional R operator.
Choose an option to check your answer.
A.
It forces all generated values to equal 123
B.
It changes numeric values to factors
C.
It makes the random sequence reproducible
D.
It removes sampling variation
Show Answer
Correct Answer: C. It makes the random sequence reproducible
Explanation:
A seed initializes the pseudo-random number generator to a known state.
Using the same seed and code reproduces the same sequence.