luvv to helpDiscover the Best Free Online Tools
Topic 5 of 13

Bivariate Analysis

Learn Bivariate Analysis for free with explanations, exercises, and a quick test (for Data Analyst).

Published: December 19, 2025 | Updated: December 19, 2025

Why this matters

Bivariate analysis reveals how two variables move together. As a Data Analyst, you will: interpret correlations (e.g., marketing spend vs signups), compare groups (e.g., conversion by device), and evaluate associations (e.g., churn by plan). Solid bivariate analysis helps you prioritize levers, spot risks, and build trustworthy recommendations.

  • Prioritize drivers: Which metric changes most with your target?
  • Detect confounders: Segment to avoid misleading averages.
  • Choose suitable models: Know if linear models make sense.

Who this is for

  • Aspiring and junior Data Analysts who want strong EDA habits.
  • Product, marketing, and operations analysts validating hypotheses.
  • Anyone preparing for interviews with practical data tasks.

Prerequisites

  • Basic descriptive statistics (mean, median, variance).
  • Variable types (numeric, categorical, ordinal).
  • Comfort with spreadsheets or a notebook environment.

Bivariate analysis explained simply

Bivariate analysis studies the relationship between two variables at a time. You visualize, summarize, and test the strength and direction of that relationship. The approach depends on the variable types.

Mental model

Think of one variable asking, “When I change, what does the other variable usually do?”

  • Numeric–Numeric: look for trend and strength (scatter plot, correlation).
  • Numeric–Categorical: compare distributions across groups (box plots, group means).
  • Categorical–Categorical: compare proportions (contingency tables, chi-square).

What to look for (by variable types)

Numeric–Numeric
  • Visual: scatter plot with optional trend line.
  • Summary: Pearson r (linear), Spearman rho (monotonic, robust to outliers).
  • Patterns: direction (positive/negative), form (linear/curved), strength, outliers, clusters.
Numeric–Categorical
  • Visual: box/violin plots, dot plots, error bars (mean with CI).
  • Summary: group means/medians, differences, effect size.
  • Patterns: shifts in center, spread, overlap, skew/outliers by group.
Categorical–Categorical
  • Visual: stacked/clustered bars, mosaic plots.
  • Summary: contingency table, row/column percentages, risk difference/ratio.
  • Patterns: strength and direction of association, rare categories, Simpson’s paradox risk.

Quick workflow you can reuse

  1. Clarify the question. Define the two variables and a concrete decision you want to inform.
  2. Identify types. Numeric or categorical? Ordinal?
  3. Visualize first. Start simple; add a trend line or percentages if helpful.
  4. Quantify the pattern. Use correlation, group differences, or contingency metrics.
  5. Check assumptions. Linearity, outliers, skew, small cell counts.
  6. Segment if needed. Repeat by key segments (region, device, time) to avoid paradoxes.
  7. Interpret carefully. Describe size, direction, uncertainty, and caveats; avoid causal claims.
Checks that prevent bad calls
  • Linearity: If non-linear, prefer Spearman or transform/segment.
  • Outliers: Inspect influence; report robust stats if required.
  • Small counts: For 2x2 tables with tiny cells, note instability.

Worked examples

1) Numeric–Numeric: Ad spend vs signups

You plot weekly ad spend ($k) vs signups. Points align upward with a slight bend at high spend.

  • Visual: upward linear pattern with mild saturation at high spend.
  • Quantify: Pearson r is high (strong positive). Add a linear fit and check residuals.
  • Action: Expect diminishing returns beyond a threshold; test segmented fits.
2) Numeric–Categorical: Order value by device

Compare Average Order Value (AOV) for Mobile vs Desktop using box plots.

  • Visual: Desktop box sits higher; little overlap.
  • Quantify: Desktop mean/median > Mobile. Report difference and CI if available.
  • Action: Consider device-specific promotions or UX improvements on Mobile.
3) Categorical–Categorical: Plan vs churn

Make a 2x2 table of Plan x Churn. Compute churn rate per plan.

  • Visual: Clustered bars of churn rate by plan.
  • Quantify: Risk ratio shows relative difference (e.g., Basic customers churn twice as often).
  • Action: Target Basic plan with retention initiatives; investigate causes.

