Solved Exercises on Introduction to Scatterplots

Master introduction to scatterplots: construction, interpretation, correlation analysis, and statistical relationships through these 5 detailed exercises.

Solution: Exercises 1 to 3
1 Basic Scatterplot Construction
Exercise 1
A study was conducted to examine the relationship between hours studied per week and exam scores. The following data was collected from 10 students:

Hours Studied: [2, 3, 5, 6, 7, 8, 9, 10, 12, 15]
Exam Scores: [55, 60, 68, 72, 75, 78, 82, 85, 90, 95]

Create a scatterplot and describe the relationship between the variables.
Definition:

Scatterplot: A graph that displays the relationship between two quantitative variables by plotting points on a coordinate plane, where each point represents an observation.

Explanatory Variable (x-axis): The variable that explains or predicts the other variable (independent variable).

Response Variable (y-axis): The variable that responds to changes in the explanatory variable (dependent variable).

Scatterplot Construction Method:
  1. Identify the explanatory and response variables
  2. Set up coordinate axes with appropriate scales
  3. Plot each data point (x, y)
  4. Look for patterns in the plotted points
  5. Draw a trend line if appropriate
  6. Describe the relationship
Step 1: Identify Variables

Explanatory Variable (x-axis): Hours Studied

Response Variable (y-axis): Exam Scores

Step 2: Set Up Axes

X-axis (Hours Studied): Scale from 0 to 16 with intervals of 2

Y-axis (Exam Scores): Scale from 50 to 100 with intervals of 10

Step 3: Plot Points

Points to plot: (2, 55), (3, 60), (5, 68), (6, 72), (7, 75), (8, 78), (9, 82), (10, 85), (12, 90), (15, 95)

Step 4: Analyze Pattern

The points show an upward trend, indicating a positive relationship between hours studied and exam scores.

Step 5: Describe Relationship

Direction: Positive (as x increases, y tends to increase)

Form: Linear (points roughly follow a straight line)

Strength: Strong (points closely follow the trend)

There is a strong positive linear relationship between hours studied and exam scores.
Final answer:

The scatterplot shows a strong positive linear relationship between hours studied and exam scores. As the number of hours studied increases, exam scores tend to increase. The relationship appears to be linear with little scatter around the trend line.

Applied rules:

• Variable Assignment: Put explanatory variable on x-axis, response variable on y-axis

• Scale Selection: Choose scales that include all data points with appropriate intervals

• Pattern Recognition: Look for direction, form, and strength of relationship

• Relationship Description: Describe direction (positive/negative), form (linear/non-linear), and strength (strong/moderate/weak)

2 Correlation Analysis
Exercise 2
The following data shows the relationship between temperature (°F) and ice cream sales (in hundreds of dollars) for 12 days:

Temperature: [70, 72, 75, 78, 80, 82, 85, 88, 90, 92, 95, 98]
Sales: [2.1, 2.3, 2.5, 2.8, 3.0, 3.2, 3.5, 3.8, 4.0, 4.2, 4.5, 4.8]

Create a scatterplot and analyze the correlation between temperature and ice cream sales.
Definition:

Correlation Coefficient (r): A measure of the strength and direction of a linear relationship between two quantitative variables. Values range from -1 to +1.

Positive Correlation: When r > 0, variables move in the same direction.

Negative Correlation: When r < 0, variables move in opposite directions.

No Correlation: When r ≈ 0, no linear relationship exists.

r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}
Pearson Correlation Coefficient
Step 1: Identify Variables

Explanatory Variable (x-axis): Temperature (°F)

Response Variable (y-axis): Ice Cream Sales ($100s)

Step 2: Calculate Descriptive Statistics

Temperature Mean (x̄): (70+72+...+98)/12 = 85°F

Sales Mean (ȳ): (2.1+2.3+...+4.8)/12 = 3.475 ($100s)

Step 3: Analyze Scatterplot Pattern

The points show a clear upward trend, suggesting a positive correlation.

Direction: Positive (higher temperatures correlate with higher sales)

Form: Linear (points follow a straight-line pattern)

Strength: Strong (points closely follow the trend line)

Step 4: Estimate Correlation Strength

Based on the scatterplot appearance, the correlation coefficient would be close to +1.

Estimated r: Approximately 0.98 (very strong positive correlation)

Step 5: Interpret Results

There is a very strong positive linear relationship between temperature and ice cream sales. As temperature increases, ice cream sales increase predictably.

r ≈ 0.98
Strong positive correlation (r ≈ 0.98) between temperature and ice cream sales.
Final answer:

