Chapter 2: Looking at Relationships#

Overview#

Chapter 1 covered single variables (1D data). Now we explore relationships between two variables (2D data).

Learning Objectives#

  • Create and interpret scatter plots

  • Understand correlation and causation

  • Calculate correlation coefficients

  • Use correlation for prediction

  • Recognize correlation pitfalls

Why Study Relationships?#

Real-world phenomena rarely exist in isolation:

  • Height and weight

  • Study time and grades

  • Temperature and ice cream sales

  • Years of experience and salary

Chapter Contents#

2.1 Plotting 2D Data#

  • Scatter plots

  • Series plots

  • Categorical visualizations

2.2 Correlation#

  • Pearson correlation coefficient

  • Interpreting correlation

  • Prediction using correlation

  • Common mistakes

Key Concepts#

Scatter Plot: Visual representation of relationship between two variables

Correlation: Statistical measure of linear relationship strength

  • Range: -1 to +1

  • Positive: variables increase together

  • Negative: one increases, other decreases

  • Zero: no linear relationship

Important: Correlation ≠ Causation!

Getting Started#

Let’s explore relationships in data.

→ Start with 2.1 Plotting 2D Data