Measuring Associations in Data#

Stage 2 · 🔗 Associations & Correlation · Lesson 10 of 56 · beginner

◀ Previous · Objective Selection of the Bin Width for a Time Histogram · Next · Measuring Associations Between Two Continuous Variables ▶ · ↑ Section

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

One idea, many measures#

To move from “these two variables seem related” to a number, you need an association measure — a single value capturing how strongly, and often in which direction, two variables move together. There is no one measure for all cases; the right choice depends on what kind of variables you have.

It depends on the types#

Variables come in two broad flavours — continuous (numbers on a scale, like fare or distance) and categorical (labels, like payment type or company). The pairing decides the tool: comparing two numbers is a different problem from comparing two labels, or a number against a label.

The taxonomy#

The map for this stage:

  • continuous ↔ continuouscorrelation (Pearson, Spearman, Kendall);

  • categorical ↔ categorical — the chi-square test and Cramér’s V;

  • continuous ↔ categoricalANOVA and its effect size eta-squared (\(\eta^2\)).

The lessons ahead take these in turn.

Strength and direction#

Two properties matter. Strength — how tightly the variables track, usually scaled so that 0 means “no association” and 1 (or \(\pm 1\)) means “perfect”; and direction — whether they rise together or move oppositely, which only makes sense for ordered variables. A good measure reports strength on a comparable scale, so associations across different variable pairs can be ranked.

See also

Source article Adapted (context, re-expressed) in our own words from: https://insightful-data-lab.com/2026/01/14/measuring-associations-in-data/ (insightful-data-lab.com).

Tags: purpose: reference topic: data analysis topic: data preparation level: beginner