AWS Certified Machine Learning – SpecialtyExploratory Data AnalysisEasy
A data scientist is performing exploratory data analysis on a dataset containing customer demographics and their subscription status (subscribed/not subscribed). They want to visualize the relationship between 'Age' (continuous) and 'Subscription Status' (categorical binary) to understand if age plays a role in subscription. Which visualization technique is most suitable for this purpose?
- ABox Plot
- BBar Chart
- CScatter Plot
- DHeatmap
Show answer & explanationAnswer & explanation
Correct answer: A. Box Plot
A Box Plot is ideal for visualizing the distribution of a continuous variable (Age) across different categories of a categorical variable (Subscription Status), allowing for easy comparison of central tendency and spread.
Why the other options are wrong
- B. A Bar Chart is used for showing counts or proportions of categorical data, or summarizing a continuous variable by category, but a Box Plot provides more granular distribution information for the continuous variable.
- C. A Scatter Plot is used for two continuous variables, not one continuous and one categorical.
- D. A Heatmap is typically used for visualizing correlation matrices or two-dimensional categorical data, not a continuous vs. categorical relationship in this manner.
Box Plot
A standardized way of displaying the distribution of data based on a five-number summary: minimum, first quartile (Q1), median (Q2), third quartile (Q3), and maximum. It also identifies outliers.
- Visualizes distribution of a continuous variable.
- Effective for comparing distributions across different groups (categorical variable).
- Shows median, interquartile range (IQR), and potential outliers.
- Useful for quickly identifying differences in central tendency and spread between groups.
Memory trick: Continuous Age across Categories? Box Plot's the sage!