DSPython Logo DSPython
Statistics for Data Science

Correlation

Understanding how two variables move together πŸ”—

1️⃣ What is Correlation?

Correlation tells us:

  • Two variables madhya relationship undha?
  • Undi ante, same direction aa opposite direction aa?
  • Relationship entha strong?

πŸ‘‰ Simple words lo:
β€œWhen X changes, does Y also change?”

⚠️ Important:
Correlation β‰  Causation (Relationship undi ani cause ani kaadu)

2️⃣ Real-World Examples (Student Friendly)

πŸ“š

Study & Marks

Hours studied ↑
Marks ↑
Positive correlation

🌑️

Temperature & Jackets

Temperature ↑
Jackets sold ↓
Negative correlation

🎲

Random Variables

Shoe size & IQ
No pattern
No correlation

3️⃣ Types of Correlation

  • Positive Correlation (+): X ↑ β†’ Y ↑
  • Negative Correlation (–): X ↑ β†’ Y ↓
  • Zero Correlation: No relationship

4️⃣ Visual 1: Positive vs Negative Correlation

Dots show data points.
Pattern direction explains correlation.

Positive Negative

5️⃣ Visual 2: Strength of Correlation

How tightly points are packed matters.

Strong Weak

6️⃣ Correlation Coefficient (r)

Correlation is measured using Pearson’s r.

-1 ≀ r ≀ +1

  • r = +1 β†’ Perfect positive
  • r = -1 β†’ Perfect negative
  • r = 0 β†’ No correlation

Interview Checkpoint 🎯

Correlation vs Regression?

Correlation β†’ relationship strength
Regression β†’ prediction

Does correlation mean causation?

No ❌ Correlation only shows association.

Range of correlation coefficient?

From -1 to +1.

πŸ€–
DSPython AI Assistant βœ–
πŸ‘‹ Hi! I’m your AI assistant. Paste your code here, I will find bugs for you.