The scatterplot shows a very strong positive linear relationship between temperature and ice cream sales (estimated r ≈ 0.98). Higher temperatures are strongly associated with increased ice cream sales, indicating that weather is a significant factor in ice cream demand.

Applied rules:

• Correlation Range: -1 ≤ r ≤ 1, where |r| = 1 indicates perfect correlation

• Strength Interpretation: |r| > 0.8 (strong), 0.5 < |r| < 0.8 (moderate), |r| < 0.5 (weak)

• Direction: r > 0 (positive), r < 0 (negative)

• Linearity: Correlation measures only linear relationships

3 Outlier Detection and Analysis
Exercise 3
A researcher collected data on study time (hours) and test scores for 11 students. One data point appears to be an outlier:

Study Time: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15]
Test Scores: [50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 60]

Create a scatterplot and identify the outlier. Explain its impact on the correlation.
Definition:

Outlier: A data point that falls far from the overall pattern of the data. In scatterplots, outliers may be extreme in x, y, or both directions.

Influential Point: An outlier that significantly affects the correlation coefficient or regression line.

Impact on Correlation: Outliers can dramatically change the correlation coefficient, especially in small datasets.

Step 1: Plot the Data

Plot all 11 points including the potential outlier (15, 60)

Step 2: Identify the Outlier

The point (15, 60) stands out as an outlier because:

  • It has an unusually high x-value (15 hours) compared to other points (1-10 hours)
  • Its y-value (60) is much lower than expected for such a high x-value
  • It deviates significantly from the overall linear pattern
Step 3: Analyze the Pattern Without Outlier

Without the outlier, points (1, 50) to (10, 95) show a strong positive linear relationship.

Estimated correlation without outlier: r ≈ 0.99

Step 4: Analyze Impact of Outlier

With the outlier (15, 60), the correlation is reduced:

Estimated correlation with outlier: r ≈ 0.65

The outlier pulls the correlation coefficient downward, masking the strong underlying relationship.

Step 5: Consider Causes and Actions

Potential causes for the outlier:

  • Student had exceptional circumstances (illness, family emergency)
  • Measurement error in recording study time or score
  • Student has learning difficulties despite studying extensively

Next steps: Investigate the outlier, consider its removal if justified, and analyze data both with and without the outlier.

Outlier
Outlier (15, 60) significantly reduces correlation from ~0.99 to ~0.65.
Final answer:

The point (15, 60) is an outlier that significantly impacts the correlation. With the outlier included, the correlation coefficient drops from approximately 0.99 to 0.65, demonstrating how a single influential point can mask a strong underlying relationship. The outlier suggests that studying for 15 hours resulted in a surprisingly low score of 60, which may indicate unusual circumstances or measurement error.

Applied rules:

• Outlier Identification: Points that fall far from the overall pattern

• Impact Assessment: Calculate correlation with and without outliers

• Investigation: Always investigate outliers before deciding to remove them

• Influence Measurement: Outliers can significantly affect correlation in small samples

Key Concepts and Statistical Measures for Scatterplots
r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}
Pearson Correlation Coefficient
Correlation Range
-1 \leq r \leq 1
Valid correlation range
Perfect Correlation
r = \pm 1
Perfect linear relationship
No Correlation
r = 0
No linear relationship
Key definitions:

Scatterplot: A graph that displays the relationship between two quantitative variables by plotting ordered pairs (x, y) on a coordinate plane.

Explanatory Variable: The variable that explains or predicts the other variable; placed on the x-axis.

Response Variable: The variable that responds to changes in the explanatory variable; placed on the y-axis.

Correlation Coefficient (r): A measure of the strength and direction of a linear relationship between two variables, ranging from -1 to +1.

Positive Correlation: When variables move in the same direction (r > 0).

Negative Correlation: When variables move in opposite directions (r < 0).

Outlier: A data point that falls far from the overall pattern of the data.

Scatterplot Analysis Methodology:
  1. Variable Identification: Determine explanatory and response variables
  2. Axis Setup: Create coordinate system with appropriate scales
  3. Data Plotting: Plot all data points (x, y)
  4. Pattern Recognition: Look for direction, form, and strength
  5. Outlier Detection: Identify any unusual points
  6. Correlation Assessment: Estimate correlation strength
  7. Relationship Description: Describe the relationship in context
  8. Conclusion Drawing: Make appropriate inferences
