Recall & Review
beginner
What is the main difference between a histogram and a bar chart?
A histogram shows the distribution of numerical data by grouping values into bins, while a bar chart compares categorical data with separate bars for each category.
Click to reveal answer
beginner
In a histogram, what do the bars represent?
Each bar represents the frequency or count of data points that fall within a specific range or bin of numerical values.
Click to reveal answer
beginner
Can bar charts have gaps between bars? Why or why not?
Yes, bar charts have gaps between bars because they represent distinct categories that are not related in order, unlike histograms where bars touch to show continuous data.
Click to reveal answer
beginner
Which plot type is better for showing the shape of data distribution: histogram or bar chart?
Histogram is better because it groups continuous data into bins and shows how data is spread across ranges.
Click to reveal answer
intermediate
How does matplotlib create a histogram differently from a bar chart?
Matplotlib's histogram function automatically bins numerical data and plots frequencies, while bar chart requires explicit categories and heights for each bar.
Click to reveal answer
What type of data is best visualized with a histogram?
✗ Incorrect
Histograms group numerical data into bins to show frequency distribution.
Why do bars in a bar chart have gaps between them?
✗ Incorrect
Bar charts represent distinct categories, so gaps show they are separate.
Which matplotlib function is used to create a histogram?
✗ Incorrect
plt.hist() automatically bins numerical data and plots frequencies.
What does each bar in a histogram represent?
✗ Incorrect
Each bar shows how many data points fall into a specific bin range.
Which plot type is best for comparing sales of different products?
✗ Incorrect
Bar charts compare distinct categories like product sales.
Explain in your own words how a histogram and a bar chart differ in what they show and how they look.
Think about the type of data and the spacing between bars.
You got /4 concepts.
Describe a real-life example where you would use a histogram and another where you would use a bar chart.
Consider data that is grouped by ranges versus distinct groups.
You got /2 concepts.