Descriptive Statistics Part 3
In this tutorial we will learn about relationship. How can we visualize relationship/association between two variables using graphs.
Table of Contents
- Analysis the Relationship between categorical and numeric variable.
- Analysis the Relationship between two categorical variable.
- Analysis the relationship Between Two numeric variable.
Note- Graph are a great way that we can visualize and explore the relationship or two variable are associated and the nature of the association.
No matter, variable are either categorical or numeric.
1- Exploring the relationship between categorical and numeric variable using Box plot.
We have many options to visualize the relationship. but here we will use only box plot.
Take example , hours in sun and cancer yes or not.

Here is relationship between two variable one is numerical another is categorical , Its relationship show how much spend hours in a day in sun , skin cancer will be do or not.
2. Exploring the relationship Between two categorical variable.
Note- There are no. of different plots that exist each with good and bad qualities to them. but here we will use bar chart and Stacked bar chart.
Relationship and compare two categorical variable side by side using bar chart.

Now , see another version of association similer is a stacked bar chart and its pretty similar to the bar chart.

One more plot is Mosaic plot. you can explore this graph using the given link – https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Mosaic_Plots.pdf
3- Exploring the relationship between two numeric variables.
For analysis the relationship we also have many graphs . But here we are using only Scatter plot (XY plot).

You know the scatter plot. it useful to show the relationship between two numeric variable.
If any doubt regarding it. please comment below and ask feel free.
If any doubt regarding this tutorial ask feel free on LinkedIn- http://linkedin.com/in/puneet166
GitHub workspace link- https://github.com/puneet166?tab=repositories