Correlation analysis (Pearson, Spearman)
📖 Scenario: You are a data analyst working with a small dataset of students' study hours and their exam scores. You want to find out how strongly these two variables are related.
🎯 Goal: Build a Python program that calculates both Pearson and Spearman correlation coefficients between study hours and exam scores.
📋 What You'll Learn
Create a dictionary with exact study hours and exam scores
Create a list of tuples from the dictionary
Calculate Pearson and Spearman correlation coefficients using scipy.stats
Print the correlation results exactly as specified
💡 Why This Matters
🌍 Real World
Correlation analysis helps understand relationships between variables, like how study time affects exam scores.
💼 Career
Data analysts and scientists use correlation to find patterns and insights in data for decision making.
Progress0 / 4 steps