Step-by-step: run bivariate analysis in any tool

Use these steps in a spreadsheet, Python, R, or BI tool.

  1. Pick the two variables and write the decision question in one sentence.
  2. Draw the right plot: scatter (num–num), box/violin (num–cat), bars (cat–cat).
  3. Quantify: correlation, group stats, or contingency rates.
  4. Sensitivity check: remove obvious outliers or segment; see if the conclusion holds.
  5. Summarize: one visual + one number + one sentence on what it means for the decision.

Common mistakes and self-check

  • Confusing correlation with causation. Self-check: Did you imply cause without a design or controls?
  • Using Pearson on curved or ordinal relationships. Self-check: Is the scatter curved or variables ordinal?
  • Ignoring segments (Simpson’s paradox). Self-check: Does the relationship flip by region/device/time?
  • Overlooking outliers that drive correlation. Self-check: Remove the top 1–2 points; does r change drastically?
  • Comparing group means only. Self-check: Did you also compare medians and spreads?
How to self-check quickly
  • Plot, then quantify, then stress-test with a small change. If your conclusion flips, add nuance.
  • State a non-causal interpretation unless you have experimental/causal evidence.

Practice exercises

Complete the exercise below. Use a spreadsheet or calculator if you like.

  • Make the plots you would use and write 1–2 sentences of interpretation.
  • Compute the summary numbers and note any assumptions.
  • Stress-test your conclusion by removing one outlier or segmenting.

Practical projects

  • Acquisition vs Activation: Analyze Ad Spend vs Signups, then segment by channel. Deliver one chart and a one-paragraph recommendation.
  • Device UX: Compare conversion rate and order value by device. Suggest the top two UX or marketing experiments.
  • Retention Lens: Build a contingency table for Plan x Churn and compute risk ratios across cohorts (e.g., by signup month).

Learning path

  • Before: Univariate analysis (distributions, outliers).
  • Now: Bivariate analysis (this lesson) to understand relationships.
  • Next: Multivariate analysis (confounders), feature engineering, A/B testing basics, and simple predictive models.

Next steps

  • Repeat this process on two new metric pairs from your project.
  • Create a short slide: one plot, one number, one recommendation.
  • Take the quick test below. Note: Anyone can take it for free; logged-in users get saved progress.

Mini challenge

You find a weak overall correlation between time-on-site and conversion. Segment by traffic source and device. Does the relationship strengthen or flip in any segment? Write one sentence per segment on what changes and why that matters.

Quick Test

Available to everyone for free. If you are logged in, your progress and score are saved.

Practice Exercises

1 exercises to complete

Instructions

Use the small datasets below. You may use a calculator or spreadsheet.

  1. Numeric–Numeric (Ad spend vs Signups). Weekly data: (1, 40), (2, 52), (3, 65), (4, 74), (5, 95), (6, 98), (7, 115), (8, 120).
    a) Sketch or imagine a scatter plot. Direction and form?
    b) Compute Pearson correlation r (approximate is fine). Interpret strength.
  2. Categorical–Categorical (Plan vs Churn). In one quarter: Basic: 60 churned of 400; Pro: 45 churned of 600.
    a) Compute churn rate per plan.
    b) Compute risk ratio (Basic vs Pro) and interpret.
  3. Numeric–Categorical (AOV by device). Values ($): Mobile [38, 45, 52, 48, 43, 41]; Desktop [55, 58, 63, 60, 62, 57].
    a) Compute mean and median for each group.
    b) Which plot would you show and what is the takeaway?
  • Checklist: picked proper plots; computed r or group stats; did a clear, non-causal interpretation; noted any outliers or segments to check.
Expected Output
1) Strong positive, near-linear; r ≈ 0.98–1.00. 2) Churn: Basic 15%, Pro 7.5%; Risk ratio ≈ 2.0 (Basic about twice Pro). 3) Means: Mobile ≈ 44.5, Desktop ≈ 59.2; Medians: Mobile 44, Desktop 59; Box plot shows Desktop higher with limited overlap.

Bivariate Analysis — Quick Test

Test your knowledge with 8 questions. Pass with 70% or higher.

8 questions70% to pass

Have questions about Bivariate Analysis?

AI Assistant

Ask questions about this tool