6 Sample of Questions
6.1 Sample 1
Introduction
In this exercise, we will perform Exploratory Data Analysis (EDA) using the penguins dataset from the palmerpenguins package.
At each step, you will find a question to test your understanding.
Step 1: First Look
The dataset has 344 rows and 8 variables. Some values are missing.
Question 1. How many variables are categorical?
- 2
- 3
- 4
- 5
Correct Answer: B
Step 2. Numerical Summaries
The body mass ranges from about 2700g to 6300g.
Question 2. Which measure is most robust to outliers?
- Mean
- Standard deviation
- Interquartile Range (IQR)
- Variance
Correct Answer: C
Step 3: Visualization – Boxplot
Gentoo penguins appear heavier than Adelie and Chinstrap.
Question 3. What does each box in the boxplot represent?
- The entire dataset
- Distribution of body mass for one species
- Only the mean of each species
- Outliers only
Correct Answer: C
Step 4: Relationships Between Variables
Flipper length and body mass are positively related.
Question 4. What does a positive relationship mean here?
Larger flipper length tends to go with higher body mass
Flipper length causes body mass
There is no association
Outliers explain the pattern
Correct Answer: A
Step 5: Missing Data
The variable sex has missing values.
Question 5. Which R function checks if any missing values exist in the dataset?
is.na()
anyNA()all()na.rm()
Correct Answer: B
6.2 Sample 2
we will explore the mtcars dataset, which contains fuel consumption and performance information about \(32\) car models from 1974.
We will perform EDA and answer questions along the way.
Step 1. First Look
The dataset has \(32\) observations and \(11\) variables.
Question 1. How many variables are numeric?
- 8
- 9
- 10
- 11
Correct Answer: B
Step 2: Descriptive Statistics
The miles-per-gallon (mpg) ranges from \(10.4\) to \(33.9\).
Question 2. Which value best describes the typical mpg while being robust to outliers?
- \(20.9\)
- \(19.20\)
- \(7.375\)
- \(6.026948\)
Correct Answer: B
Step 3: Categorical Variable – Cylinders
Cars come with \(4\), \(6\), or \(8\) cylinders.
Question 3. Which cylinder type is most common in the dataset?
- 4 cylinders
- 6 cylinders
- 8 cylinders
- All equally common
Step 4: Visualization – Boxplot
Question 4. What does the plot suggest?
- Cars with more cylinders have higher
mpg - Cars with more cylinders have lower
mpg - Cars with more cylinders have identical
mpg - No relationship is visible
Correct Answer: B
Step 5: Relationship Between Variables
Question 5. What trend do we see between horsepower (hp) and miles per gallon (mpg)?
- Higher horsepower cars tend to have lower
mpg - Higher horsepower cars tend to have higher
mpg - No relationship
- Only automatic cars follow this trend
Correct Answer: A
Step 6: Correlation
Question 6. What does the correlation between hp and mpg mean?
- Strong positive relationship
- Strong negative relationship
- Weak negative relationship
- No relationship
Correct Answer: B