Variable Relationships › Introduction

Michael BrenndoerferJune 3, 20251 min read
Machine Learning from ScratchAll chapters
Part 1 of 9Statistics 101
Chapter 6Variable Relationships › Introduction
Reading section 2 of 11 · Introduction · 1 minSection 2 of 11 · 1 min

Book contents

Section 2 of 11 · 1 min read

Variable Relationships › IntroductionOne section · Sections in this chapter2 / 11 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

In real-world data, variables rarely exist in isolation. Customer age might relate to purchasing behavior, temperature might affect sales patterns, and education level might correlate with income. Recognizing and quantifying these relationships forms the backbone of exploratory data analysis, predictive modeling, and causal inference.

This chapter explores the fundamental tools for measuring and interpreting relationships between variables. We begin with covariance and correlation, which quantify the strength and direction of linear associations. We then examine regression analysis (superficially as we have a whole chapter dedicated to it), which models these relationships explicitly to enable prediction and inference. Finally, we address one of the most important distinctions in data science: the difference between correlation and causation. Understanding when an observed association reflects a causal mechanism rather than a spurious correlation helps avoid misinterpretation and supports sound conclusions.

By the end of this chapter, you'll understand how to measure variable relationships, model them mathematically, interpret them correctly, and recognize the boundaries of what these methods can tell us about the underlying data-generating process.