Skip to content
tezvyn:

Scatter Plot: Visualizing Relationships Between Two Variables

Source: Wikipedia: Scatter plotEasyHow cards are made

Scatter Plot: Visualizing Relationships Between Two Variables

A scatter plot visualizes the relationship between two variables as a cloud of data points. It's used to quickly spot trends, like whether increased study time correlates with higher test scores. The key footgun: correlation is not causation.

Why it exists

Before running complex statistical models, you need a way to simply see your data. A scatter plot was created to provide an immediate, intuitive visual check for a potential relationship between two numerical variables, forming the foundation of exploratory data analysis.

The mental model

Think of a scatter plot as a target practice sheet where each shot is a data point. Each shot has a horizontal (X) and vertical (Y) position. Looking at the whole pattern of shots tells you if your aim is consistent or if your horizontal and vertical errors are related. A scatter plot does this for any two variables, revealing the 'shape' of their relationship.

How it works

Using a Cartesian grid, a scatter plot displays data as a collection of points. For each item in a dataset, it takes two numeric values. One value determines the point's position on the horizontal axis (X-axis), and the other determines its position on the vertical axis (Y-axis). When you plot all the items, the resulting cloud of points can reveal linear trends, clusters, or a complete lack of a relationship. You can also display a third variable by encoding it with the color, shape, or size of the points.

When to use it

Use a scatter plot as a first step when exploring a new dataset to understand how two variables interact. It's perfect for checking for correlations between two continuous variables, such as server response time versus CPU load, or advertising spend versus sales revenue. It is one of the most fundamental and widely used charts in quality control and data science.

When not to use it

Scatter plots are less effective when one or both variables are categorical (e.g., 'country' or 'product type'), as the points will just stack on top of each other in columns or rows. They also become unreadable with too many data points, a problem called 'overplotting,' where the individual points merge into a dense blob. In that case, other chart types or techniques like data sampling are better.

One canonical example

To see if there's a link between daily temperature and ice cream sales, you would collect data over several weeks. For each day, you record the high temperature (X-axis) and total sales revenue (Y-axis), then plot one point per day. You would likely see a pattern where points trend upwards from left to right, visually confirming that as temperature increases, so do sales.

Interview question

Which scenario best describes a situation where a scatter plot would be an unsuitable visualization choice?

  • a.Analyzing how advertising spend relates to sales revenue.
  • b.Displaying the distribution of customer satisfaction scores across different product categories.Correct
  • c.Visualizing server response time against CPU load to find trends.
  • d.Identifying if there's a linear relationship between temperature and ice cream sales.
Why?

Scatter plots are designed for visualizing the relationship between two continuous numerical variables. They are less effective when one or both variables are categorical, as points would stack, making trends unreadable. Options A, C, and D all involve two continuous variables, which are ideal for scatter plots.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on data visualization — each one lists the topics its interview covers.

See open roles