<jupyter_start><jupyter_text>Univariate and Bivariate Analysis Dataset: https://www.kaggle.com/mustafaali96/weight-height The variables used are:    * Height    * Weight    * Gender  Import libraries<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns<jupyter_output><empty_output><jupyter_text>Load and read dataset<jupyter_code>data = pd.read_csv('datasets/weight-height.csv')

data.head()
data.shape<jupyter_output><empty_output><jupyter_text>Mean, median, mode, min, max and quantiles<jupyter_code>data.describe()<jupyter_output><empty_output><jupyter_text>Univariate Analysis  Gender count<jupyter_code>sns.countplot(data['Gender'])

plt.show<jupyter_output><empty_output><jupyter_text>Considering only Height<jupyter_code>height = data['Height']

height.head()
height.shape<jupyter_output><empty_output><jupyter_text>Histogram-plot<jupyter_code>plt.figure(figsize=(12, 8))

height.plot(kind = 'hist',
            title = 'Height Histogram')<jupyter_output><empty_output><jupyter_text>Box-plot<jupyter_code>plt.figure(figsize=(12, 8))

height.plot(kind = 'box',
            title = 'Height Box-plot')<jupyter_output><empty_output><jupyter_text>KDE distribution for height<jupyter_code>height.plot(kind = 'kde',
            title = 'Height KDE', figsize=(12, 8))<jupyter_output><empty_output><jupyter_text>Analysis As we can see we have a high count for height in the range 60 to 75.  Considering only weight<jupyter_code>weight = data['Weight']

weight.head()
weight.shape<jupyter_output><empty_output><jupyter_text>Histogram-plot<jupyter_code>plt.figure(figsize=(12, 8))

weight.plot(kind = 'hist',
            title = 'Weight Histogram')<jupyter_output><empty_output><jupyter_text>Box-plot<jupyter_code>plt.figure(figsize=(12, 8))

weight.plot(kind = 'box',
            title = 'Weight Box-plot')<jupyter_output><empty_output><jupyter_text>KDE distribution for height<jupyter_code>plt.figure(figsize=(12, 8))

weight.plot(kind = 'kde',
            title = 'Weight KDE')<jupyter_output><empty_output><jupyter_text>Bivariate Analysis  Considering both height and weight<jupyter_code>plt.figure(figsize=(12, 8))

sns.scatterplot(x = "Height", y = "Weight", data=data)
plt.figure(figsize=(12, 8))

sns.scatterplot(x = "Height", y = "Weight", hue='Gender', data=data)
gender_groupby = data.groupby('Gender', as_index=False)

gender_groupby.head()
gender_groupby.describe().T<jupyter_output><empty_output><jupyter_text>Distribution plots  Considering both gender and height<jupyter_code>sns.FacetGrid(data, hue = 'Gender', height = 5)\
              .map(sns.distplot, 'Height')\
              .add_legend()<jupyter_output><empty_output><jupyter_text>Considering both gender and weight<jupyter_code>sns.FacetGrid(data, hue = 'Gender', height = 5)\
    .map(sns.distplot, 'Weight').add_legend()<jupyter_output><empty_output><jupyter_text>Violin Plot  Gender vs Height<jupyter_code>plt.figure(figsize=(12, 8))

sns.boxplot(x = 'Gender', y ='Height', data = data)<jupyter_output><empty_output><jupyter_text>Gender vs Weight<jupyter_code>plt.figure(figsize=(12, 8))

sns.boxplot(x = 'Gender', y ='Weight', data = data)
plt.figure(figsize=(12, 8))

sns.violinplot(x = 'Gender', y ='Height', data = data)
plt.figure(figsize=(12, 8))

sns.violinplot(x = 'Gender', y ='Weight', data = data)<jupyter_output><empty_output><jupyter_text>Multivariate Analysis<jupyter_code>sns.pairplot(data, hue = 'Gender', height = 4)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1420389461626575, 'fraction_numerical': 0.01288659793814433, 'mean_word_length': 6.867117117117117, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 73, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '18', 'dir': 'jupyter-structured-clean-dedup', 'id': '359163', 'license': 'MIT', 'n_tokens_mistral': 1365, 'n_tokens_neox': 1269, 'n_words': 205, 'path': 'book/descriptive/04-Summary-Statistics-And-Visualizations.ipynb', 'repo_name': 'hossainlab/statswithpy', 'size': '3492'}