Tip 1: Always place the explanatory variable on the x-axis and response variable on the y-axis.
Tip 2: Look for the overall pattern first, then examine individual points.
Tip 3: Remember that correlation does not imply causation.
Tip 4: Outliers can dramatically affect correlation in small datasets.
Tip 5: Correlation only measures linear relationships, not curved ones.
Common errors: Confusing explanatory and response variables, misinterpreting correlation as causation, ignoring outliers, using correlation for non-linear relationships, extrapolating beyond data range.
Exam preparation: Practice identifying variable roles, interpreting correlation values, recognizing patterns, understanding the difference between correlation and causation.
Essential Formulas and Rules:

• Correlation Coefficient: r = Σ[(xi - x̄)(yi - ȳ)] / √[Σ(xi - x̄)²Σ(yi - ȳ)²]

• Range: -1 ≤ r ≤ 1

• Strength: |r| > 0.8 (strong), 0.5 < |r| < 0.8 (moderate), |r| < 0.5 (weak)

• Direction: r > 0 (positive), r < 0 (negative)

• Perfect Correlation: r = ±1 indicates perfect linear relationship

• No Linear Correlation: r = 0 indicates no linear relationship

Solution: Exercises 4 to 5
4 Real-World Application
Exercise 4
A market research firm collected data on advertising spending (in thousands of dollars) and monthly revenue (in thousands of dollars) for 15 small businesses:

Advertising: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16]
Revenue: [45, 52, 58, 65, 72, 78, 85, 92, 98, 105, 112, 118, 125, 132, 138]

Create a scatterplot and analyze the business relationship. Provide recommendations based on your findings.
Definition:

Business Analytics: Using statistical methods to analyze business data and make informed decisions.

Return on Investment (ROI): A measure of profitability relative to investment cost.

Step 1: Identify Variables

Explanatory Variable (x-axis): Advertising Spending ($1000s)

Response Variable (y-axis): Monthly Revenue ($1000s)

Step 2: Plot the Data

Plot all 15 points showing the relationship between advertising and revenue.

Step 3: Analyze the Pattern

Direction: Positive (as advertising increases, revenue increases)

Form: Linear (points follow a straight-line pattern)

Strength: Strong (points closely follow the trend line)

Estimated Correlation: r ≈ 0.99 (very strong positive correlation)

Step 4: Calculate Approximate Slope

Using the first and last points: (2, 45) and (16, 138)

Slope ≈ (138 - 45) / (16 - 2) = 93 / 14 ≈ 6.6

This suggests that each $1,000 increase in advertising is associated with about $6,600 increase in revenue.

Step 5: Make Business Recommendations

Based on the strong positive correlation:

  • Increasing advertising spending appears to generate proportional revenue increases
  • The relationship is strong and consistent across the data range
  • Businesses can expect a positive return on advertising investments
  • However, caution should be exercised about extrapolating beyond the observed range
r ≈ 0.99
Very strong positive correlation (r ≈ 0.99) between advertising and revenue.
Final answer:

The scatterplot shows a very strong positive linear relationship (r ≈ 0.99) between advertising spending and monthly revenue. Each $1,000 increase in advertising is associated with approximately $6,600 increase in revenue. Businesses should consider increasing their advertising budgets within the observed range, but should be cautious about extrapolating beyond the current data range due to potential diminishing returns.

Applied rules:

• Business Application: Use statistical findings to inform decision-making

• Extrapolation Caution: Be careful about predictions beyond observed data range

• Contextual Interpretation: Always interpret results in business context

• Limitations: Acknowledge study limitations and assumptions

5 Advanced Pattern Recognition
Exercise 5
A researcher collected data on age (years) and reaction time (milliseconds) for 20 participants:

Age: [20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 25, 30, 35, 40, 45]
Reaction Time: [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 215, 225, 235, 245, 255]

Create a scatterplot and analyze the relationship. Identify any clusters or sub-patterns.
Definition:

Cluster Analysis: Identifying groups of data points that share similar characteristics.

Sub-patterns: Distinct relationships within subsets of the data.

Non-linear Relationships: Relationships that don't follow a straight line pattern.

Step 1: Plot the Data

Plot all 20 points showing the relationship between age and reaction time.

Step 2: Initial Pattern Analysis

Overall, the data shows a positive linear relationship: as age increases, reaction time increases.

However, closer inspection reveals two distinct groups of data points.

Step 3: Identify Clusters

Group 1 (Ages 20-90): Ages [20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90]

Reaction times: [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340]

Group 2 (Ages 25-45): Ages [25, 30, 35, 40, 45]

Reaction times: [215, 225, 235, 245, 255]

Step 4: Analyze Each Cluster

Group 1: Shows the expected positive relationship between age and reaction time.

Group 2: Also shows positive relationship but with systematically higher reaction times than Group 1 at comparable ages.

