Recall & Review
beginner
What is a histogram used for in data visualization?
A histogram shows how data values are spread across different ranges or bins. It helps us see the shape and frequency of data.
Click to reveal answer
beginner
How does a density plot differ from a histogram?
A density plot shows a smooth curve estimating the data distribution, while a histogram uses bars to show counts in bins.
Click to reveal answer
beginner
In R, which function creates a histogram?
The function
hist() creates a histogram in R.Click to reveal answer
intermediate
What does the
density() function in R do?It calculates the kernel density estimate, which is used to draw a smooth density plot.
Click to reveal answer
intermediate
Why might you overlay a density plot on a histogram?
Overlaying helps compare the smooth estimated distribution with the actual data counts, giving a clearer picture of data shape.
Click to reveal answer
Which R function is used to create a histogram?
✗ Incorrect
The
hist() function creates histograms in R.What does a density plot represent?
✗ Incorrect
Density plots show a smooth curve estimating how data is distributed.
Which argument in
hist() controls the number of bins?✗ Incorrect
The
breaks argument sets the number or positions of bins.What R function helps calculate values for a density plot?
✗ Incorrect
The
density() function computes kernel density estimates.Why overlay a density plot on a histogram?
✗ Incorrect
Overlaying helps visualize both the smooth estimate and the raw data distribution.
Explain how to create a histogram and a density plot in R and why you might use both together.
Think about bars vs smooth curves and how they show data differently.
You got /5 concepts.
Describe the role of the 'breaks' argument in the hist() function.
Consider how changing bins changes the histogram look.
You got /4 concepts.