DSBDA Lab Assignment No 9
DSBDA Lab Assignment No 9
Assignment No: 9
Title of the Assignment: Data Visualization II
1. Use the inbuilt dataset 'titanic' as used in the above problem. Plot a box plot for
distribution of age with respect to each gender along with the information about whether they
survived or not. (Column names : 'sex' and 'age')
2. Write observations on the inference from the above statistics.
Prerequisite:
1. Basic of Python Programming
2. Seaborn Library, Concept of Data Visualization.
Theory:
BoxPlot:
A boxplot is a standardized way of displaying the distribution of data based on a five number
summary (“minimum”, first quartile (Q1), median, third quartile (Q3), and “maximum”). It can
tell you about your outliers and what their values are. It can also tell you if your data is
symmetrical, how tightly your data is grouped, and if and how your data is skewed.
first quartile (Q1/25th Percentile): the middle number between the smallest number (not the
“minimum”) and the median of the dataset.
Third quartile (Q3/75th Percentile): the middle value between the median and the highest value (not
the “maximum”) of the dataset.
Viva Questions
1. Explain following plots with sample diagrams:
• Histogram
• Violin Plot
2. Write code to plot a box plot for distribution of age with respect to each genderalong
with the information about whether they survived or not. Write the observations.