Step 5: Consider Possible Explanations

Possible reasons for the clustering:

  • Two different populations (e.g., athletes vs. non-athletes)
  • Two different testing conditions
  • Two different testing instruments
  • Systematic bias in data collection
Group 1
Group 2
Two distinct clusters show different baseline reaction times despite similar age-reaction relationships.
Final answer:

The scatterplot reveals two distinct clusters of data points. Both groups show a positive relationship between age and reaction time, but Group 2 has systematically higher reaction times than Group 1 at comparable ages. This suggests the presence of different populations or conditions that affect baseline reaction time. Further investigation is needed to understand the source of this clustering.

Applied rules:

• Pattern Recognition: Look for subgroups within the overall pattern

• Cluster Analysis: Identify and analyze distinct groups of data points

• Context Investigation: Seek explanations for unexpected patterns

• Further Analysis: Recommend additional research when patterns are unclear

Detailed Summary: Introduction to Scatterplots
r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}
Core Formula
Key definitions:

Scatterplot: A graphical representation that displays the relationship between two quantitative variables by plotting ordered pairs (x, y) on a coordinate plane. Each point represents a single observation with coordinates determined by the values of the two variables.

Explanatory Variable (Independent Variable): The variable that is thought to explain or predict changes in another variable. It is plotted on the horizontal (x) axis. This variable is typically manipulated or controlled in experiments or is considered the input variable.

Response Variable (Dependent Variable): The variable that responds to changes in the explanatory variable. It is plotted on the vertical (y) axis. This variable is typically measured or observed and is considered the output variable.

Correlation Coefficient (r): A numerical measure that quantifies the strength and direction of a linear relationship between two quantitative variables. It ranges from -1 to +1, where values near the extremes indicate strong relationships and values near zero indicate weak relationships.

Positive Correlation: A relationship where variables move in the same direction; as one variable increases, the other tends to increase as well. Represented by r > 0.

Negative Correlation: A relationship where variables move in opposite directions; as one variable increases, the other tends to decrease. Represented by r < 0.

Outlier: A data point that falls far from the overall pattern of the data. Outliers can be extreme in the x-direction, y-direction, or both, and can significantly affect statistical analyses.

Clusters: Groups of data points that are close together and separate from other groups, potentially indicating different subpopulations or conditions within the data.

Complete Scatterplot Analysis Process:
  1. Variable Identification: Determine which variable is explanatory and which is response based on the research question
  2. Data Preparation: Organize the paired data in a systematic format
  3. Axis Setup: Create coordinate system with appropriate scales for both variables
  4. Data Plotting: Carefully plot each ordered pair (x, y) on the coordinate system
  5. Overall Pattern Recognition: Look for the general direction, form, and strength of the relationship
  6. Outlier Detection: Identify any points that deviate significantly from the overall pattern
  7. Sub-pattern Analysis: Look for clusters, subgroups, or non-linear components
  8. Correlation Assessment: Estimate the correlation coefficient based on the scatterplot appearance
  9. Relationship Description: Verbally describe the relationship in context
  10. Statistical Calculation: Compute correlation coefficient if necessary
  11. Conclusion Drawing: Make appropriate inferences while considering limitations
  12. Further Analysis Planning: Plan additional analyses based on initial findings
Tip 1: Always plot your data first - visual inspection often reveals patterns that numbers alone might miss.
Tip 2: Look for the overall pattern first, then examine individual points that deviate from the pattern.
Tip 3: Remember that correlation does not imply causation - there may be lurking variables.
Tip 4: Outliers can dramatically affect correlation, especially in small datasets.
Tip 5: Correlation only measures linear relationships - curved relationships may have r ≈ 0.
Tip 6: Be cautious about extrapolating beyond the range of observed data.
Common errors: Confusing explanatory and response variables, interpreting correlation as causation, ignoring outliers, using correlation for non-linear relationships, extrapolating beyond data range, misidentifying variable roles, failing to consider lurking variables.
Exam preparation: Practice identifying variable roles, interpreting correlation values, recognizing patterns, understanding the difference between correlation and causation, identifying outliers, describing relationships in context.
Essential Formulas and Rules:

• Correlation Coefficient: r = Σ[(xi - x̄)(yi - ȳ)] / √[Σ(xi - x̄)²Σ(yi - ȳ)²]

• Correlation Range: -1 ≤ r ≤ 1

• Correlation Strength: |r| > 0.8 (strong), 0.5 < |r| < 0.8 (moderate), |r| < 0.5 (weak)

• Correlation Direction: r > 0 (positive), r < 0 (negative)

