Skip to content
Exercises · Q8

Q.Give an example of data comparison where we can use the scatter plot.

Sikkim CbseNCERTSubjective· 2mImportance★★★★★
66% · 29/44 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

A scatter plot is ideal for comparing two continuous variables to identify relationships, correlations, or patterns — for example, comparing students' study hours against their exam scores.

Why a Scatter Plot?

A scatter plot displays individual data points on a two-dimensional plane, with one variable on the xx-axis and another on the yy-axis. Unlike bar charts or line graphs that show categories or trends over time, a scatter plot reveals relationships between two numerical variables. You use it when you want to see whether changes in one variable correspond to changes in another — whether they move together (positive correlation), move in opposite directions (negative correlation), or show no pattern at all.

The key insight: each point represents one observation, so you can spot clusters, outliers, and the overall trend at a glance.

Example: Study Hours vs. Exam Scores

Suppose a teacher wants to understand whether the number of hours students spend studying correlates with their performance in a final exam. The dataset contains two columns:

  • Study_Hours: hours spent studying per week (continuous)
  • Exam_Score: marks obtained out of 100 (continuous)

Here is a sample dataset:

StudentStudy_HoursExam_Score
A245
B562
C878
D350
E1092
F670
G458
H985

Python Code (using Matplotlib and Pandas)

import pandas as pd
import matplotlib.pyplot as plt

# Create the DataFrame
data = {
    'Student': ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'],
    'Study_Hours': [2, 5, 8, 3, 10, 6, 4, 9],
    'Exam_Score': [45, 62, 78, 50, 92, 70, 58, 85]
}
df = pd.DataFrame(data)

# Create scatter plot
plt.scatter(df['Study_Hours'], df['Exam_Score'], color='blue', s=50)
plt.xlabel('Study Hours per Week')
plt.ylabel('Exam Score (out of 100)')
plt.title('Study Hours vs. Exam Score')
plt.grid(True, alpha=0.3)
plt.show()

What the Plot Shows

The scatter plot displays:

  • X-axis: Study_Hours (ranging from 2 to 10)
  • Y-axis: Exam_Score (ranging from 45 to 92)
  • Points: Eight blue dots, each representing one student
  • Pattern: The points trend upward from left to right, indicating a positive correlation — students who study more hours tend to score higher marks

You can immediately see that Student E (10 hours, 92 marks) is at the top right, while Student A (2 hours, 45 marks) is at the bottom left. If there were an outlier — say, a student who studied 10 hours but scored only 50 — that point would stand out visually, prompting further investigation. …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.