AWS Certified Machine Learning – SpecialtyExploratory Data AnalysisMedium

A data scientist is analyzing customer churn data. They want to visualize the relationship between 'MonthlyCharges' (continuous) and 'TotalCharges' (continuous) for churned vs. non-churned customers. They suspect there might be a non-linear relationship or varying density patterns within these groups. Which data visualization technique would best reveal these insights?

  1. AHeatmap
  2. BBox plot
  3. CScatter plot with hue for churn status
  4. DViolin plot
Show answer & explanation

Correct answer: C. Scatter plot with hue for churn status

A scatter plot is ideal for visualizing the relationship between two continuous variables. Adding 'churn status' as a hue allows for immediate visual comparison of the relationships and density patterns for churned vs. non-churned customers, helping identify non-linearities or distinct clusters within each group. This directly addresses the need to see relationships and patterns for both groups.

Why the other options are wrong

  • A. Heatmaps are typically used for visualizing matrices or correlation, not directly for relationships between two continuous variables with group separation.
  • B. Box plots show distribution summaries for a single continuous variable across categories, not relationships between two continuous variables.
  • D. Violin plots show the distribution of a single continuous variable across categories, similar to box plots but with density estimation.

Scatter Plot with Hue

A scatter plot displays the relationship between two continuous variables. Adding 'hue' (color coding) allows for the visualization of an additional categorical variable, enabling comparison of patterns across different groups.

  • Excellent for identifying correlations, clusters, and outliers.
  • Hue helps distinguish patterns for different categories.
  • Reveals non-linear relationships and density variations within groups.
  • Can be enhanced with size or shape for more dimensions.

Memory trick: Scatter with hue shows how groups scatter and accrue.

More Exploratory Data Analysis questions