• Perfect Correlation: r = ±1 indicates perfect linear relationship

• No Linear Correlation: r = 0 indicates no linear relationship

• Linearity Assumption: Correlation measures only linear relationships

• Outlier Sensitivity: Correlation is sensitive to outliers

Scatterplot Analysis Workflow
📊
Step 1: Research Question
Identify the relationship you want to explore between two quantitative variables
What affects what?
Step 2: Variable Assignment
Place explanatory variable on x-axis, response variable on y-axis
X: Cause/Predictor, Y: Effect/Response
Step 3: Plot Data
Plot each ordered pair (x, y) on coordinate system
(X₁,Y₁), (X₂,Y₂), ..., (Xₙ,Yₙ)
Step 4: Pattern Recognition
Look for direction, form, and strength of relationship
Positive/Negative, Linear/Curved, Strong/Moderate/Weak
Step 5: Outlier Detection
Identify points that deviate from overall pattern
Extreme in X, Y, or both directions
Step 6: Correlation Calculation
Compute correlation coefficient if needed
r ∈ [-1, 1]
Analysis Process
1
Question
2
Variables
3
Plot
4
Pattern
5
Outliers
6
Correlation
Relationship Types
Strong Positive: r ≈ +1
Strong Negative: r ≈ -1
No Linear: r ≈ 0
Non-linear: Curved patterns
Always plot first, calculate second!

Questions & Answers

Question: How do I determine which variable should go on the x-axis and which should go on the y-axis in a scatterplot?

Answer: The placement depends on the relationship you're investigating:

  • Explanatory Variable (x-axis): The variable that you believe explains, predicts, or influences the other variable. This is often the variable you control or manipulate.
  • Response Variable (y-axis): The variable that responds to changes in the explanatory variable. This is the outcome you're measuring.

Examples:

  • Hours studied → Exam score (study time explains score)
  • Temperature → Ice cream sales (temperature explains sales)
  • Advertising spend → Revenue (advertising explains revenue)

If there's no clear explanatory-response relationship, you can choose either axis, but be consistent in your interpretation.

Question: What's the difference between correlation and causation? Why is it important?

Answer: This is a crucial distinction:

  • Correlation: A statistical measure showing the degree to which two variables move in relation to each other. It indicates association but not cause-and-effect.
  • Causation: A relationship where one variable directly causes changes in another variable.

Why it's important:

  • Two variables can be correlated without one causing the other
  • There may be lurking variables that explain the correlation
  • Examples: Ice cream sales and drowning incidents are correlated (both increase in summer) but one doesn't cause the other
  • Always look for plausible causal mechanisms before claiming causation

Remember: "Correlation does not imply causation!"

Question: How do I interpret different values of the correlation coefficient?

Answer: The correlation coefficient (r) ranges from -1 to +1:

  • r = +1: Perfect positive linear relationship
  • r = -1: Perfect negative linear relationship
  • r = 0: No linear relationship
  • r > 0: Positive correlation (variables move in same direction)
  • r < 0: Negative correlation (variables move in opposite directions)

Strength interpretation:

  • |r| > 0.8: Strong correlation
  • 0.5 < |r| < 0.8: Moderate correlation
  • |r| < 0.5: Weak correlation

Remember: r only measures linear relationships, so curved relationships may have r ≈ 0 even if there's a strong non-linear relationship.

Question: What should I do when I find outliers in my scatterplot?

Answer: Outliers require careful consideration:

  • Don't automatically remove them: They might contain important information
  • Investigate the cause: Measurement error, data entry mistake, or genuine extreme value?
  • Analyze both ways: Calculate correlation with and without the outlier
  • Document your decision: Explain why you kept or removed the outlier
  • Report both results: Show how the outlier affects your analysis

In small datasets, outliers can dramatically affect correlation. In large datasets, their impact is typically smaller. Always consider the context and potential impact before making decisions about outliers.

Question: Can scatterplots show non-linear relationships? How do I recognize them?

Answer: Yes, scatterplots excel at showing non-linear relationships! Common patterns include:

  • Quadratic: U-shaped or inverted U-shaped curve
  • Exponential: Rapid increase or decrease
  • Logarithmic: Rapid initial change that levels off
  • Sinusoidal: Wave-like pattern
  • Power: Curved relationship following power law

Recognition tips:

  • Look for points that don't follow a straight line
  • Notice if the relationship changes direction
  • See if points seem to follow a curved path
  • Watch for clustering or grouping of points

Important: The correlation coefficient (r) only measures linear relationships, so curved relationships may have r ≈ 0 even with a strong non-linear relationship!