Craete Two Lists of Student Ids & Student Heights
student_id = [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125]
student_height = [135, 135, 135, 135, 136, 136, 136, 136, 136, 136, 137, 137, 137, 137, 138, 138, 138, 139, 139, 139, 140, 140, 141, 141, 142]
Create a dataframe of these two lists using DataFrame() method
import pandas as pd
studentHeightDf = pd.DataFrame({'student_id': student_id, 'student_height': student_height})
Create a seaborn graph
bins - number of bins to divide data
edgecolor - To have colored edges of histograms
norm_hist = False - To have absolute number of frequency rather than having percentages
kde = False - To remove the kernel density curve
import matplotlib
% matplotlib inline
import seaborn as sns
sns.distplot(studentHeightDf['student_height'], bins=8, kde=False, hist=True, hist_kws={'edgecolor' : 'black'}, norm_hist=False)
studentHeightDf['student_height'].mean()
studentHeightDf['student_height'].median()
studentHeightDf['student_height'].mode()
studentHeightDf['student_height'].max() - studentHeightDf['student_height'].min()
studentHeightDf['student_height'].std()
studentHeightDf['student_height'].quantile([.25, .50, .75])
studentHeightDf['student_height'].skew()
By looking at graph also we can tell that graph is positively skewed
studentHeightDf['student_height'].kurtosis()
Graph is having negative kurtosis. It means that graph has less peakedness than normal grpah.