How to graphically represent the relation of two variables
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
One of the best ways to check the relation between two variables is to make a scatter plot with those two variables.
Using Matplotlib, plotting a scatter plot is quite straightforward.
Here is the example
Here is the result
You can check for correlation
One good thing about graphical representation is that you will be able to tell whether those two variables correlate or not.
Here are the different possible correlation types
More on plots
If you want to know more about how to add labels, plot different types of plots, etc... check out the other articles I wrote on the topic, just here :
Land Your First Data Science Job
A proven roadmap to prepare for $75K+ entry-level data roles. Perfect for Data Scientist ready to level up their career.
Related Articles
Continue your learning journey with these related topics
Master Data Science in Days, Not Months 🚀
Skip the theoretical rabbit holes. Get practical data science skills delivered in bite-sized lessons – Approach used by real data scientist. Not bookworms. 📚