Why scatter plots show relationships
📖 Scenario: Imagine you are a teacher who wants to understand if students' study hours affect their test scores. You have collected data on how many hours each student studied and their scores. You want to see if there is a pattern or relationship between these two things.
🎯 Goal: You will create a scatter plot to visually show the relationship between study hours and test scores. This will help you see if more study hours generally mean higher scores.
📋 What You'll Learn
Create two lists:
study_hours and test_scores with exact valuesCreate a variable
title with the exact string for the plot titleUse
matplotlib.pyplot.scatter to plot the points with correct variablesUse
plt.title to set the plot titleUse
plt.xlabel and plt.ylabel to label axesUse
plt.show() to display the plot💡 Why This Matters
🌍 Real World
Scatter plots help people see if two things are connected, like hours studied and test results, or temperature and ice cream sales.
💼 Career
Data scientists and analysts use scatter plots to quickly understand relationships in data before doing deeper analysis.
Progress0 / 4 steps