Created
May 6, 2019 12:52
-
-
Save eltomali/098fb0475bd2dc23d38e6986e4ba041f to your computer and use it in GitHub Desktop.
Created on Cognitive Class Labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<div class=\"alert alert-block alert-info\" style=\"margin-top: 20px\">\n", | |
" <a href=\"https://cocl.us/corsera_da0101en_notebook_top\">\n", | |
" <img src=\"https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/Images/TopAd.png\" width=\"750\" align=\"center\">\n", | |
" </a>\n", | |
"</div>\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<a href=\"https://www.bigdatauniversity.com\"><img src = \"https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/Images/CCLog.png\" width = 300, align = \"center\"></a>\n", | |
"\n", | |
"<h1 align=center><font size = 5>Data Analysis with Python</font></h1>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Exploratory Data Analysis" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Welcome!</h3>\n", | |
"In this section, we will explore several methods to see if certain characteristics or features can be used to predict car price. " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2>Table of content</h2>\n", | |
"\n", | |
"<div class=\"alert alert-block alert-info\" style=\"margin-top: 20px\">\n", | |
"<ol>\n", | |
" <li><a href=\"#import_data\">Import Data from Module</a></li>\n", | |
" <li><a href=\"#pattern_visualization\">Analyzing Individual Feature Patterns using Visualization</a></li>\n", | |
" <li><a href=\"#discriptive_statistics\">Descriptive Statistical Analysis</a></li>\n", | |
" <li><a href=\"#basic_grouping\">Basics of Grouping</a></li>\n", | |
" <li><a href=\"#correlation_causation\">Correlation and Causation</a></li>\n", | |
" <li><a href=\"#anova\">ANOVA</a></li>\n", | |
"</ol>\n", | |
" \n", | |
"Estimated Time Needed: <strong>30 min</strong>\n", | |
"</div>\n", | |
" \n", | |
"<hr>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>What are the main characteristics which have the most impact on the car price?</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2 id=\"import_data\">1. Import Data from Module 2</h2>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h4>Setup</h4>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Import libraries " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd\n", | |
"import numpy as np" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" load data and store in dataframe df:" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This dataset was hosted on IBM Cloud object click <a href=\"https://cocl.us/DA101EN_object_storage\">HERE</a> for free storage" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>symboling</th>\n", | |
" <th>normalized-losses</th>\n", | |
" <th>make</th>\n", | |
" <th>aspiration</th>\n", | |
" <th>num-of-doors</th>\n", | |
" <th>body-style</th>\n", | |
" <th>drive-wheels</th>\n", | |
" <th>engine-location</th>\n", | |
" <th>wheel-base</th>\n", | |
" <th>length</th>\n", | |
" <th>...</th>\n", | |
" <th>compression-ratio</th>\n", | |
" <th>horsepower</th>\n", | |
" <th>peak-rpm</th>\n", | |
" <th>city-mpg</th>\n", | |
" <th>highway-mpg</th>\n", | |
" <th>price</th>\n", | |
" <th>city-L/100km</th>\n", | |
" <th>horsepower-binned</th>\n", | |
" <th>diesel</th>\n", | |
" <th>gas</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>3</td>\n", | |
" <td>122</td>\n", | |
" <td>alfa-romero</td>\n", | |
" <td>std</td>\n", | |
" <td>two</td>\n", | |
" <td>convertible</td>\n", | |
" <td>rwd</td>\n", | |
" <td>front</td>\n", | |
" <td>88.6</td>\n", | |
" <td>0.811148</td>\n", | |
" <td>...</td>\n", | |
" <td>9.0</td>\n", | |
" <td>111.0</td>\n", | |
" <td>5000.0</td>\n", | |
" <td>21</td>\n", | |
" <td>27</td>\n", | |
" <td>13495.0</td>\n", | |
" <td>11.190476</td>\n", | |
" <td>Medium</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>3</td>\n", | |
" <td>122</td>\n", | |
" <td>alfa-romero</td>\n", | |
" <td>std</td>\n", | |
" <td>two</td>\n", | |
" <td>convertible</td>\n", | |
" <td>rwd</td>\n", | |
" <td>front</td>\n", | |
" <td>88.6</td>\n", | |
" <td>0.811148</td>\n", | |
" <td>...</td>\n", | |
" <td>9.0</td>\n", | |
" <td>111.0</td>\n", | |
" <td>5000.0</td>\n", | |
" <td>21</td>\n", | |
" <td>27</td>\n", | |
" <td>16500.0</td>\n", | |
" <td>11.190476</td>\n", | |
" <td>Medium</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>1</td>\n", | |
" <td>122</td>\n", | |
" <td>alfa-romero</td>\n", | |
" <td>std</td>\n", | |
" <td>two</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>rwd</td>\n", | |
" <td>front</td>\n", | |
" <td>94.5</td>\n", | |
" <td>0.822681</td>\n", | |
" <td>...</td>\n", | |
" <td>9.0</td>\n", | |
" <td>154.0</td>\n", | |
" <td>5000.0</td>\n", | |
" <td>19</td>\n", | |
" <td>26</td>\n", | |
" <td>16500.0</td>\n", | |
" <td>12.368421</td>\n", | |
" <td>Medium</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>2</td>\n", | |
" <td>164</td>\n", | |
" <td>audi</td>\n", | |
" <td>std</td>\n", | |
" <td>four</td>\n", | |
" <td>sedan</td>\n", | |
" <td>fwd</td>\n", | |
" <td>front</td>\n", | |
" <td>99.8</td>\n", | |
" <td>0.848630</td>\n", | |
" <td>...</td>\n", | |
" <td>10.0</td>\n", | |
" <td>102.0</td>\n", | |
" <td>5500.0</td>\n", | |
" <td>24</td>\n", | |
" <td>30</td>\n", | |
" <td>13950.0</td>\n", | |
" <td>9.791667</td>\n", | |
" <td>Medium</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>2</td>\n", | |
" <td>164</td>\n", | |
" <td>audi</td>\n", | |
" <td>std</td>\n", | |
" <td>four</td>\n", | |
" <td>sedan</td>\n", | |
" <td>4wd</td>\n", | |
" <td>front</td>\n", | |
" <td>99.4</td>\n", | |
" <td>0.848630</td>\n", | |
" <td>...</td>\n", | |
" <td>8.0</td>\n", | |
" <td>115.0</td>\n", | |
" <td>5500.0</td>\n", | |
" <td>18</td>\n", | |
" <td>22</td>\n", | |
" <td>17450.0</td>\n", | |
" <td>13.055556</td>\n", | |
" <td>Medium</td>\n", | |
" <td>0</td>\n", | |
" <td>1</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>5 rows × 29 columns</p>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" symboling normalized-losses make aspiration num-of-doors \\\n", | |
"0 3 122 alfa-romero std two \n", | |
"1 3 122 alfa-romero std two \n", | |
"2 1 122 alfa-romero std two \n", | |
"3 2 164 audi std four \n", | |
"4 2 164 audi std four \n", | |
"\n", | |
" body-style drive-wheels engine-location wheel-base length ... \\\n", | |
"0 convertible rwd front 88.6 0.811148 ... \n", | |
"1 convertible rwd front 88.6 0.811148 ... \n", | |
"2 hatchback rwd front 94.5 0.822681 ... \n", | |
"3 sedan fwd front 99.8 0.848630 ... \n", | |
"4 sedan 4wd front 99.4 0.848630 ... \n", | |
"\n", | |
" compression-ratio horsepower peak-rpm city-mpg highway-mpg price \\\n", | |
"0 9.0 111.0 5000.0 21 27 13495.0 \n", | |
"1 9.0 111.0 5000.0 21 27 16500.0 \n", | |
"2 9.0 154.0 5000.0 19 26 16500.0 \n", | |
"3 10.0 102.0 5500.0 24 30 13950.0 \n", | |
"4 8.0 115.0 5500.0 18 22 17450.0 \n", | |
"\n", | |
" city-L/100km horsepower-binned diesel gas \n", | |
"0 11.190476 Medium 0 1 \n", | |
"1 11.190476 Medium 0 1 \n", | |
"2 12.368421 Medium 0 1 \n", | |
"3 9.791667 Medium 0 1 \n", | |
"4 13.055556 Medium 0 1 \n", | |
"\n", | |
"[5 rows x 29 columns]" | |
] | |
}, | |
"execution_count": 2, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"path='https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/automobileEDA.csv'\n", | |
"df = pd.read_csv(path)\n", | |
"df.head()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2 id=\"pattern_visualization\">2. Analyzing Individual Feature Patterns using Visualization</h2>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"To install seaborn we use the pip which is the python package manager." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"%%capture\n", | |
"! pip install seaborn" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Import visualization packages \"Matplotlib\" and \"Seaborn\", don't forget about \"%matplotlib inline\" to plot in a Jupyter notebook." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [], | |
"source": [ | |
"import matplotlib.pyplot as plt\n", | |
"import seaborn as sns\n", | |
"%matplotlib inline " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h4>How to choose the right visualization method?</h4>\n", | |
"<p>When visualizing individual variables, it is important to first understand what type of variable you are dealing with. This will help us find the right visualization method for that variable.</p>\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"symboling int64\n", | |
"normalized-losses int64\n", | |
"make object\n", | |
"aspiration object\n", | |
"num-of-doors object\n", | |
"body-style object\n", | |
"drive-wheels object\n", | |
"engine-location object\n", | |
"wheel-base float64\n", | |
"length float64\n", | |
"width float64\n", | |
"height float64\n", | |
"curb-weight int64\n", | |
"engine-type object\n", | |
"num-of-cylinders object\n", | |
"engine-size int64\n", | |
"fuel-system object\n", | |
"bore float64\n", | |
"stroke float64\n", | |
"compression-ratio float64\n", | |
"horsepower float64\n", | |
"peak-rpm float64\n", | |
"city-mpg int64\n", | |
"highway-mpg int64\n", | |
"price float64\n", | |
"city-L/100km float64\n", | |
"horsepower-binned object\n", | |
"diesel int64\n", | |
"gas int64\n", | |
"dtype: object\n" | |
] | |
} | |
], | |
"source": [ | |
"# list the data types for each column\n", | |
"print(df.dtypes)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<div class=\"alert alert-danger alertdanger\" style=\"margin-top: 20px\">\n", | |
"<h3>Question #1:</h3>\n", | |
"\n", | |
"<b>What is the data type of the column \"peak-rpm\"? </b>\n", | |
"<p>float64</p>\n", | |
"</div>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Double-click <b>here</b> for the solution.\n", | |
"\n", | |
"<!-- The answer is below:\n", | |
"\n", | |
"float64\n", | |
"\n", | |
"-->" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"for example, we can calculate the correlation between variables of type \"int64\" or \"float64\" using the method \"corr\":" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>symboling</th>\n", | |
" <th>normalized-losses</th>\n", | |
" <th>wheel-base</th>\n", | |
" <th>length</th>\n", | |
" <th>width</th>\n", | |
" <th>height</th>\n", | |
" <th>curb-weight</th>\n", | |
" <th>engine-size</th>\n", | |
" <th>bore</th>\n", | |
" <th>stroke</th>\n", | |
" <th>compression-ratio</th>\n", | |
" <th>horsepower</th>\n", | |
" <th>peak-rpm</th>\n", | |
" <th>city-mpg</th>\n", | |
" <th>highway-mpg</th>\n", | |
" <th>price</th>\n", | |
" <th>city-L/100km</th>\n", | |
" <th>diesel</th>\n", | |
" <th>gas</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>symboling</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.466264</td>\n", | |
" <td>-0.535987</td>\n", | |
" <td>-0.365404</td>\n", | |
" <td>-0.242423</td>\n", | |
" <td>-0.550160</td>\n", | |
" <td>-0.233118</td>\n", | |
" <td>-0.110581</td>\n", | |
" <td>-0.140019</td>\n", | |
" <td>-0.008245</td>\n", | |
" <td>-0.182196</td>\n", | |
" <td>0.075819</td>\n", | |
" <td>0.279740</td>\n", | |
" <td>-0.035527</td>\n", | |
" <td>0.036233</td>\n", | |
" <td>-0.082391</td>\n", | |
" <td>0.066171</td>\n", | |
" <td>-0.196735</td>\n", | |
" <td>0.196735</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>normalized-losses</th>\n", | |
" <td>0.466264</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.056661</td>\n", | |
" <td>0.019424</td>\n", | |
" <td>0.086802</td>\n", | |
" <td>-0.373737</td>\n", | |
" <td>0.099404</td>\n", | |
" <td>0.112360</td>\n", | |
" <td>-0.029862</td>\n", | |
" <td>0.055563</td>\n", | |
" <td>-0.114713</td>\n", | |
" <td>0.217299</td>\n", | |
" <td>0.239543</td>\n", | |
" <td>-0.225016</td>\n", | |
" <td>-0.181877</td>\n", | |
" <td>0.133999</td>\n", | |
" <td>0.238567</td>\n", | |
" <td>-0.101546</td>\n", | |
" <td>0.101546</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>wheel-base</th>\n", | |
" <td>-0.535987</td>\n", | |
" <td>-0.056661</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.876024</td>\n", | |
" <td>0.814507</td>\n", | |
" <td>0.590742</td>\n", | |
" <td>0.782097</td>\n", | |
" <td>0.572027</td>\n", | |
" <td>0.493244</td>\n", | |
" <td>0.158502</td>\n", | |
" <td>0.250313</td>\n", | |
" <td>0.371147</td>\n", | |
" <td>-0.360305</td>\n", | |
" <td>-0.470606</td>\n", | |
" <td>-0.543304</td>\n", | |
" <td>0.584642</td>\n", | |
" <td>0.476153</td>\n", | |
" <td>0.307237</td>\n", | |
" <td>-0.307237</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>length</th>\n", | |
" <td>-0.365404</td>\n", | |
" <td>0.019424</td>\n", | |
" <td>0.876024</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.857170</td>\n", | |
" <td>0.492063</td>\n", | |
" <td>0.880665</td>\n", | |
" <td>0.685025</td>\n", | |
" <td>0.608971</td>\n", | |
" <td>0.124139</td>\n", | |
" <td>0.159733</td>\n", | |
" <td>0.579821</td>\n", | |
" <td>-0.285970</td>\n", | |
" <td>-0.665192</td>\n", | |
" <td>-0.698142</td>\n", | |
" <td>0.690628</td>\n", | |
" <td>0.657373</td>\n", | |
" <td>0.211187</td>\n", | |
" <td>-0.211187</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>width</th>\n", | |
" <td>-0.242423</td>\n", | |
" <td>0.086802</td>\n", | |
" <td>0.814507</td>\n", | |
" <td>0.857170</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.306002</td>\n", | |
" <td>0.866201</td>\n", | |
" <td>0.729436</td>\n", | |
" <td>0.544885</td>\n", | |
" <td>0.188829</td>\n", | |
" <td>0.189867</td>\n", | |
" <td>0.615077</td>\n", | |
" <td>-0.245800</td>\n", | |
" <td>-0.633531</td>\n", | |
" <td>-0.680635</td>\n", | |
" <td>0.751265</td>\n", | |
" <td>0.673363</td>\n", | |
" <td>0.244356</td>\n", | |
" <td>-0.244356</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>height</th>\n", | |
" <td>-0.550160</td>\n", | |
" <td>-0.373737</td>\n", | |
" <td>0.590742</td>\n", | |
" <td>0.492063</td>\n", | |
" <td>0.306002</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.307581</td>\n", | |
" <td>0.074694</td>\n", | |
" <td>0.180449</td>\n", | |
" <td>-0.062704</td>\n", | |
" <td>0.259737</td>\n", | |
" <td>-0.087027</td>\n", | |
" <td>-0.309974</td>\n", | |
" <td>-0.049800</td>\n", | |
" <td>-0.104812</td>\n", | |
" <td>0.135486</td>\n", | |
" <td>0.003811</td>\n", | |
" <td>0.281578</td>\n", | |
" <td>-0.281578</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>curb-weight</th>\n", | |
" <td>-0.233118</td>\n", | |
" <td>0.099404</td>\n", | |
" <td>0.782097</td>\n", | |
" <td>0.880665</td>\n", | |
" <td>0.866201</td>\n", | |
" <td>0.307581</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.849072</td>\n", | |
" <td>0.644060</td>\n", | |
" <td>0.167562</td>\n", | |
" <td>0.156433</td>\n", | |
" <td>0.757976</td>\n", | |
" <td>-0.279361</td>\n", | |
" <td>-0.749543</td>\n", | |
" <td>-0.794889</td>\n", | |
" <td>0.834415</td>\n", | |
" <td>0.785353</td>\n", | |
" <td>0.221046</td>\n", | |
" <td>-0.221046</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>engine-size</th>\n", | |
" <td>-0.110581</td>\n", | |
" <td>0.112360</td>\n", | |
" <td>0.572027</td>\n", | |
" <td>0.685025</td>\n", | |
" <td>0.729436</td>\n", | |
" <td>0.074694</td>\n", | |
" <td>0.849072</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.572609</td>\n", | |
" <td>0.209523</td>\n", | |
" <td>0.028889</td>\n", | |
" <td>0.822676</td>\n", | |
" <td>-0.256733</td>\n", | |
" <td>-0.650546</td>\n", | |
" <td>-0.679571</td>\n", | |
" <td>0.872335</td>\n", | |
" <td>0.745059</td>\n", | |
" <td>0.070779</td>\n", | |
" <td>-0.070779</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>bore</th>\n", | |
" <td>-0.140019</td>\n", | |
" <td>-0.029862</td>\n", | |
" <td>0.493244</td>\n", | |
" <td>0.608971</td>\n", | |
" <td>0.544885</td>\n", | |
" <td>0.180449</td>\n", | |
" <td>0.644060</td>\n", | |
" <td>0.572609</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.055390</td>\n", | |
" <td>0.001263</td>\n", | |
" <td>0.566936</td>\n", | |
" <td>-0.267392</td>\n", | |
" <td>-0.582027</td>\n", | |
" <td>-0.591309</td>\n", | |
" <td>0.543155</td>\n", | |
" <td>0.554610</td>\n", | |
" <td>0.054458</td>\n", | |
" <td>-0.054458</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>stroke</th>\n", | |
" <td>-0.008245</td>\n", | |
" <td>0.055563</td>\n", | |
" <td>0.158502</td>\n", | |
" <td>0.124139</td>\n", | |
" <td>0.188829</td>\n", | |
" <td>-0.062704</td>\n", | |
" <td>0.167562</td>\n", | |
" <td>0.209523</td>\n", | |
" <td>-0.055390</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.187923</td>\n", | |
" <td>0.098462</td>\n", | |
" <td>-0.065713</td>\n", | |
" <td>-0.034696</td>\n", | |
" <td>-0.035201</td>\n", | |
" <td>0.082310</td>\n", | |
" <td>0.037300</td>\n", | |
" <td>0.241303</td>\n", | |
" <td>-0.241303</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>compression-ratio</th>\n", | |
" <td>-0.182196</td>\n", | |
" <td>-0.114713</td>\n", | |
" <td>0.250313</td>\n", | |
" <td>0.159733</td>\n", | |
" <td>0.189867</td>\n", | |
" <td>0.259737</td>\n", | |
" <td>0.156433</td>\n", | |
" <td>0.028889</td>\n", | |
" <td>0.001263</td>\n", | |
" <td>0.187923</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.214514</td>\n", | |
" <td>-0.435780</td>\n", | |
" <td>0.331425</td>\n", | |
" <td>0.268465</td>\n", | |
" <td>0.071107</td>\n", | |
" <td>-0.299372</td>\n", | |
" <td>0.985231</td>\n", | |
" <td>-0.985231</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>horsepower</th>\n", | |
" <td>0.075819</td>\n", | |
" <td>0.217299</td>\n", | |
" <td>0.371147</td>\n", | |
" <td>0.579821</td>\n", | |
" <td>0.615077</td>\n", | |
" <td>-0.087027</td>\n", | |
" <td>0.757976</td>\n", | |
" <td>0.822676</td>\n", | |
" <td>0.566936</td>\n", | |
" <td>0.098462</td>\n", | |
" <td>-0.214514</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.107885</td>\n", | |
" <td>-0.822214</td>\n", | |
" <td>-0.804575</td>\n", | |
" <td>0.809575</td>\n", | |
" <td>0.889488</td>\n", | |
" <td>-0.169053</td>\n", | |
" <td>0.169053</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>peak-rpm</th>\n", | |
" <td>0.279740</td>\n", | |
" <td>0.239543</td>\n", | |
" <td>-0.360305</td>\n", | |
" <td>-0.285970</td>\n", | |
" <td>-0.245800</td>\n", | |
" <td>-0.309974</td>\n", | |
" <td>-0.279361</td>\n", | |
" <td>-0.256733</td>\n", | |
" <td>-0.267392</td>\n", | |
" <td>-0.065713</td>\n", | |
" <td>-0.435780</td>\n", | |
" <td>0.107885</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.115413</td>\n", | |
" <td>-0.058598</td>\n", | |
" <td>-0.101616</td>\n", | |
" <td>0.115830</td>\n", | |
" <td>-0.475812</td>\n", | |
" <td>0.475812</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>city-mpg</th>\n", | |
" <td>-0.035527</td>\n", | |
" <td>-0.225016</td>\n", | |
" <td>-0.470606</td>\n", | |
" <td>-0.665192</td>\n", | |
" <td>-0.633531</td>\n", | |
" <td>-0.049800</td>\n", | |
" <td>-0.749543</td>\n", | |
" <td>-0.650546</td>\n", | |
" <td>-0.582027</td>\n", | |
" <td>-0.034696</td>\n", | |
" <td>0.331425</td>\n", | |
" <td>-0.822214</td>\n", | |
" <td>-0.115413</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.972044</td>\n", | |
" <td>-0.686571</td>\n", | |
" <td>-0.949713</td>\n", | |
" <td>0.265676</td>\n", | |
" <td>-0.265676</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>highway-mpg</th>\n", | |
" <td>0.036233</td>\n", | |
" <td>-0.181877</td>\n", | |
" <td>-0.543304</td>\n", | |
" <td>-0.698142</td>\n", | |
" <td>-0.680635</td>\n", | |
" <td>-0.104812</td>\n", | |
" <td>-0.794889</td>\n", | |
" <td>-0.679571</td>\n", | |
" <td>-0.591309</td>\n", | |
" <td>-0.035201</td>\n", | |
" <td>0.268465</td>\n", | |
" <td>-0.804575</td>\n", | |
" <td>-0.058598</td>\n", | |
" <td>0.972044</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.704692</td>\n", | |
" <td>-0.930028</td>\n", | |
" <td>0.198690</td>\n", | |
" <td>-0.198690</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>price</th>\n", | |
" <td>-0.082391</td>\n", | |
" <td>0.133999</td>\n", | |
" <td>0.584642</td>\n", | |
" <td>0.690628</td>\n", | |
" <td>0.751265</td>\n", | |
" <td>0.135486</td>\n", | |
" <td>0.834415</td>\n", | |
" <td>0.872335</td>\n", | |
" <td>0.543155</td>\n", | |
" <td>0.082310</td>\n", | |
" <td>0.071107</td>\n", | |
" <td>0.809575</td>\n", | |
" <td>-0.101616</td>\n", | |
" <td>-0.686571</td>\n", | |
" <td>-0.704692</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.789898</td>\n", | |
" <td>0.110326</td>\n", | |
" <td>-0.110326</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>city-L/100km</th>\n", | |
" <td>0.066171</td>\n", | |
" <td>0.238567</td>\n", | |
" <td>0.476153</td>\n", | |
" <td>0.657373</td>\n", | |
" <td>0.673363</td>\n", | |
" <td>0.003811</td>\n", | |
" <td>0.785353</td>\n", | |
" <td>0.745059</td>\n", | |
" <td>0.554610</td>\n", | |
" <td>0.037300</td>\n", | |
" <td>-0.299372</td>\n", | |
" <td>0.889488</td>\n", | |
" <td>0.115830</td>\n", | |
" <td>-0.949713</td>\n", | |
" <td>-0.930028</td>\n", | |
" <td>0.789898</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.241282</td>\n", | |
" <td>0.241282</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>diesel</th>\n", | |
" <td>-0.196735</td>\n", | |
" <td>-0.101546</td>\n", | |
" <td>0.307237</td>\n", | |
" <td>0.211187</td>\n", | |
" <td>0.244356</td>\n", | |
" <td>0.281578</td>\n", | |
" <td>0.221046</td>\n", | |
" <td>0.070779</td>\n", | |
" <td>0.054458</td>\n", | |
" <td>0.241303</td>\n", | |
" <td>0.985231</td>\n", | |
" <td>-0.169053</td>\n", | |
" <td>-0.475812</td>\n", | |
" <td>0.265676</td>\n", | |
" <td>0.198690</td>\n", | |
" <td>0.110326</td>\n", | |
" <td>-0.241282</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>gas</th>\n", | |
" <td>0.196735</td>\n", | |
" <td>0.101546</td>\n", | |
" <td>-0.307237</td>\n", | |
" <td>-0.211187</td>\n", | |
" <td>-0.244356</td>\n", | |
" <td>-0.281578</td>\n", | |
" <td>-0.221046</td>\n", | |
" <td>-0.070779</td>\n", | |
" <td>-0.054458</td>\n", | |
" <td>-0.241303</td>\n", | |
" <td>-0.985231</td>\n", | |
" <td>0.169053</td>\n", | |
" <td>0.475812</td>\n", | |
" <td>-0.265676</td>\n", | |
" <td>-0.198690</td>\n", | |
" <td>-0.110326</td>\n", | |
" <td>0.241282</td>\n", | |
" <td>-1.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" symboling normalized-losses wheel-base length \\\n", | |
"symboling 1.000000 0.466264 -0.535987 -0.365404 \n", | |
"normalized-losses 0.466264 1.000000 -0.056661 0.019424 \n", | |
"wheel-base -0.535987 -0.056661 1.000000 0.876024 \n", | |
"length -0.365404 0.019424 0.876024 1.000000 \n", | |
"width -0.242423 0.086802 0.814507 0.857170 \n", | |
"height -0.550160 -0.373737 0.590742 0.492063 \n", | |
"curb-weight -0.233118 0.099404 0.782097 0.880665 \n", | |
"engine-size -0.110581 0.112360 0.572027 0.685025 \n", | |
"bore -0.140019 -0.029862 0.493244 0.608971 \n", | |
"stroke -0.008245 0.055563 0.158502 0.124139 \n", | |
"compression-ratio -0.182196 -0.114713 0.250313 0.159733 \n", | |
"horsepower 0.075819 0.217299 0.371147 0.579821 \n", | |
"peak-rpm 0.279740 0.239543 -0.360305 -0.285970 \n", | |
"city-mpg -0.035527 -0.225016 -0.470606 -0.665192 \n", | |
"highway-mpg 0.036233 -0.181877 -0.543304 -0.698142 \n", | |
"price -0.082391 0.133999 0.584642 0.690628 \n", | |
"city-L/100km 0.066171 0.238567 0.476153 0.657373 \n", | |
"diesel -0.196735 -0.101546 0.307237 0.211187 \n", | |
"gas 0.196735 0.101546 -0.307237 -0.211187 \n", | |
"\n", | |
" width height curb-weight engine-size bore \\\n", | |
"symboling -0.242423 -0.550160 -0.233118 -0.110581 -0.140019 \n", | |
"normalized-losses 0.086802 -0.373737 0.099404 0.112360 -0.029862 \n", | |
"wheel-base 0.814507 0.590742 0.782097 0.572027 0.493244 \n", | |
"length 0.857170 0.492063 0.880665 0.685025 0.608971 \n", | |
"width 1.000000 0.306002 0.866201 0.729436 0.544885 \n", | |
"height 0.306002 1.000000 0.307581 0.074694 0.180449 \n", | |
"curb-weight 0.866201 0.307581 1.000000 0.849072 0.644060 \n", | |
"engine-size 0.729436 0.074694 0.849072 1.000000 0.572609 \n", | |
"bore 0.544885 0.180449 0.644060 0.572609 1.000000 \n", | |
"stroke 0.188829 -0.062704 0.167562 0.209523 -0.055390 \n", | |
"compression-ratio 0.189867 0.259737 0.156433 0.028889 0.001263 \n", | |
"horsepower 0.615077 -0.087027 0.757976 0.822676 0.566936 \n", | |
"peak-rpm -0.245800 -0.309974 -0.279361 -0.256733 -0.267392 \n", | |
"city-mpg -0.633531 -0.049800 -0.749543 -0.650546 -0.582027 \n", | |
"highway-mpg -0.680635 -0.104812 -0.794889 -0.679571 -0.591309 \n", | |
"price 0.751265 0.135486 0.834415 0.872335 0.543155 \n", | |
"city-L/100km 0.673363 0.003811 0.785353 0.745059 0.554610 \n", | |
"diesel 0.244356 0.281578 0.221046 0.070779 0.054458 \n", | |
"gas -0.244356 -0.281578 -0.221046 -0.070779 -0.054458 \n", | |
"\n", | |
" stroke compression-ratio horsepower peak-rpm \\\n", | |
"symboling -0.008245 -0.182196 0.075819 0.279740 \n", | |
"normalized-losses 0.055563 -0.114713 0.217299 0.239543 \n", | |
"wheel-base 0.158502 0.250313 0.371147 -0.360305 \n", | |
"length 0.124139 0.159733 0.579821 -0.285970 \n", | |
"width 0.188829 0.189867 0.615077 -0.245800 \n", | |
"height -0.062704 0.259737 -0.087027 -0.309974 \n", | |
"curb-weight 0.167562 0.156433 0.757976 -0.279361 \n", | |
"engine-size 0.209523 0.028889 0.822676 -0.256733 \n", | |
"bore -0.055390 0.001263 0.566936 -0.267392 \n", | |
"stroke 1.000000 0.187923 0.098462 -0.065713 \n", | |
"compression-ratio 0.187923 1.000000 -0.214514 -0.435780 \n", | |
"horsepower 0.098462 -0.214514 1.000000 0.107885 \n", | |
"peak-rpm -0.065713 -0.435780 0.107885 1.000000 \n", | |
"city-mpg -0.034696 0.331425 -0.822214 -0.115413 \n", | |
"highway-mpg -0.035201 0.268465 -0.804575 -0.058598 \n", | |
"price 0.082310 0.071107 0.809575 -0.101616 \n", | |
"city-L/100km 0.037300 -0.299372 0.889488 0.115830 \n", | |
"diesel 0.241303 0.985231 -0.169053 -0.475812 \n", | |
"gas -0.241303 -0.985231 0.169053 0.475812 \n", | |
"\n", | |
" city-mpg highway-mpg price city-L/100km diesel \\\n", | |
"symboling -0.035527 0.036233 -0.082391 0.066171 -0.196735 \n", | |
"normalized-losses -0.225016 -0.181877 0.133999 0.238567 -0.101546 \n", | |
"wheel-base -0.470606 -0.543304 0.584642 0.476153 0.307237 \n", | |
"length -0.665192 -0.698142 0.690628 0.657373 0.211187 \n", | |
"width -0.633531 -0.680635 0.751265 0.673363 0.244356 \n", | |
"height -0.049800 -0.104812 0.135486 0.003811 0.281578 \n", | |
"curb-weight -0.749543 -0.794889 0.834415 0.785353 0.221046 \n", | |
"engine-size -0.650546 -0.679571 0.872335 0.745059 0.070779 \n", | |
"bore -0.582027 -0.591309 0.543155 0.554610 0.054458 \n", | |
"stroke -0.034696 -0.035201 0.082310 0.037300 0.241303 \n", | |
"compression-ratio 0.331425 0.268465 0.071107 -0.299372 0.985231 \n", | |
"horsepower -0.822214 -0.804575 0.809575 0.889488 -0.169053 \n", | |
"peak-rpm -0.115413 -0.058598 -0.101616 0.115830 -0.475812 \n", | |
"city-mpg 1.000000 0.972044 -0.686571 -0.949713 0.265676 \n", | |
"highway-mpg 0.972044 1.000000 -0.704692 -0.930028 0.198690 \n", | |
"price -0.686571 -0.704692 1.000000 0.789898 0.110326 \n", | |
"city-L/100km -0.949713 -0.930028 0.789898 1.000000 -0.241282 \n", | |
"diesel 0.265676 0.198690 0.110326 -0.241282 1.000000 \n", | |
"gas -0.265676 -0.198690 -0.110326 0.241282 -1.000000 \n", | |
"\n", | |
" gas \n", | |
"symboling 0.196735 \n", | |
"normalized-losses 0.101546 \n", | |
"wheel-base -0.307237 \n", | |
"length -0.211187 \n", | |
"width -0.244356 \n", | |
"height -0.281578 \n", | |
"curb-weight -0.221046 \n", | |
"engine-size -0.070779 \n", | |
"bore -0.054458 \n", | |
"stroke -0.241303 \n", | |
"compression-ratio -0.985231 \n", | |
"horsepower 0.169053 \n", | |
"peak-rpm 0.475812 \n", | |
"city-mpg -0.265676 \n", | |
"highway-mpg -0.198690 \n", | |
"price -0.110326 \n", | |
"city-L/100km 0.241282 \n", | |
"diesel -1.000000 \n", | |
"gas 1.000000 " | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The diagonal elements are always one; we will study correlation more precisely Pearson correlation in-depth at the end of the notebook." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<div class=\"alert alert-danger alertdanger\" style=\"margin-top: 20px\">\n", | |
"<h1> Question #2: </h1>\n", | |
"\n", | |
"<p>Find the correlation between the following columns: bore, stroke,compression-ratio , and horsepower.</p>\n", | |
"<p>Hint: if you would like to select those columns use the following syntax: df[['bore','stroke' ,'compression-ratio','horsepower']]</p>\n", | |
"</div>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>bore</th>\n", | |
" <th>stroke</th>\n", | |
" <th>compression-ratio</th>\n", | |
" <th>horsepower</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>bore</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.055390</td>\n", | |
" <td>0.001263</td>\n", | |
" <td>0.566936</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>stroke</th>\n", | |
" <td>-0.055390</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.187923</td>\n", | |
" <td>0.098462</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>compression-ratio</th>\n", | |
" <td>0.001263</td>\n", | |
" <td>0.187923</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.214514</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>horsepower</th>\n", | |
" <td>0.566936</td>\n", | |
" <td>0.098462</td>\n", | |
" <td>-0.214514</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" bore stroke compression-ratio horsepower\n", | |
"bore 1.000000 -0.055390 0.001263 0.566936\n", | |
"stroke -0.055390 1.000000 0.187923 0.098462\n", | |
"compression-ratio 0.001263 0.187923 1.000000 -0.214514\n", | |
"horsepower 0.566936 0.098462 -0.214514 1.000000" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Write your code below and press Shift+Enter to execute \n", | |
"df[['bore', 'stroke', 'compression-ratio', 'horsepower']].corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Double-click <b>here</b> for the solution.\n", | |
"\n", | |
"<!-- The answer is below:\n", | |
"\n", | |
"df[['bore', 'stroke', 'compression-ratio', 'horsepower']].corr() \n", | |
"\n", | |
"-->" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2>Continuous numerical variables:</h2> \n", | |
"\n", | |
"<p>Continuous numerical variables are variables that may contain any value within some range. Continuous numerical variables can have the type \"int64\" or \"float64\". A great way to visualize these variables is by using scatterplots with fitted lines.</p>\n", | |
"\n", | |
"<p>In order to start understanding the (linear) relationship between an individual variable and the price. We can do this by using \"regplot\", which plots the scatterplot plus the fitted regression line for the data.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's see several examples of different linear relationships:" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h4>Positive linear relationship</h4>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's find the scatterplot of \"engine-size\" and \"price\" " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stderr", | |
"output_type": "stream", | |
"text": [ | |
"/home/jupyterlab/conda/lib/python3.6/site-packages/scipy/stats/stats.py:1713: FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.\n", | |
" return np.add.reduce(sorted[indexer] * weights, axis=axis) / sumval\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/plain": [ | |
"(0, 56457.01882359609)" | |
] | |
}, | |
"execution_count": 8, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEKCAYAAADaa8itAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3Xt8nHWd9//XZ07J5Jz0TBPaBgrljNByplREBFTAXRTYRVARCuqt+9jbvdVdV/eHrqu7e7uLuwu0HBRctQKrC+7N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wlYjMhdR68YtG2X8T8KfO99fk+VybgHNF5GjnuapE5BhjzEvGmFOdP1DeKtcAAADOSURBVI86z99hjLkbu+LvkLXpReR04KvAdcYuJZ/1sfM8P6VyoqGiVBbGmD9i90X8VkTewF7Bb7Qle/8C+EsRednZry+P5zoEfAb4hfNcm4BlGXZdBbwmIn/ADrDbh/3+S0AT8IzTWX9PHo+t1LjpkGKlikREqoCQMcaIyDXAtcaYK8p9XkpNJO1TUap4Tgf+3VmMqhf4XJnPR6kJp3cqSimlikb7VJRSShWNhopSSqmi0VBRSilVNBoqSimlikZDRSmlVNFoqCillCqa/x9HxJl7ns4qUAAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# Engine size as potential predictor variable of price\n", | |
"sns.regplot(x=\"engine-size\", y=\"price\", data=df)\n", | |
"plt.ylim(0,)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>As the engine-size goes up, the price goes up: this indicates a positive direct correlation between these two variables. Engine size seems like a pretty good predictor of price since the regression line is almost a perfect diagonal line.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" We can examine the correlation between 'engine-size' and 'price' and see it's approximately 0.87" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>engine-size</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>engine-size</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.872335</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>price</th>\n", | |
" <td>0.872335</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" engine-size price\n", | |
"engine-size 1.000000 0.872335\n", | |
"price 0.872335 1.000000" | |
] | |
}, | |
"execution_count": 9, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df[[\"engine-size\", \"price\"]].corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Highway mpg is a potential predictor variable of price " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x7fe5880f77f0>" | |
] | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ0AAAEKCAYAAADJvIhZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzs3Xl83NV56P/PM/tol2yNvG/YRmIPmJ0YY7sJkJZ0IS10Iy0ptA0Nvb1JQ25v09w07Q9et22W3jaFkoWkaQglSUObAIllHEMwYBswxEjGRl4kY2tka9fs8z2/P77fkUeyltEyi+Tn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rx11LpRDRnUtJxYDflxf/0sAJJekZ59HZ2WDEoX6vdkLQL+AZMDjFW7BCpdCIiojX5kCAiIlqTpBMREa1J0omIiNYk6URERGuSdCIiojVJOhER0ZqfRp/V6b4ZON4AAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"sns.regplot(x=\"highway-mpg\", y=\"price\", data=df)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>As the highway-mpg goes up, the price goes down: this indicates an inverse/negative relationship between these two variables. Highway mpg could potentially be a predictor of price.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We can examine the correlation between 'highway-mpg' and 'price' and see it's approximately -0.704" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>highway-mpg</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>highway-mpg</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.704692</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>price</th>\n", | |
" <td>-0.704692</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" highway-mpg price\n", | |
"highway-mpg 1.000000 -0.704692\n", | |
"price -0.704692 1.000000" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df[['highway-mpg', 'price']].corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Weak Linear Relationship</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's see if \"Peak-rpm\" as a predictor variable of \"price\"." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x7fe593df97b8>" | |
] | |
}, | |
"execution_count": 12, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEKCAYAAADaa8itAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztvXt8nNV17/1d88yMLpZsybYMjm2wnTgxlxZCFC5Jjo9LUmLSHEzfDz2FtgnNSWu3hZP0tEmBc9okx6T9QG8EclqOXUIDbROHus0bvzkQCiGumx4M2FySOHawIwMyGCTbsnUZSXN51vvHs0cajWakGWluGq3v5zPMzJr9PLM3Iz+/Z6+99lqiqhiGYRhGKQhVuwOGYRhG/WCiYhiGYZQMExXDMAyjZJioGIZhGCXDRMUwDMMoGSYqhmEYRskwUTEMwzBKhomKYRiGUTJMVAzDMIySEa52ByrN0qVLdfXq1dXuhmEYxpziwIEDJ1W1Y7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ECbqm7V/KktnnX1MvJ99wcyPkvnePohQaGqAVXtBUZEpG0G4zSMorHcX4ZRPNkCMAAcdLOEbL4KXK+qL4nIrwMbMz57DniPiCx2eaquALa7zz5HMBMZmua7M9+Pumc/43X6vf1bNyqCzVQMo3jOE5G0gNwE7AM60jYRiYhIekbSCpwQkQjBTCWT7wB3Af9HRFpV9RlVvdQ98mWWzf7u75dqUIZRCkxUDKN4DgE3i8gPCIqifZlg/eJuEXmJIFP0+1zbPwKeIShlezj7RKr6jwR1MnaLSNMMvvv+WY7FMEqKZSk2jCIQkdXAt1X14vn03YZRKDZTMQzDMEqGzVQMwzCMkmEzFcMwDKNkmKgYhmEYJcNExTAMwygZJiqGYRhGyTBRMQzDMEqGiYphGIZRMv5/1ed2vAyYje4AAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"sns.regplot(x=\"peak-rpm\", y=\"price\", data=df)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Peak rpm does not seem like a good predictor of the price at all since the regression line is close to horizontal. Also, the data points are very scattered and far from the fitted line, showing lots of variability. Therefore it's it is not a reliable variable.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We can examine the correlation between 'peak-rpm' and 'price' and see it's approximately -0.101616 " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>peak-rpm</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>peak-rpm</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.101616</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>price</th>\n", | |
" <td>-0.101616</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" peak-rpm price\n", | |
"peak-rpm 1.000000 -0.101616\n", | |
"price -0.101616 1.000000" | |
] | |
}, | |
"execution_count": 13, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df[['peak-rpm','price']].corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" <div class=\"alert alert-danger alertdanger\" style=\"margin-top: 20px\">\n", | |
"<h1> Question 3 a): </h1>\n", | |
"\n", | |
"<p>Find the correlation between x=\"stroke\", y=\"price\".</p>\n", | |
"<p>Hint: if you would like to select those columns use the following syntax: df[[\"stroke\",\"price\"]] </p>\n", | |
"</div>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>stroke</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>stroke</th>\n", | |
" <td>1.00000</td>\n", | |
" <td>0.08231</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>price</th>\n", | |
" <td>0.08231</td>\n", | |
" <td>1.00000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" stroke price\n", | |
"stroke 1.00000 0.08231\n", | |
"price 0.08231 1.00000" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Write your code below and press Shift+Enter to execute\n", | |
"df[['stroke', 'price']].corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Double-click <b>here</b> for the solution.\n", | |
"\n", | |
"<!-- The answer is below:\n", | |
"\n", | |
"#The correlation is 0.0823, the non-diagonal elements of the table.\n", | |
"#code:\n", | |
"df[[\"stroke\",\"price\"]].corr() \n", | |
"\n", | |
"-->" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<div class=\"alert alert-danger alertdanger\" style=\"margin-top: 20px\">\n", | |
"<h1>Question 3 b):</h1>\n", | |
"\n", | |
"<p>Given the correlation results between \"price\" and \"stroke\" do you expect a linear relationship?</p> \n", | |
"<p>Verify your results using the function \"regplot()\".</p>\n", | |
"</div>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x7fe57cf9db00>" | |
] | |
}, | |
"execution_count": 16, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUg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lE7heR5knHbBWRx0XkD9z733N1S14QkXtNmIxawkTFMErLBuAtVT1DVd9DkJX2LeDXVfXXXZ95wM9U9TxgB/AA8HFVfS9BlovPZh2vnSAJ43dU9RsichpBfY0PuMSNHvAfK3BehlEQJiqGUVpeBj4oIneIyP+lqsdz9PEIEncC/Arwmqq+6t4/CFyY1fcR4G9U9SH3/mKCJIzPu3Q6FwNrSn0ShjFbGin3l2GUHVV9VUTOIcgh9/+LyL/k6Damqp57PVMBpv8NXCIi33F51gR4UFVvLt2oDaN0mKViGCVERE4GYqr6t8BXgbOBIaAjzy57gFUi8i73/pPA/8rafgtBJui/du9/AFwuIkvc5y0UkXeU9iwMY/aYqBhGaZZtYBsAAACFSURBVHkv8Jybmvp/ga8Am4DH0o76bFR1jCAb9t+JyMsEFQG/Pqnb54AWEfkzVf058EXgX0TkJeBJguzAhlETWJZiwzAMo2SYpWIYhmGUDBMVwzAMo2SYqBiGYRglw0TFMAzDKBkmKoZhGEbJMFExDMMwSoaJimEYhlEyTFQMwzCMkvF/AMnAUj6g4F3jAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# Write your code below and press Shift+Enter to execute \n", | |
"#Weak correlation\n", | |
"sns.regplot(x=\"stroke\", y=\"price\", data=df)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Double-click <b>here</b> for the solution.\n", | |
"\n", | |
"<!-- The answer is below:\n", | |
"\n", | |
"#There is a weak correlation between the variable 'stroke' and 'price.' as such regression will not work well. We #can see this use \"regplot\" to demonstrate this.\n", | |
"\n", | |
"#Code: \n", | |
"sns.regplot(x=\"stroke\", y=\"price\", data=df)\n", | |
"\n", | |
"-->" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Categorical variables</h3>\n", | |
"\n", | |
"<p>These are variables that describe a 'characteristic' of a data unit, and are selected from a small group of categories. The categorical variables can have the type \"object\" or \"int64\". A good way to visualize categorical variables is by using boxplots.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's look at the relationship between \"body-style\" and \"price\"." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x7fe57ceeb160>" | |
] | |
}, | |
"execution_count": 17, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEKCAYAAADaa8itAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3XucXVV99/HPN2GEUKqBzICQQUNJLCLVVCLi4w3BhAyiYEXBqgyWx1jkYkvrBcvToEKrr7aikyoKEjN4IQJeiJg0GREEKwIDiYEANlOMMiSSGUIQTAK5/J4/1hpyMpy573POTPJ9v17nNfv89tp7r73nnPM7a+991lJEYGZmVoRxta6AmZntPpxUzMysME4qZmZWGCcVMzMrjJOKmZkVxknFzMwK46RiZmaFcVIxM7PCOKmYmVlh9qp1Baqtvr4+pkyZUutqmJmNKffcc093RDQMVG6PSypTpkyhvb291tUwMxtTJP12MOV8+svMzArjpGJmZoVxUjEzs8I4qZiZWWGcVMzMrDBOKmZmVhgnFTMzK0zFf6ciaTzQDjwaESdLWgC8GXgyFzkrIlZIEvAl4CRgU47fm9fRDFycy18aEa05fjSwAJgALAY+Gh4f2cxGoZaWFjo6Ooa0TGdnJwCNjY1DWm7q1KlccME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wAvpovuk/IsW+TTss90HslOXYxsCzXuY00KqBZxbjvL7MqkzQDuDwi3ljAuv4TWB4RV4+8ZmYj52sqZlWUBw07hwLuwpJ0D2mclX8Y6brMiuKWipmZFcbXVMzMrDBOKmZmVhgnFTMzK4yTipmZFcZJxczMCuOkYmZmhfn/omI6QJGqFD4AAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"sns.boxplot(x=\"body-style\", y=\"price\", data=df)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>We see that the distributions of price between the different body-style categories have a significant overlap, and so body-style would not be a good predictor of price. Let's examine engine \"engine-location\" and \"price\":</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x7fe57cefef28>" | |
] | |
}, | |
"execution_count": 18, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEKCAYAAADaa8itAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAH3lJREFUeJzt3X2QXXWd5/H3h06ARmQITZPCBAyauBhhjNBAdsFVIYRORgiziyvomIZhJ6PyEB1nBmJZRlEs2dqRSTKCRol0XDQgo0Ok8kDzJDolkA7EhBCs9EKAPGxoOxDBZIIJ3/3j/G686dx+5Nw+3fTnVXXr3vM9v3Pu93Tdyje/8/D7KSIwMzPLwyFFJ2BmZm8dLip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YiI/1loNjYsuKdiw5Kkv5L0eBpB+buSaiS9JulGSb+R9Kik0antu9PyKkk3SHotxff3LroaqTmtm1ppFN1ucutqNOgaSf87xddKuibFDxqNV9IlZIOC3pGOsTaNztuQtrks7ecpSTeVfXfFv4FZb7mo2LAj6b3Ax4GzI2IS2VhlnwTeBjwaEe8nG5Lmb9Im84B5EXEG6X/9XZiU9nsq8HFJJ0g6FvgSMCUiTgNagb/rIcWrACLiVOAyoDmNZTULOAn4QET8OVAapeBfIuKMiDgFqAU+GhF3p+/6ZERMKhsUlHRK7CayQRYnAWdIujit7upvYNYrLio2HJ0HnA6sSiPbnkc2h8zrwL2pzWpgXPr8n4GfpM8/6ma/lUZq7m4U3a50NRr0FOA7pUmlSsO60/1ovJWcATwcEe1pX3cA/zWt6+pvYNYrvqZiw5GA5oiYc0BQ+vv407hF/RlpudJIzV2NonsW8N20+GVgbaf8usr7gHGVejEab1f76cof3+TfwIY591RsOHoAuETScQCSjpHUXe/hUeC/p8+X9vG7Ko6iGxGPpdNSkyJiaadtuhoN+j7g05JGlPKm+9F4XwXeXiGnx4APSTpWUg3ZKbZf9PG4zCpyUbFhJyKeJrvOcV8a2bYFOL6bTT4H/J2kx1O7nX34roqj6PawWVejQX8feIFs1OffAJ/oYTTe24HvlC7Ul+W0DZgDPAT8BngiIu7p7TGZdcejFJv1QNIRwO6ICEmXApdFxIyi8zIbjHy+1KxnpwP/IknAK8BfF5yP2aDlnoqZmeXG11TMzCw3LipmZpYbFxUzM8uNi4qZmeXGRcXMzHLjomJmZrn5/5wcL3qqPhIXAAAAAElFTkSuQmCC\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"sns.boxplot(x=\"engine-location\", y=\"price\", data=df)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Here we see that the distribution of price between these two engine-location categories, front and rear, are distinct enough to take engine-location as a potential good predictor of price.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's examine \"drive-wheels\" and \"price\"." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"<matplotlib.axes._subplots.AxesSubplot at 0x7fe5889a6978>" | |
] | |
}, | |
"execution_count": 19, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAEKCAYAAADaa8itAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJzt3X18HdV95/HPV0aAE0psLMUQC2qKlQRCXSco4CxNmxAsLDeJaZNuybblvihbkxQwWZoG2HZf5Im+kt1t6JomBAJORJLW0CRdXGrVFk+BdHmSgxFPoVaABBUHJAwEwpONfvvHHMFFXD3YntHoSt/363Vfd+Y3Z+ae4WL97pk5c44iAjMzszw0lF0BMzObPpxUzMwsN04qZmaWGycVMzPLjZOKmZnlxknFzMxy46RiZma5cVIxM7PcOKmYmVlu9iq7ApOtqakpFi5cWHY1zMzqyubNmwcjonm8cjMuqSxcuJCenp6yq2FmVlck/XQi5Xz5y8zMcuOkYmZmuXFSMTOz3DipmJlZbpxUppHBwUHOPPNMnnjiibKrYmYzlJPKNNLZ2Ulvby+dnZ1lV8XMZignlWlicHCQrq4uIoKuri63VsysFIUnFUmzJN0p6Zq0/k1JD0nakl5LUlyS1kjqk9Qr6V1Vx6hI2ppelar4UZLuTvuskaSiz2eq6uzsZHhq6KGhIbdWzKwUk9FSOQu4f0TsLyJiSXptSb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7wGQ1CjpHRHxSEQsSa/hm/3Vo03fDHwc2BLjD8y3CThjeEXSkrS4ETgzJRckvXPkjpIOi4i7I+JLQA/Z6Lpme8xJxaxKRPyILDFsAb7Ha+c4GcuVwB+RXQojIl4imyPlS5LuSsf7T6PsezNwENkQ6o8BL0zwc1cDbWna4fvIkhHA54FGoFfSPWl9pE9KuifV7XmgawKfZzYuj1JsZma5cUvFzMxy46RiZma5cVIxM7PcOKmYmVlunFTMzCw3TipmZpYbJxUzM8uNk4qZmeXm/wOJ4wILNo1GjAAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"# drive-wheels\n", | |
"sns.boxplot(x=\"drive-wheels\", y=\"price\", data=df)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Here we see that the distribution of price between the different drive-wheels categories differs; as such drive-wheels could potentially be a predictor of price.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2 id=\"discriptive_statistics\">3. Descriptive Statistical Analysis</h2>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Let's first take a look at the variables by utilizing a description method.</p>\n", | |
"\n", | |
"<p>The <b>describe</b> function automatically computes basic statistics for all continuous variables. Any NaN values are automatically skipped in these statistics.</p>\n", | |
"\n", | |
"This will show:\n", | |
"<ul>\n", | |
" <li>the count of that variable</li>\n", | |
" <li>the mean</li>\n", | |
" <li>the standard deviation (std)</li> \n", | |
" <li>the minimum value</li>\n", | |
" <li>the IQR (Interquartile Range: 25%, 50% and 75%)</li>\n", | |
" <li>the maximum value</li>\n", | |
"<ul>\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" We can apply the method \"describe\" as follows:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 20, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>symboling</th>\n", | |
" <th>normalized-losses</th>\n", | |
" <th>wheel-base</th>\n", | |
" <th>length</th>\n", | |
" <th>width</th>\n", | |
" <th>height</th>\n", | |
" <th>curb-weight</th>\n", | |
" <th>engine-size</th>\n", | |
" <th>bore</th>\n", | |
" <th>stroke</th>\n", | |
" <th>compression-ratio</th>\n", | |
" <th>horsepower</th>\n", | |
" <th>peak-rpm</th>\n", | |
" <th>city-mpg</th>\n", | |
" <th>highway-mpg</th>\n", | |
" <th>price</th>\n", | |
" <th>city-L/100km</th>\n", | |
" <th>diesel</th>\n", | |
" <th>gas</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>count</th>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.00000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>197.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" <td>201.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>mean</th>\n", | |
" <td>0.840796</td>\n", | |
" <td>122.00000</td>\n", | |
" <td>98.797015</td>\n", | |
" <td>0.837102</td>\n", | |
" <td>0.915126</td>\n", | |
" <td>53.766667</td>\n", | |
" <td>2555.666667</td>\n", | |
" <td>126.875622</td>\n", | |
" <td>3.330692</td>\n", | |
" <td>3.256904</td>\n", | |
" <td>10.164279</td>\n", | |
" <td>103.405534</td>\n", | |
" <td>5117.665368</td>\n", | |
" <td>25.179104</td>\n", | |
" <td>30.686567</td>\n", | |
" <td>13207.129353</td>\n", | |
" <td>9.944145</td>\n", | |
" <td>0.099502</td>\n", | |
" <td>0.900498</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>std</th>\n", | |
" <td>1.254802</td>\n", | |
" <td>31.99625</td>\n", | |
" <td>6.066366</td>\n", | |
" <td>0.059213</td>\n", | |
" <td>0.029187</td>\n", | |
" <td>2.447822</td>\n", | |
" <td>517.296727</td>\n", | |
" <td>41.546834</td>\n", | |
" <td>0.268072</td>\n", | |
" <td>0.319256</td>\n", | |
" <td>4.004965</td>\n", | |
" <td>37.365700</td>\n", | |
" <td>478.113805</td>\n", | |
" <td>6.423220</td>\n", | |
" <td>6.815150</td>\n", | |
" <td>7947.066342</td>\n", | |
" <td>2.534599</td>\n", | |
" <td>0.300083</td>\n", | |
" <td>0.300083</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>min</th>\n", | |
" <td>-2.000000</td>\n", | |
" <td>65.00000</td>\n", | |
" <td>86.600000</td>\n", | |
" <td>0.678039</td>\n", | |
" <td>0.837500</td>\n", | |
" <td>47.800000</td>\n", | |
" <td>1488.000000</td>\n", | |
" <td>61.000000</td>\n", | |
" <td>2.540000</td>\n", | |
" <td>2.070000</td>\n", | |
" <td>7.000000</td>\n", | |
" <td>48.000000</td>\n", | |
" <td>4150.000000</td>\n", | |
" <td>13.000000</td>\n", | |
" <td>16.000000</td>\n", | |
" <td>5118.000000</td>\n", | |
" <td>4.795918</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>0.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25%</th>\n", | |
" <td>0.000000</td>\n", | |
" <td>101.00000</td>\n", | |
" <td>94.500000</td>\n", | |
" <td>0.801538</td>\n", | |
" <td>0.890278</td>\n", | |
" <td>52.000000</td>\n", | |
" <td>2169.000000</td>\n", | |
" <td>98.000000</td>\n", | |
" <td>3.150000</td>\n", | |
" <td>3.110000</td>\n", | |
" <td>8.600000</td>\n", | |
" <td>70.000000</td>\n", | |
" <td>4800.000000</td>\n", | |
" <td>19.000000</td>\n", | |
" <td>25.000000</td>\n", | |
" <td>7775.000000</td>\n", | |
" <td>7.833333</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>50%</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>122.00000</td>\n", | |
" <td>97.000000</td>\n", | |
" <td>0.832292</td>\n", | |
" <td>0.909722</td>\n", | |
" <td>54.100000</td>\n", | |
" <td>2414.000000</td>\n", | |
" <td>120.000000</td>\n", | |
" <td>3.310000</td>\n", | |
" <td>3.290000</td>\n", | |
" <td>9.000000</td>\n", | |
" <td>95.000000</td>\n", | |
" <td>5125.369458</td>\n", | |
" <td>24.000000</td>\n", | |
" <td>30.000000</td>\n", | |
" <td>10295.000000</td>\n", | |
" <td>9.791667</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>75%</th>\n", | |
" <td>2.000000</td>\n", | |
" <td>137.00000</td>\n", | |
" <td>102.400000</td>\n", | |
" <td>0.881788</td>\n", | |
" <td>0.925000</td>\n", | |
" <td>55.500000</td>\n", | |
" <td>2926.000000</td>\n", | |
" <td>141.000000</td>\n", | |
" <td>3.580000</td>\n", | |
" <td>3.410000</td>\n", | |
" <td>9.400000</td>\n", | |
" <td>116.000000</td>\n", | |
" <td>5500.000000</td>\n", | |
" <td>30.000000</td>\n", | |
" <td>34.000000</td>\n", | |
" <td>16500.000000</td>\n", | |
" <td>12.368421</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>max</th>\n", | |
" <td>3.000000</td>\n", | |
" <td>256.00000</td>\n", | |
" <td>120.900000</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>59.800000</td>\n", | |
" <td>4066.000000</td>\n", | |
" <td>326.000000</td>\n", | |
" <td>3.940000</td>\n", | |
" <td>4.170000</td>\n", | |
" <td>23.000000</td>\n", | |
" <td>262.000000</td>\n", | |
" <td>6600.000000</td>\n", | |
" <td>49.000000</td>\n", | |
" <td>54.000000</td>\n", | |
" <td>45400.000000</td>\n", | |
" <td>18.076923</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" symboling normalized-losses wheel-base length width \\\n", | |
"count 201.000000 201.00000 201.000000 201.000000 201.000000 \n", | |
"mean 0.840796 122.00000 98.797015 0.837102 0.915126 \n", | |
"std 1.254802 31.99625 6.066366 0.059213 0.029187 \n", | |
"min -2.000000 65.00000 86.600000 0.678039 0.837500 \n", | |
"25% 0.000000 101.00000 94.500000 0.801538 0.890278 \n", | |
"50% 1.000000 122.00000 97.000000 0.832292 0.909722 \n", | |
"75% 2.000000 137.00000 102.400000 0.881788 0.925000 \n", | |
"max 3.000000 256.00000 120.900000 1.000000 1.000000 \n", | |
"\n", | |
" height curb-weight engine-size bore stroke \\\n", | |
"count 201.000000 201.000000 201.000000 201.000000 197.000000 \n", | |
"mean 53.766667 2555.666667 126.875622 3.330692 3.256904 \n", | |
"std 2.447822 517.296727 41.546834 0.268072 0.319256 \n", | |
"min 47.800000 1488.000000 61.000000 2.540000 2.070000 \n", | |
"25% 52.000000 2169.000000 98.000000 3.150000 3.110000 \n", | |
"50% 54.100000 2414.000000 120.000000 3.310000 3.290000 \n", | |
"75% 55.500000 2926.000000 141.000000 3.580000 3.410000 \n", | |
"max 59.800000 4066.000000 326.000000 3.940000 4.170000 \n", | |
"\n", | |
" compression-ratio horsepower peak-rpm city-mpg highway-mpg \\\n", | |
"count 201.000000 201.000000 201.000000 201.000000 201.000000 \n", | |
"mean 10.164279 103.405534 5117.665368 25.179104 30.686567 \n", | |
"std 4.004965 37.365700 478.113805 6.423220 6.815150 \n", | |
"min 7.000000 48.000000 4150.000000 13.000000 16.000000 \n", | |
"25% 8.600000 70.000000 4800.000000 19.000000 25.000000 \n", | |
"50% 9.000000 95.000000 5125.369458 24.000000 30.000000 \n", | |
"75% 9.400000 116.000000 5500.000000 30.000000 34.000000 \n", | |
"max 23.000000 262.000000 6600.000000 49.000000 54.000000 \n", | |
"\n", | |
" price city-L/100km diesel gas \n", | |
"count 201.000000 201.000000 201.000000 201.000000 \n", | |
"mean 13207.129353 9.944145 0.099502 0.900498 \n", | |
"std 7947.066342 2.534599 0.300083 0.300083 \n", | |
"min 5118.000000 4.795918 0.000000 0.000000 \n", | |
"25% 7775.000000 7.833333 0.000000 1.000000 \n", | |
"50% 10295.000000 9.791667 0.000000 1.000000 \n", | |
"75% 16500.000000 12.368421 0.000000 1.000000 \n", | |
"max 45400.000000 18.076923 1.000000 1.000000 " | |
] | |
}, | |
"execution_count": 20, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.describe()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" The default setting of \"describe\" skips variables of type object. We can apply the method \"describe\" on the variables of type 'object' as follows:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>make</th>\n", | |
" <th>aspiration</th>\n", | |
" <th>num-of-doors</th>\n", | |
" <th>body-style</th>\n", | |
" <th>drive-wheels</th>\n", | |
" <th>engine-location</th>\n", | |
" <th>engine-type</th>\n", | |
" <th>num-of-cylinders</th>\n", | |
" <th>fuel-system</th>\n", | |
" <th>horsepower-binned</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>count</th>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>201</td>\n", | |
" <td>200</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>unique</th>\n", | |
" <td>22</td>\n", | |
" <td>2</td>\n", | |
" <td>2</td>\n", | |
" <td>5</td>\n", | |
" <td>3</td>\n", | |
" <td>2</td>\n", | |
" <td>6</td>\n", | |
" <td>7</td>\n", | |
" <td>8</td>\n", | |
" <td>3</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>top</th>\n", | |
" <td>toyota</td>\n", | |
" <td>std</td>\n", | |
" <td>four</td>\n", | |
" <td>sedan</td>\n", | |
" <td>fwd</td>\n", | |
" <td>front</td>\n", | |
" <td>ohc</td>\n", | |
" <td>four</td>\n", | |
" <td>mpfi</td>\n", | |
" <td>Low</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>freq</th>\n", | |
" <td>32</td>\n", | |
" <td>165</td>\n", | |
" <td>115</td>\n", | |
" <td>94</td>\n", | |
" <td>118</td>\n", | |
" <td>198</td>\n", | |
" <td>145</td>\n", | |
" <td>157</td>\n", | |
" <td>92</td>\n", | |
" <td>115</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" make aspiration num-of-doors body-style drive-wheels \\\n", | |
"count 201 201 201 201 201 \n", | |
"unique 22 2 2 5 3 \n", | |
"top toyota std four sedan fwd \n", | |
"freq 32 165 115 94 118 \n", | |
"\n", | |
" engine-location engine-type num-of-cylinders fuel-system \\\n", | |
"count 201 201 201 201 \n", | |
"unique 2 6 7 8 \n", | |
"top front ohc four mpfi \n", | |
"freq 198 145 157 92 \n", | |
"\n", | |
" horsepower-binned \n", | |
"count 200 \n", | |
"unique 3 \n", | |
"top Low \n", | |
"freq 115 " | |
] | |
}, | |
"execution_count": 21, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.describe(include=['object'])" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Value Counts</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Value-counts is a good way of understanding how many units of each characteristic/variable we have. We can apply the \"value_counts\" method on the column 'drive-wheels'. Don’t forget the method \"value_counts\" only works on Pandas series, not Pandas Dataframes. As a result, we only include one bracket \"df['drive-wheels']\" not two brackets \"df[['drive-wheels']]\".</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"fwd 118\n", | |
"rwd 75\n", | |
"4wd 8\n", | |
"Name: drive-wheels, dtype: int64" | |
] | |
}, | |
"execution_count": 22, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df['drive-wheels'].value_counts()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We can convert the series to a Dataframe as follows :" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>drive-wheels</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>fwd</th>\n", | |
" <td>118</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>rwd</th>\n", | |
" <td>75</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4wd</th>\n", | |
" <td>8</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" drive-wheels\n", | |
"fwd 118\n", | |
"rwd 75\n", | |
"4wd 8" | |
] | |
}, | |
"execution_count": 23, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df['drive-wheels'].value_counts().to_frame()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's repeat the above steps but save the results to the dataframe \"drive_wheels_counts\" and rename the column 'drive-wheels' to 'value_counts'." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>value_counts</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>fwd</th>\n", | |
" <td>118</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>rwd</th>\n", | |
" <td>75</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4wd</th>\n", | |
" <td>8</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" value_counts\n", | |
"fwd 118\n", | |
"rwd 75\n", | |
"4wd 8" | |
] | |
}, | |
"execution_count": 24, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"drive_wheels_counts = df['drive-wheels'].value_counts().to_frame()\n", | |
"drive_wheels_counts.rename(columns={'drive-wheels': 'value_counts'}, inplace=True)\n", | |
"drive_wheels_counts" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Now let's rename the index to 'drive-wheels':" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>value_counts</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>drive-wheels</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>fwd</th>\n", | |
" <td>118</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>rwd</th>\n", | |
" <td>75</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4wd</th>\n", | |
" <td>8</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" value_counts\n", | |
"drive-wheels \n", | |
"fwd 118\n", | |
"rwd 75\n", | |
"4wd 8" | |
] | |
}, | |
"execution_count": 25, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"drive_wheels_counts.index.name = 'drive-wheels'\n", | |
"drive_wheels_counts" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We can repeat the above process for the variable 'engine-location'." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>value_counts</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>engine-location</th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>front</th>\n", | |
" <td>198</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>rear</th>\n", | |
" <td>3</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" value_counts\n", | |
"engine-location \n", | |
"front 198\n", | |
"rear 3" | |
] | |
}, | |
"execution_count": 26, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# engine-location as variable\n", | |
"engine_loc_counts = df['engine-location'].value_counts().to_frame()\n", | |
"engine_loc_counts.rename(columns={'engine-location': 'value_counts'}, inplace=True)\n", | |
"engine_loc_counts.index.name = 'engine-location'\n", | |
"engine_loc_counts.head(10)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Examining the value counts of the engine location would not be a good predictor variable for the price. This is because we only have three cars with a rear engine and 198 with an engine in the front, this result is skewed. Thus, we are not able to draw any conclusions about the engine location.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2 id=\"basic_grouping\">4. Basics of Grouping</h2>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>The \"groupby\" method groups data by different categories. The data is grouped based on one or several variables and analysis is performed on the individual groups.</p>\n", | |
"\n", | |
"<p>For example, let's group by the variable \"drive-wheels\". We see that there are 3 different categories of drive wheels.</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 27, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"array(['rwd', 'fwd', '4wd'], dtype=object)" | |
] | |
}, | |
"execution_count": 27, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df['drive-wheels'].unique()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>If we want to know, on average, which type of drive wheel is most valuable, we can group \"drive-wheels\" and then average them.</p>\n", | |
"\n", | |
"<p>We can select the columns 'drive-wheels', 'body-style' and 'price', then assign it to the variable \"df_group_one\".</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"df_group_one = df[['drive-wheels','body-style','price']]" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"We can then calculate the average price for each of the different categories of data." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 29, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>drive-wheels</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>4wd</td>\n", | |
" <td>10241.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>fwd</td>\n", | |
" <td>9244.779661</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>rwd</td>\n", | |
" <td>19757.613333</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" drive-wheels price\n", | |
"0 4wd 10241.000000\n", | |
"1 fwd 9244.779661\n", | |
"2 rwd 19757.613333" | |
] | |
}, | |
"execution_count": 29, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# grouping results\n", | |
"df_group_one = df_group_one.groupby(['drive-wheels'],as_index=False).mean()\n", | |
"df_group_one" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>From our data, it seems rear-wheel drive vehicles are, on average, the most expensive, while 4-wheel and front-wheel are approximately the same in price.</p>\n", | |
"\n", | |
"<p>You can also group with multiple variables. For example, let's group by both 'drive-wheels' and 'body-style'. This groups the dataframe by the unique combinations 'drive-wheels' and 'body-style'. We can store the results in the variable 'grouped_test1'.</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>drive-wheels</th>\n", | |
" <th>body-style</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>4wd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>7603.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>4wd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>12647.333333</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>4wd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>9095.750000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>fwd</td>\n", | |
" <td>convertible</td>\n", | |
" <td>11595.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hardtop</td>\n", | |
" <td>8249.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>8396.387755</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>9811.800000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>fwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>9997.333333</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>rwd</td>\n", | |
" <td>convertible</td>\n", | |
" <td>23949.600000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>rwd</td>\n", | |
" <td>hardtop</td>\n", | |
" <td>24202.714286</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>rwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>14337.777778</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>21711.833333</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>rwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>16994.222222</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" drive-wheels body-style price\n", | |
"0 4wd hatchback 7603.000000\n", | |
"1 4wd sedan 12647.333333\n", | |
"2 4wd wagon 9095.750000\n", | |
"3 fwd convertible 11595.000000\n", | |
"4 fwd hardtop 8249.000000\n", | |
"5 fwd hatchback 8396.387755\n", | |
"6 fwd sedan 9811.800000\n", | |
"7 fwd wagon 9997.333333\n", | |
"8 rwd convertible 23949.600000\n", | |
"9 rwd hardtop 24202.714286\n", | |
"10 rwd hatchback 14337.777778\n", | |
"11 rwd sedan 21711.833333\n", | |
"12 rwd wagon 16994.222222" | |
] | |
}, | |
"execution_count": 30, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# grouping results\n", | |
"df_gptest = df[['drive-wheels','body-style','price']]\n", | |
"grouped_test1 = df_gptest.groupby(['drive-wheels','body-style'],as_index=False).mean()\n", | |
"grouped_test1" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>This grouped data is much easier to visualize when it is made into a pivot table. A pivot table is like an Excel spreadsheet, with one variable along the column and another along the row. We can convert the dataframe to a pivot table using the method \"pivot \" to create a pivot table from the groups.</p>\n", | |
"\n", | |
"<p>In this case, we will leave the drive-wheel variable as the rows of the table, and pivot body-style to become the columns of the table:</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 31, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead tr th {\n", | |
" text-align: left;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead tr:last-of-type th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th></th>\n", | |
" <th colspan=\"5\" halign=\"left\">price</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>body-style</th>\n", | |
" <th>convertible</th>\n", | |
" <th>hardtop</th>\n", | |
" <th>hatchback</th>\n", | |
" <th>sedan</th>\n", | |
" <th>wagon</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>drive-wheels</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>4wd</th>\n", | |
" <td>NaN</td>\n", | |
" <td>NaN</td>\n", | |
" <td>7603.000000</td>\n", | |
" <td>12647.333333</td>\n", | |
" <td>9095.750000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>fwd</th>\n", | |
" <td>11595.0</td>\n", | |
" <td>8249.000000</td>\n", | |
" <td>8396.387755</td>\n", | |
" <td>9811.800000</td>\n", | |
" <td>9997.333333</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>rwd</th>\n", | |
" <td>23949.6</td>\n", | |
" <td>24202.714286</td>\n", | |
" <td>14337.777778</td>\n", | |
" <td>21711.833333</td>\n", | |
" <td>16994.222222</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" price \\\n", | |
"body-style convertible hardtop hatchback sedan \n", | |
"drive-wheels \n", | |
"4wd NaN NaN 7603.000000 12647.333333 \n", | |
"fwd 11595.0 8249.000000 8396.387755 9811.800000 \n", | |
"rwd 23949.6 24202.714286 14337.777778 21711.833333 \n", | |
"\n", | |
" \n", | |
"body-style wagon \n", | |
"drive-wheels \n", | |
"4wd 9095.750000 \n", | |
"fwd 9997.333333 \n", | |
"rwd 16994.222222 " | |
] | |
}, | |
"execution_count": 31, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"grouped_pivot = grouped_test1.pivot(index='drive-wheels',columns='body-style')\n", | |
"grouped_pivot" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Often, we won't have data for some of the pivot cells. We can fill these missing cells with the value 0, but any other value could potentially be used as well. It should be mentioned that missing data is quite a complex subject and is an entire course on its own.</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead tr th {\n", | |
" text-align: left;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead tr:last-of-type th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr>\n", | |
" <th></th>\n", | |
" <th colspan=\"5\" halign=\"left\">price</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>body-style</th>\n", | |
" <th>convertible</th>\n", | |
" <th>hardtop</th>\n", | |
" <th>hatchback</th>\n", | |
" <th>sedan</th>\n", | |
" <th>wagon</th>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>drive-wheels</th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" <th></th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>4wd</th>\n", | |
" <td>0.0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>7603.000000</td>\n", | |
" <td>12647.333333</td>\n", | |
" <td>9095.750000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>fwd</th>\n", | |
" <td>11595.0</td>\n", | |
" <td>8249.000000</td>\n", | |
" <td>8396.387755</td>\n", | |
" <td>9811.800000</td>\n", | |
" <td>9997.333333</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>rwd</th>\n", | |
" <td>23949.6</td>\n", | |
" <td>24202.714286</td>\n", | |
" <td>14337.777778</td>\n", | |
" <td>21711.833333</td>\n", | |
" <td>16994.222222</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" price \\\n", | |
"body-style convertible hardtop hatchback sedan \n", | |
"drive-wheels \n", | |
"4wd 0.0 0.000000 7603.000000 12647.333333 \n", | |
"fwd 11595.0 8249.000000 8396.387755 9811.800000 \n", | |
"rwd 23949.6 24202.714286 14337.777778 21711.833333 \n", | |
"\n", | |
" \n", | |
"body-style wagon \n", | |
"drive-wheels \n", | |
"4wd 9095.750000 \n", | |
"fwd 9997.333333 \n", | |
"rwd 16994.222222 " | |
] | |
}, | |
"execution_count": 32, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"grouped_pivot = grouped_pivot.fillna(0) #fill missing values with 0\n", | |
"grouped_pivot" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<div class=\"alert alert-danger alertdanger\" style=\"margin-top: 20px\">\n", | |
"<h1>Question 4:</h1>\n", | |
"\n", | |
"<p>Use the \"groupby\" function to find the average \"price\" of each car based on \"body-style\" ? </p>\n", | |
"</div>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 58, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>body-style</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>convertible</td>\n", | |
" <td>21890.500000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>hardtop</td>\n", | |
" <td>22208.500000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>hatchback</td>\n", | |
" <td>9957.441176</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>sedan</td>\n", | |
" <td>14459.755319</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>wagon</td>\n", | |
" <td>12371.960000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" body-style price\n", | |
"0 convertible 21890.500000\n", | |
"1 hardtop 22208.500000\n", | |
"2 hatchback 9957.441176\n", | |
"3 sedan 14459.755319\n", | |
"4 wagon 12371.960000" | |
] | |
}, | |
"execution_count": 58, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"# Write your code below and press Shift+Enter to execute \n", | |
"df_group_two = df[['body-style', 'price']]\n", | |
"group_test_bodystyle = df_group_two.groupby(['body-style'], as_index=False).mean()\n", | |
"group_test_bodystyle" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Double-click <b>here</b> for the solution.\n", | |
"\n", | |
"<!-- The answer is below:\n", | |
"\n", | |
"# grouping results\n", | |
"df_gptest2 = df[['body-style','price']]\n", | |
"grouped_test_bodystyle = df_gptest2.groupby(['body-style'],as_index= False).mean()\n", | |
"grouped_test_bodystyle\n", | |
"\n", | |
"-->" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"If you did not import \"pyplot\" let's do it again. " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"import matplotlib.pyplot as plt\n", | |
"%matplotlib inline " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h4>Variables: Drive Wheels and Body Style vs Price</h4>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's use a heat map to visualize the relationship between Body Style vs Price." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 35, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXMAAAD8CAYAAACFK0QrAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAFt5JREFUeJzt3X2sXdV95vHvc68NpOQFggm1sFuiiZWWRBMglqFiNGJCSwwTYUYlEkgT3AySqwhUUKvMQP8IE5hWiUaTdBgyJG5wMZ1MCCJvntQp9RAiGim8GGpendRWJgkuFh4w4UUJcez7zB9n3czJ5dx79r13X5+z934+0tY5Z5119vkdEL+7+O211pZtIiKi2SZGHUBERCxeknlERAskmUdEtECSeURECySZR0S0QJJ5REQLDE3mko6T9JCkxyQ9JenjA/ocK+lLkvZKelDSaUsRbEREDFZlZP5z4H223wOcAayXdM6MPlcCL9p+B/Bp4JP1hhkREXMZmszd82p5ubwcM1cabQC2lud3A+dLUm1RRkTEnJZV6SRpEngEeAfwGdsPzuhyKvAMgO3Dkl4CTgKen3GeTcAmACaWvVfHnbCo4MdOS1fT/vaa1aMOoXZ7n3151CEsiVNO+rVRh7Aknvn+k8/bPnkx55h48ypz+LVKff2zF+6xvX4x33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GhDKAjIpqv0qKhiIgYb0nmEREtMJJkPo5LYRdL0hZJByS1Zu68pNWS7pO0W9JTkq4ZdUx1kHScpIckPVZ+18dHHVNdJE1K+gdJ3xh1LHWR9ENJT0jaVccUxbY66jXzshT2H4HfozfF52HgcttPH9VAaibpXwKvAnfYfveo46mDpJXAStuPSnoT8AhwSQv+XQk43varkpYD3wGusf3AiENbNEl/DKwF3mz7A6OOpw6Sfgistd3GxVC1GcXIfCyXwi6W7ftp2dx62/ttP1qevwLsprf6rdHc82p5ubwcjZ8JIGkV8K+Bz486ljj6RpHMBy2FbXyCaLuyE+aZwIOjjaQepRyxCzgA7LDdht/1F8C/p3031DHwd5IeKVuCxACjSOZjuRQ2ZifpjcCXgWttvzzqeOpg+4jtM+it3lsnqdGlMUkfAA7YfmTUsSyBc22fRW+XwqtKSTNmGEUyH8ulsDFYqSl/GfiC7a+MOp662f4J8G2grn07RuVc4OJSX74TeJ+k/zHakOph+9nyeAD4Kr1SbcwwimQ+lkth4/XKhcLbgN22PzXqeOoi6WRJJ5TnbwB+F/jeaKNaHNvX215l+zR6/019y/a/HXFYiybp+HLxHUnHAxcArZkxVqejnsxtHwaml8LuBu4ah6WwiyXpi8B3gXdK2ifpylHHVINzgQ/RG+XtKsdFow6qBiuB+yQ9Tm9wscN2a6bytcwpwHckPQY8BPyN7b8dcUxjKcv5IyJaICtAIyJaIMk8IqIFkswjIlogyTwiogWSzCMiWiDJPCKiBZLMIyJa4P8BhKqO/dvZlsQAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 2 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"#use the grouped results\n", | |
"plt.pcolor(grouped_pivot, cmap='RdBu')\n", | |
"plt.colorbar()\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>The heatmap plots the target variable (price) proportional to colour with respect to the variables 'drive-wheel' and 'body-style' in the vertical and horizontal axis respectively. This allows us to visualize how the price is related to 'drive-wheel' and 'body-style'.</p>\n", | |
"\n", | |
"<p>The default labels convey no useful information to us. Let's change that:</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXgAAAEqCAYAAAAf20taAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAHmFJREFUeJzt3XmYZGV99vHv3cMaAVlFBBTknYiICzsq+uKGA1FwQYKXCiqKGhQxbmg0GI1JzBV9FRMXjCjggmhcRgUnI4qAsg2CLKIyjgITiAiDiALCzNzvH+dpKYaeqe6u6jldz7k/13Wurnrq1KlfzXT/6qlnlW0iIqI+Y20HEBERMyMJPiKiUknwERGVSoKPiKhUEnxERKWS4CMiKpUEHxFRqST4iIhKJcFHRFRqnbYD6KV1NrDW37jtMIar0pnCj567fdshDN3iG3/fdggzYust/qLtEGbEDT+/6hbbWw1yjbFNtjPL7+57nu+6dYHteYO8VhtmV4Jff2PW2+WFbYcxVCuX39N2CDPijDM/3HYIQ3fwPyxsO4QZcezLdms7hBlx3H47XTfwRZbfzTqPOrjvafde/pktB36tFsyqBB8RsVZJaGxO21HMmCT4iOgwMbbOem0HMWOS4COiu1KDj4iokwDNSYKPiKiPxFhq8BERdUoTTUREjdIGHxFRJyHG1lm37TBmTBJ8RHRXavAREfVKgo+IqJGUYZIRETUSqcFHRNRJY8zJUgURERVSavAREVUSGUUTEVGtJPiIiBplHHxERK2S4CMiqiSJsXUziiYioj5poomIqFcSfEREpcbG1HYIMyYJPiI6SxJKgo+IqNOcOWNthzBjkuAjortEavARETVqVpNMgo+Iq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n", | |
"text/plain": [ | |
"<Figure size 432x288 with 2 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"fig, ax = plt.subplots()\n", | |
"im = ax.pcolor(grouped_pivot, cmap='RdBu')\n", | |
"\n", | |
"#label names\n", | |
"row_labels = grouped_pivot.columns.levels[1]\n", | |
"col_labels = grouped_pivot.index\n", | |
"\n", | |
"#move ticks and labels to the center\n", | |
"ax.set_xticks(np.arange(grouped_pivot.shape[1]) + 0.5, minor=False)\n", | |
"ax.set_yticks(np.arange(grouped_pivot.shape[0]) + 0.5, minor=False)\n", | |
"\n", | |
"#insert labels\n", | |
"ax.set_xticklabels(row_labels, minor=False)\n", | |
"ax.set_yticklabels(col_labels, minor=False)\n", | |
"\n", | |
"#rotate label if too long\n", | |
"plt.xticks(rotation=90)\n", | |
"\n", | |
"fig.colorbar(im)\n", | |
"plt.show()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Visualization is very important in data science, and Python visualization packages provide great freedom. We will go more in-depth in a separate Python Visualizations course.</p>\n", | |
"\n", | |
"<p>The main question we want to answer in this module, is \"What are the main characteristics which have the most impact on the car price?\".</p>\n", | |
"\n", | |
"<p>To get a better measure of the important characteristics, we look at the correlation of these variables with the car price, in other words: how is the car price dependent on this variable?</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2 id=\"correlation_causation\">5. Correlation and Causation</h2>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p><b>Correlation</b>: a measure of the extent of interdependence between variables.</p>\n", | |
"\n", | |
"<p><b>Causation</b>: the relationship between cause and effect between two variables.</p>\n", | |
"\n", | |
"<p>It is important to know the difference between these two and that correlation does not imply causation. Determining correlation is much simpler the determining causation as causation may require independent experimentation.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p3>Pearson Correlation</p>\n", | |
"<p>The Pearson Correlation measures the linear dependence between two variables X and Y.</p>\n", | |
"<p>The resulting coefficient is a value between -1 and 1 inclusive, where:</p>\n", | |
"<ul>\n", | |
" <li><b>1</b>: Total positive linear correlation.</li>\n", | |
" <li><b>0</b>: No linear correlation, the two variables most likely do not affect each other.</li>\n", | |
" <li><b>-1</b>: Total negative linear correlation.</li>\n", | |
"</ul>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Pearson Correlation is the default method of the function \"corr\". Like before we can calculate the Pearson Correlation of the of the 'int64' or 'float64' variables.</p>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 37, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>symboling</th>\n", | |
" <th>normalized-losses</th>\n", | |
" <th>wheel-base</th>\n", | |
" <th>length</th>\n", | |
" <th>width</th>\n", | |
" <th>height</th>\n", | |
" <th>curb-weight</th>\n", | |
" <th>engine-size</th>\n", | |
" <th>bore</th>\n", | |
" <th>stroke</th>\n", | |
" <th>compression-ratio</th>\n", | |
" <th>horsepower</th>\n", | |
" <th>peak-rpm</th>\n", | |
" <th>city-mpg</th>\n", | |
" <th>highway-mpg</th>\n", | |
" <th>price</th>\n", | |
" <th>city-L/100km</th>\n", | |
" <th>diesel</th>\n", | |
" <th>gas</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>symboling</th>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.466264</td>\n", | |
" <td>-0.535987</td>\n", | |
" <td>-0.365404</td>\n", | |
" <td>-0.242423</td>\n", | |
" <td>-0.550160</td>\n", | |
" <td>-0.233118</td>\n", | |
" <td>-0.110581</td>\n", | |
" <td>-0.140019</td>\n", | |
" <td>-0.008245</td>\n", | |
" <td>-0.182196</td>\n", | |
" <td>0.075819</td>\n", | |
" <td>0.279740</td>\n", | |
" <td>-0.035527</td>\n", | |
" <td>0.036233</td>\n", | |
" <td>-0.082391</td>\n", | |
" <td>0.066171</td>\n", | |
" <td>-0.196735</td>\n", | |
" <td>0.196735</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>normalized-losses</th>\n", | |
" <td>0.466264</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.056661</td>\n", | |
" <td>0.019424</td>\n", | |
" <td>0.086802</td>\n", | |
" <td>-0.373737</td>\n", | |
" <td>0.099404</td>\n", | |
" <td>0.112360</td>\n", | |
" <td>-0.029862</td>\n", | |
" <td>0.055563</td>\n", | |
" <td>-0.114713</td>\n", | |
" <td>0.217299</td>\n", | |
" <td>0.239543</td>\n", | |
" <td>-0.225016</td>\n", | |
" <td>-0.181877</td>\n", | |
" <td>0.133999</td>\n", | |
" <td>0.238567</td>\n", | |
" <td>-0.101546</td>\n", | |
" <td>0.101546</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>wheel-base</th>\n", | |
" <td>-0.535987</td>\n", | |
" <td>-0.056661</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.876024</td>\n", | |
" <td>0.814507</td>\n", | |
" <td>0.590742</td>\n", | |
" <td>0.782097</td>\n", | |
" <td>0.572027</td>\n", | |
" <td>0.493244</td>\n", | |
" <td>0.158502</td>\n", | |
" <td>0.250313</td>\n", | |
" <td>0.371147</td>\n", | |
" <td>-0.360305</td>\n", | |
" <td>-0.470606</td>\n", | |
" <td>-0.543304</td>\n", | |
" <td>0.584642</td>\n", | |
" <td>0.476153</td>\n", | |
" <td>0.307237</td>\n", | |
" <td>-0.307237</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>length</th>\n", | |
" <td>-0.365404</td>\n", | |
" <td>0.019424</td>\n", | |
" <td>0.876024</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.857170</td>\n", | |
" <td>0.492063</td>\n", | |
" <td>0.880665</td>\n", | |
" <td>0.685025</td>\n", | |
" <td>0.608971</td>\n", | |
" <td>0.124139</td>\n", | |
" <td>0.159733</td>\n", | |
" <td>0.579821</td>\n", | |
" <td>-0.285970</td>\n", | |
" <td>-0.665192</td>\n", | |
" <td>-0.698142</td>\n", | |
" <td>0.690628</td>\n", | |
" <td>0.657373</td>\n", | |
" <td>0.211187</td>\n", | |
" <td>-0.211187</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>width</th>\n", | |
" <td>-0.242423</td>\n", | |
" <td>0.086802</td>\n", | |
" <td>0.814507</td>\n", | |
" <td>0.857170</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.306002</td>\n", | |
" <td>0.866201</td>\n", | |
" <td>0.729436</td>\n", | |
" <td>0.544885</td>\n", | |
" <td>0.188829</td>\n", | |
" <td>0.189867</td>\n", | |
" <td>0.615077</td>\n", | |
" <td>-0.245800</td>\n", | |
" <td>-0.633531</td>\n", | |
" <td>-0.680635</td>\n", | |
" <td>0.751265</td>\n", | |
" <td>0.673363</td>\n", | |
" <td>0.244356</td>\n", | |
" <td>-0.244356</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>height</th>\n", | |
" <td>-0.550160</td>\n", | |
" <td>-0.373737</td>\n", | |
" <td>0.590742</td>\n", | |
" <td>0.492063</td>\n", | |
" <td>0.306002</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.307581</td>\n", | |
" <td>0.074694</td>\n", | |
" <td>0.180449</td>\n", | |
" <td>-0.062704</td>\n", | |
" <td>0.259737</td>\n", | |
" <td>-0.087027</td>\n", | |
" <td>-0.309974</td>\n", | |
" <td>-0.049800</td>\n", | |
" <td>-0.104812</td>\n", | |
" <td>0.135486</td>\n", | |
" <td>0.003811</td>\n", | |
" <td>0.281578</td>\n", | |
" <td>-0.281578</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>curb-weight</th>\n", | |
" <td>-0.233118</td>\n", | |
" <td>0.099404</td>\n", | |
" <td>0.782097</td>\n", | |
" <td>0.880665</td>\n", | |
" <td>0.866201</td>\n", | |
" <td>0.307581</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.849072</td>\n", | |
" <td>0.644060</td>\n", | |
" <td>0.167562</td>\n", | |
" <td>0.156433</td>\n", | |
" <td>0.757976</td>\n", | |
" <td>-0.279361</td>\n", | |
" <td>-0.749543</td>\n", | |
" <td>-0.794889</td>\n", | |
" <td>0.834415</td>\n", | |
" <td>0.785353</td>\n", | |
" <td>0.221046</td>\n", | |
" <td>-0.221046</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>engine-size</th>\n", | |
" <td>-0.110581</td>\n", | |
" <td>0.112360</td>\n", | |
" <td>0.572027</td>\n", | |
" <td>0.685025</td>\n", | |
" <td>0.729436</td>\n", | |
" <td>0.074694</td>\n", | |
" <td>0.849072</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.572609</td>\n", | |
" <td>0.209523</td>\n", | |
" <td>0.028889</td>\n", | |
" <td>0.822676</td>\n", | |
" <td>-0.256733</td>\n", | |
" <td>-0.650546</td>\n", | |
" <td>-0.679571</td>\n", | |
" <td>0.872335</td>\n", | |
" <td>0.745059</td>\n", | |
" <td>0.070779</td>\n", | |
" <td>-0.070779</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>bore</th>\n", | |
" <td>-0.140019</td>\n", | |
" <td>-0.029862</td>\n", | |
" <td>0.493244</td>\n", | |
" <td>0.608971</td>\n", | |
" <td>0.544885</td>\n", | |
" <td>0.180449</td>\n", | |
" <td>0.644060</td>\n", | |
" <td>0.572609</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.055390</td>\n", | |
" <td>0.001263</td>\n", | |
" <td>0.566936</td>\n", | |
" <td>-0.267392</td>\n", | |
" <td>-0.582027</td>\n", | |
" <td>-0.591309</td>\n", | |
" <td>0.543155</td>\n", | |
" <td>0.554610</td>\n", | |
" <td>0.054458</td>\n", | |
" <td>-0.054458</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>stroke</th>\n", | |
" <td>-0.008245</td>\n", | |
" <td>0.055563</td>\n", | |
" <td>0.158502</td>\n", | |
" <td>0.124139</td>\n", | |
" <td>0.188829</td>\n", | |
" <td>-0.062704</td>\n", | |
" <td>0.167562</td>\n", | |
" <td>0.209523</td>\n", | |
" <td>-0.055390</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.187923</td>\n", | |
" <td>0.098462</td>\n", | |
" <td>-0.065713</td>\n", | |
" <td>-0.034696</td>\n", | |
" <td>-0.035201</td>\n", | |
" <td>0.082310</td>\n", | |
" <td>0.037300</td>\n", | |
" <td>0.241303</td>\n", | |
" <td>-0.241303</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>compression-ratio</th>\n", | |
" <td>-0.182196</td>\n", | |
" <td>-0.114713</td>\n", | |
" <td>0.250313</td>\n", | |
" <td>0.159733</td>\n", | |
" <td>0.189867</td>\n", | |
" <td>0.259737</td>\n", | |
" <td>0.156433</td>\n", | |
" <td>0.028889</td>\n", | |
" <td>0.001263</td>\n", | |
" <td>0.187923</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.214514</td>\n", | |
" <td>-0.435780</td>\n", | |
" <td>0.331425</td>\n", | |
" <td>0.268465</td>\n", | |
" <td>0.071107</td>\n", | |
" <td>-0.299372</td>\n", | |
" <td>0.985231</td>\n", | |
" <td>-0.985231</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>horsepower</th>\n", | |
" <td>0.075819</td>\n", | |
" <td>0.217299</td>\n", | |
" <td>0.371147</td>\n", | |
" <td>0.579821</td>\n", | |
" <td>0.615077</td>\n", | |
" <td>-0.087027</td>\n", | |
" <td>0.757976</td>\n", | |
" <td>0.822676</td>\n", | |
" <td>0.566936</td>\n", | |
" <td>0.098462</td>\n", | |
" <td>-0.214514</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.107885</td>\n", | |
" <td>-0.822214</td>\n", | |
" <td>-0.804575</td>\n", | |
" <td>0.809575</td>\n", | |
" <td>0.889488</td>\n", | |
" <td>-0.169053</td>\n", | |
" <td>0.169053</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>peak-rpm</th>\n", | |
" <td>0.279740</td>\n", | |
" <td>0.239543</td>\n", | |
" <td>-0.360305</td>\n", | |
" <td>-0.285970</td>\n", | |
" <td>-0.245800</td>\n", | |
" <td>-0.309974</td>\n", | |
" <td>-0.279361</td>\n", | |
" <td>-0.256733</td>\n", | |
" <td>-0.267392</td>\n", | |
" <td>-0.065713</td>\n", | |
" <td>-0.435780</td>\n", | |
" <td>0.107885</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.115413</td>\n", | |
" <td>-0.058598</td>\n", | |
" <td>-0.101616</td>\n", | |
" <td>0.115830</td>\n", | |
" <td>-0.475812</td>\n", | |
" <td>0.475812</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>city-mpg</th>\n", | |
" <td>-0.035527</td>\n", | |
" <td>-0.225016</td>\n", | |
" <td>-0.470606</td>\n", | |
" <td>-0.665192</td>\n", | |
" <td>-0.633531</td>\n", | |
" <td>-0.049800</td>\n", | |
" <td>-0.749543</td>\n", | |
" <td>-0.650546</td>\n", | |
" <td>-0.582027</td>\n", | |
" <td>-0.034696</td>\n", | |
" <td>0.331425</td>\n", | |
" <td>-0.822214</td>\n", | |
" <td>-0.115413</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.972044</td>\n", | |
" <td>-0.686571</td>\n", | |
" <td>-0.949713</td>\n", | |
" <td>0.265676</td>\n", | |
" <td>-0.265676</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>highway-mpg</th>\n", | |
" <td>0.036233</td>\n", | |
" <td>-0.181877</td>\n", | |
" <td>-0.543304</td>\n", | |
" <td>-0.698142</td>\n", | |
" <td>-0.680635</td>\n", | |
" <td>-0.104812</td>\n", | |
" <td>-0.794889</td>\n", | |
" <td>-0.679571</td>\n", | |
" <td>-0.591309</td>\n", | |
" <td>-0.035201</td>\n", | |
" <td>0.268465</td>\n", | |
" <td>-0.804575</td>\n", | |
" <td>-0.058598</td>\n", | |
" <td>0.972044</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.704692</td>\n", | |
" <td>-0.930028</td>\n", | |
" <td>0.198690</td>\n", | |
" <td>-0.198690</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>price</th>\n", | |
" <td>-0.082391</td>\n", | |
" <td>0.133999</td>\n", | |
" <td>0.584642</td>\n", | |
" <td>0.690628</td>\n", | |
" <td>0.751265</td>\n", | |
" <td>0.135486</td>\n", | |
" <td>0.834415</td>\n", | |
" <td>0.872335</td>\n", | |
" <td>0.543155</td>\n", | |
" <td>0.082310</td>\n", | |
" <td>0.071107</td>\n", | |
" <td>0.809575</td>\n", | |
" <td>-0.101616</td>\n", | |
" <td>-0.686571</td>\n", | |
" <td>-0.704692</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>0.789898</td>\n", | |
" <td>0.110326</td>\n", | |
" <td>-0.110326</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>city-L/100km</th>\n", | |
" <td>0.066171</td>\n", | |
" <td>0.238567</td>\n", | |
" <td>0.476153</td>\n", | |
" <td>0.657373</td>\n", | |
" <td>0.673363</td>\n", | |
" <td>0.003811</td>\n", | |
" <td>0.785353</td>\n", | |
" <td>0.745059</td>\n", | |
" <td>0.554610</td>\n", | |
" <td>0.037300</td>\n", | |
" <td>-0.299372</td>\n", | |
" <td>0.889488</td>\n", | |
" <td>0.115830</td>\n", | |
" <td>-0.949713</td>\n", | |
" <td>-0.930028</td>\n", | |
" <td>0.789898</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-0.241282</td>\n", | |
" <td>0.241282</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>diesel</th>\n", | |
" <td>-0.196735</td>\n", | |
" <td>-0.101546</td>\n", | |
" <td>0.307237</td>\n", | |
" <td>0.211187</td>\n", | |
" <td>0.244356</td>\n", | |
" <td>0.281578</td>\n", | |
" <td>0.221046</td>\n", | |
" <td>0.070779</td>\n", | |
" <td>0.054458</td>\n", | |
" <td>0.241303</td>\n", | |
" <td>0.985231</td>\n", | |
" <td>-0.169053</td>\n", | |
" <td>-0.475812</td>\n", | |
" <td>0.265676</td>\n", | |
" <td>0.198690</td>\n", | |
" <td>0.110326</td>\n", | |
" <td>-0.241282</td>\n", | |
" <td>1.000000</td>\n", | |
" <td>-1.000000</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>gas</th>\n", | |
" <td>0.196735</td>\n", | |
" <td>0.101546</td>\n", | |
" <td>-0.307237</td>\n", | |
" <td>-0.211187</td>\n", | |
" <td>-0.244356</td>\n", | |
" <td>-0.281578</td>\n", | |
" <td>-0.221046</td>\n", | |
" <td>-0.070779</td>\n", | |
" <td>-0.054458</td>\n", | |
" <td>-0.241303</td>\n", | |
" <td>-0.985231</td>\n", | |
" <td>0.169053</td>\n", | |
" <td>0.475812</td>\n", | |
" <td>-0.265676</td>\n", | |
" <td>-0.198690</td>\n", | |
" <td>-0.110326</td>\n", | |
" <td>0.241282</td>\n", | |
" <td>-1.000000</td>\n", | |
" <td>1.000000</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" symboling normalized-losses wheel-base length \\\n", | |
"symboling 1.000000 0.466264 -0.535987 -0.365404 \n", | |
"normalized-losses 0.466264 1.000000 -0.056661 0.019424 \n", | |
"wheel-base -0.535987 -0.056661 1.000000 0.876024 \n", | |
"length -0.365404 0.019424 0.876024 1.000000 \n", | |
"width -0.242423 0.086802 0.814507 0.857170 \n", | |
"height -0.550160 -0.373737 0.590742 0.492063 \n", | |
"curb-weight -0.233118 0.099404 0.782097 0.880665 \n", | |
"engine-size -0.110581 0.112360 0.572027 0.685025 \n", | |
"bore -0.140019 -0.029862 0.493244 0.608971 \n", | |
"stroke -0.008245 0.055563 0.158502 0.124139 \n", | |
"compression-ratio -0.182196 -0.114713 0.250313 0.159733 \n", | |
"horsepower 0.075819 0.217299 0.371147 0.579821 \n", | |
"peak-rpm 0.279740 0.239543 -0.360305 -0.285970 \n", | |
"city-mpg -0.035527 -0.225016 -0.470606 -0.665192 \n", | |
"highway-mpg 0.036233 -0.181877 -0.543304 -0.698142 \n", | |
"price -0.082391 0.133999 0.584642 0.690628 \n", | |
"city-L/100km 0.066171 0.238567 0.476153 0.657373 \n", | |
"diesel -0.196735 -0.101546 0.307237 0.211187 \n", | |
"gas 0.196735 0.101546 -0.307237 -0.211187 \n", | |
"\n", | |
" width height curb-weight engine-size bore \\\n", | |
"symboling -0.242423 -0.550160 -0.233118 -0.110581 -0.140019 \n", | |
"normalized-losses 0.086802 -0.373737 0.099404 0.112360 -0.029862 \n", | |
"wheel-base 0.814507 0.590742 0.782097 0.572027 0.493244 \n", | |
"length 0.857170 0.492063 0.880665 0.685025 0.608971 \n", | |
"width 1.000000 0.306002 0.866201 0.729436 0.544885 \n", | |
"height 0.306002 1.000000 0.307581 0.074694 0.180449 \n", | |
"curb-weight 0.866201 0.307581 1.000000 0.849072 0.644060 \n", | |
"engine-size 0.729436 0.074694 0.849072 1.000000 0.572609 \n", | |
"bore 0.544885 0.180449 0.644060 0.572609 1.000000 \n", | |
"stroke 0.188829 -0.062704 0.167562 0.209523 -0.055390 \n", | |
"compression-ratio 0.189867 0.259737 0.156433 0.028889 0.001263 \n", | |
"horsepower 0.615077 -0.087027 0.757976 0.822676 0.566936 \n", | |
"peak-rpm -0.245800 -0.309974 -0.279361 -0.256733 -0.267392 \n", | |
"city-mpg -0.633531 -0.049800 -0.749543 -0.650546 -0.582027 \n", | |
"highway-mpg -0.680635 -0.104812 -0.794889 -0.679571 -0.591309 \n", | |
"price 0.751265 0.135486 0.834415 0.872335 0.543155 \n", | |
"city-L/100km 0.673363 0.003811 0.785353 0.745059 0.554610 \n", | |
"diesel 0.244356 0.281578 0.221046 0.070779 0.054458 \n", | |
"gas -0.244356 -0.281578 -0.221046 -0.070779 -0.054458 \n", | |
"\n", | |
" stroke compression-ratio horsepower peak-rpm \\\n", | |
"symboling -0.008245 -0.182196 0.075819 0.279740 \n", | |
"normalized-losses 0.055563 -0.114713 0.217299 0.239543 \n", | |
"wheel-base 0.158502 0.250313 0.371147 -0.360305 \n", | |
"length 0.124139 0.159733 0.579821 -0.285970 \n", | |
"width 0.188829 0.189867 0.615077 -0.245800 \n", | |
"height -0.062704 0.259737 -0.087027 -0.309974 \n", | |
"curb-weight 0.167562 0.156433 0.757976 -0.279361 \n", | |
"engine-size 0.209523 0.028889 0.822676 -0.256733 \n", | |
"bore -0.055390 0.001263 0.566936 -0.267392 \n", | |
"stroke 1.000000 0.187923 0.098462 -0.065713 \n", | |
"compression-ratio 0.187923 1.000000 -0.214514 -0.435780 \n", | |
"horsepower 0.098462 -0.214514 1.000000 0.107885 \n", | |
"peak-rpm -0.065713 -0.435780 0.107885 1.000000 \n", | |
"city-mpg -0.034696 0.331425 -0.822214 -0.115413 \n", | |
"highway-mpg -0.035201 0.268465 -0.804575 -0.058598 \n", | |
"price 0.082310 0.071107 0.809575 -0.101616 \n", | |
"city-L/100km 0.037300 -0.299372 0.889488 0.115830 \n", | |
"diesel 0.241303 0.985231 -0.169053 -0.475812 \n", | |
"gas -0.241303 -0.985231 0.169053 0.475812 \n", | |
"\n", | |
" city-mpg highway-mpg price city-L/100km diesel \\\n", | |
"symboling -0.035527 0.036233 -0.082391 0.066171 -0.196735 \n", | |
"normalized-losses -0.225016 -0.181877 0.133999 0.238567 -0.101546 \n", | |
"wheel-base -0.470606 -0.543304 0.584642 0.476153 0.307237 \n", | |
"length -0.665192 -0.698142 0.690628 0.657373 0.211187 \n", | |
"width -0.633531 -0.680635 0.751265 0.673363 0.244356 \n", | |
"height -0.049800 -0.104812 0.135486 0.003811 0.281578 \n", | |
"curb-weight -0.749543 -0.794889 0.834415 0.785353 0.221046 \n", | |
"engine-size -0.650546 -0.679571 0.872335 0.745059 0.070779 \n", | |
"bore -0.582027 -0.591309 0.543155 0.554610 0.054458 \n", | |
"stroke -0.034696 -0.035201 0.082310 0.037300 0.241303 \n", | |
"compression-ratio 0.331425 0.268465 0.071107 -0.299372 0.985231 \n", | |
"horsepower -0.822214 -0.804575 0.809575 0.889488 -0.169053 \n", | |
"peak-rpm -0.115413 -0.058598 -0.101616 0.115830 -0.475812 \n", | |
"city-mpg 1.000000 0.972044 -0.686571 -0.949713 0.265676 \n", | |
"highway-mpg 0.972044 1.000000 -0.704692 -0.930028 0.198690 \n", | |
"price -0.686571 -0.704692 1.000000 0.789898 0.110326 \n", | |
"city-L/100km -0.949713 -0.930028 0.789898 1.000000 -0.241282 \n", | |
"diesel 0.265676 0.198690 0.110326 -0.241282 1.000000 \n", | |
"gas -0.265676 -0.198690 -0.110326 0.241282 -1.000000 \n", | |
"\n", | |
" gas \n", | |
"symboling 0.196735 \n", | |
"normalized-losses 0.101546 \n", | |
"wheel-base -0.307237 \n", | |
"length -0.211187 \n", | |
"width -0.244356 \n", | |
"height -0.281578 \n", | |
"curb-weight -0.221046 \n", | |
"engine-size -0.070779 \n", | |
"bore -0.054458 \n", | |
"stroke -0.241303 \n", | |
"compression-ratio -0.985231 \n", | |
"horsepower 0.169053 \n", | |
"peak-rpm 0.475812 \n", | |
"city-mpg -0.265676 \n", | |
"highway-mpg -0.198690 \n", | |
"price -0.110326 \n", | |
"city-L/100km 0.241282 \n", | |
"diesel -1.000000 \n", | |
"gas 1.000000 " | |
] | |
}, | |
"execution_count": 37, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df.corr()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" sometimes we would like to know the significant of the correlation estimate. " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<b>P-value</b>: \n", | |
"<p>What is this P-value? The P-value is the probability value that the correlation between these two variables is statistically significant. Normally, we choose a significance level of 0.05, which means that we are 95% confident that the correlation between the variables is significant.</p>\n", | |
"\n", | |
"By convention, when the\n", | |
"<ul>\n", | |
" <li>p-value is $<$ 0.001: we say there is strong evidence that the correlation is significant.</li>\n", | |
" <li>the p-value is $<$ 0.05: there is moderate evidence that the correlation is significant.</li>\n", | |
" <li>the p-value is $<$ 0.1: there is weak evidence that the correlation is significant.</li>\n", | |
" <li>the p-value is $>$ 0.1: there is no evidence that the correlation is significant.</li>\n", | |
"</ul>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" We can obtain this information using \"stats\" module in the \"scipy\" library." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 38, | |
"metadata": { | |
"collapsed": true | |
}, | |
"outputs": [], | |
"source": [ | |
"from scipy import stats" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Wheel-base vs Price</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Let's calculate the Pearson Correlation Coefficient and P-value of 'wheel-base' and 'price'. " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 39, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.5846418222655081 with a P-value of P = 8.076488270732955e-20\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['wheel-base'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P =\", p_value) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between wheel-base and price is statistically significant, although the linear relationship isn't extremely strong (~0.585)</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Horsepower vs Price</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's calculate the Pearson Correlation Coefficient and P-value of 'horsepower' and 'price'." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 40, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.8095745670036559 with a P-value of P = 6.36905742825998e-48\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['horsepower'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P = \", p_value) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between horsepower and price is statistically significant, and the linear relationship is quite strong (~0.809, close to 1)</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Length vs Price</h3>\n", | |
"\n", | |
"Let's calculate the Pearson Correlation Coefficient and P-value of 'length' and 'price'." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 41, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.690628380448364 with a P-value of P = 8.016477466159053e-30\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['length'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P = \", p_value) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between length and price is statistically significant, and the linear relationship is moderately strong (~0.691).</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Width vs Price</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's calculate the Pearson Correlation Coefficient and P-value of 'width' and 'price':" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 42, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.7512653440522674 with a P-value of P = 9.200335510481426e-38\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['width'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P =\", p_value ) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"##### Conclusion:\n", | |
"\n", | |
"Since the p-value is < 0.001, the correlation between width and price is statistically significant, and the linear relationship is quite strong (~0.751)." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"### Curb-weight vs Price" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's calculate the Pearson Correlation Coefficient and P-value of 'curb-weight' and 'price':" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 43, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.8344145257702846 with a P-value of P = 2.1895772388936997e-53\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['curb-weight'], df['price'])\n", | |
"print( \"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P = \", p_value) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between curb-weight and price is statistically significant, and the linear relationship is quite strong (~0.834).</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Engine-size vs Price</h3>\n", | |
"\n", | |
"Let's calculate the Pearson Correlation Coefficient and P-value of 'engine-size' and 'price':" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 44, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.8723351674455185 with a P-value of P = 9.265491622197996e-64\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['engine-size'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P =\", p_value) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between engine-size and price is statistically significant, and the linear relationship is very strong (~0.872).</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Bore vs Price</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's calculate the Pearson Correlation Coefficient and P-value of 'bore' and 'price':" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 46, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is 0.5431553832626602 with a P-value of P = 8.049189483935364e-17\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['bore'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P = \", p_value )" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between bore and price is statistically significant, but the linear relationship is only moderate (~0.521).</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" We can relate the process for each 'City-mpg' and 'Highway-mpg':" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>City-mpg vs Price</h3>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 48, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is -0.6865710067844677 with a P-value of P = 2.3211320655676368e-29\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['city-mpg'], df['price'])\n", | |
"print(\"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P = \", p_value) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h5>Conclusion:</h5>\n", | |
"<p>Since the p-value is $<$ 0.001, the correlation between city-mpg and price is statistically significant, and the coefficient of ~ -0.687 shows that the relationship is negative and moderately strong.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Highway-mpg vs Price</h3>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 49, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The Pearson Correlation Coefficient is -0.7046922650589529 with a P-value of P = 1.7495471144476807e-31\n" | |
] | |
} | |
], | |
"source": [ | |
"pearson_coef, p_value = stats.pearsonr(df['highway-mpg'], df['price'])\n", | |
"print( \"The Pearson Correlation Coefficient is\", pearson_coef, \" with a P-value of P = \", p_value ) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"##### Conclusion:\n", | |
"Since the p-value is < 0.001, the correlation between highway-mpg and price is statistically significant, and the coefficient of ~ -0.705 shows that the relationship is negative and moderately strong." | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h2 id=\"anova\">6. ANOVA</h2>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>ANOVA: Analysis of Variance</h3>\n", | |
"<p>The Analysis of Variance (ANOVA) is a statistical method used to test whether there are significant differences between the means of two or more groups. ANOVA returns two parameters:</p>\n", | |
"\n", | |
"<p><b>F-test score</b>: ANOVA assumes the means of all groups are the same, calculates how much the actual means deviate from the assumption, and reports it as the F-test score. A larger score means there is a larger difference between the means.</p>\n", | |
"\n", | |
"<p><b>P-value</b>: P-value tells how statistically significant is our calculated score value.</p>\n", | |
"\n", | |
"<p>If our price variable is strongly correlated with the variable we are analyzing, expect ANOVA to return a sizeable F-test score and a small p-value.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Drive Wheels</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>Since ANOVA analyzes the difference between different groups of the same variable, the groupby function will come in handy. Because the ANOVA algorithm averages the data automatically, we do not need to take the average before hand.</p>\n", | |
"\n", | |
"<p>Let's see if different types 'drive-wheels' impact 'price', we group the data.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's see if different types 'drive-wheels' impact 'price', we group the data." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 50, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>drive-wheels</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>rwd</td>\n", | |
" <td>13495.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>rwd</td>\n", | |
" <td>16500.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>fwd</td>\n", | |
" <td>13950.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>4wd</td>\n", | |
" <td>17450.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>fwd</td>\n", | |
" <td>15250.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>136</th>\n", | |
" <td>4wd</td>\n", | |
" <td>7603.0</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" drive-wheels price\n", | |
"0 rwd 13495.0\n", | |
"1 rwd 16500.0\n", | |
"3 fwd 13950.0\n", | |
"4 4wd 17450.0\n", | |
"5 fwd 15250.0\n", | |
"136 4wd 7603.0" | |
] | |
}, | |
"execution_count": 50, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"grouped_test2=df_gptest[['drive-wheels', 'price']].groupby(['drive-wheels'])\n", | |
"grouped_test2.head(2)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 51, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>drive-wheels</th>\n", | |
" <th>body-style</th>\n", | |
" <th>price</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>rwd</td>\n", | |
" <td>convertible</td>\n", | |
" <td>13495.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>rwd</td>\n", | |
" <td>convertible</td>\n", | |
" <td>16500.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>rwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>16500.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>13950.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>4wd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>17450.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>15250.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>17710.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>fwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>18920.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>8</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>23875.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>9</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>16430.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>10</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>16925.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>11</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>20970.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>12</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>21105.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>13</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>24565.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>14</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>30760.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>15</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>41315.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>16</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>36880.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>17</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>5151.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>18</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>6295.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>19</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>6575.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>20</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>5572.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>21</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>6377.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>22</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>7957.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>23</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>6229.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>24</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>6692.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>25</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>7609.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>26</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>8558.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>27</th>\n", | |
" <td>fwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>8921.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>28</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>12964.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>29</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>6479.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>171</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>9988.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>172</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>10898.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>173</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>11248.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>174</th>\n", | |
" <td>rwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>16558.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>175</th>\n", | |
" <td>rwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>15998.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>176</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>15690.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>177</th>\n", | |
" <td>rwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>15750.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>178</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>7775.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>179</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>7975.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>180</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>7995.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>181</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>8195.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>182</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>8495.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>183</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>9495.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>184</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>9995.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>185</th>\n", | |
" <td>fwd</td>\n", | |
" <td>convertible</td>\n", | |
" <td>11595.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>186</th>\n", | |
" <td>fwd</td>\n", | |
" <td>hatchback</td>\n", | |
" <td>9980.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>187</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>13295.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>188</th>\n", | |
" <td>fwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>13845.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>189</th>\n", | |
" <td>fwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>12290.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>190</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>12940.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>191</th>\n", | |
" <td>rwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>13415.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>192</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>15985.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>193</th>\n", | |
" <td>rwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>16515.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>194</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>18420.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>195</th>\n", | |
" <td>rwd</td>\n", | |
" <td>wagon</td>\n", | |
" <td>18950.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>196</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>16845.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>197</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>19045.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>198</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>21485.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>199</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>22470.0</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>200</th>\n", | |
" <td>rwd</td>\n", | |
" <td>sedan</td>\n", | |
" <td>22625.0</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>201 rows × 3 columns</p>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" drive-wheels body-style price\n", | |
"0 rwd convertible 13495.0\n", | |
"1 rwd convertible 16500.0\n", | |
"2 rwd hatchback 16500.0\n", | |
"3 fwd sedan 13950.0\n", | |
"4 4wd sedan 17450.0\n", | |
"5 fwd sedan 15250.0\n", | |
"6 fwd sedan 17710.0\n", | |
"7 fwd wagon 18920.0\n", | |
"8 fwd sedan 23875.0\n", | |
"9 rwd sedan 16430.0\n", | |
"10 rwd sedan 16925.0\n", | |
"11 rwd sedan 20970.0\n", | |
"12 rwd sedan 21105.0\n", | |
"13 rwd sedan 24565.0\n", | |
"14 rwd sedan 30760.0\n", | |
"15 rwd sedan 41315.0\n", | |
"16 rwd sedan 36880.0\n", | |
"17 fwd hatchback 5151.0\n", | |
"18 fwd hatchback 6295.0\n", | |
"19 fwd sedan 6575.0\n", | |
"20 fwd hatchback 5572.0\n", | |
"21 fwd hatchback 6377.0\n", | |
"22 fwd hatchback 7957.0\n", | |
"23 fwd hatchback 6229.0\n", | |
"24 fwd sedan 6692.0\n", | |
"25 fwd sedan 7609.0\n", | |
"26 fwd sedan 8558.0\n", | |
"27 fwd wagon 8921.0\n", | |
"28 fwd hatchback 12964.0\n", | |
"29 fwd hatchback 6479.0\n", | |
".. ... ... ...\n", | |
"171 fwd hatchback 9988.0\n", | |
"172 fwd sedan 10898.0\n", | |
"173 fwd hatchback 11248.0\n", | |
"174 rwd hatchback 16558.0\n", | |
"175 rwd hatchback 15998.0\n", | |
"176 rwd sedan 15690.0\n", | |
"177 rwd wagon 15750.0\n", | |
"178 fwd sedan 7775.0\n", | |
"179 fwd sedan 7975.0\n", | |
"180 fwd sedan 7995.0\n", | |
"181 fwd sedan 8195.0\n", | |
"182 fwd sedan 8495.0\n", | |
"183 fwd sedan 9495.0\n", | |
"184 fwd sedan 9995.0\n", | |
"185 fwd convertible 11595.0\n", | |
"186 fwd hatchback 9980.0\n", | |
"187 fwd sedan 13295.0\n", | |
"188 fwd sedan 13845.0\n", | |
"189 fwd wagon 12290.0\n", | |
"190 rwd sedan 12940.0\n", | |
"191 rwd wagon 13415.0\n", | |
"192 rwd sedan 15985.0\n", | |
"193 rwd wagon 16515.0\n", | |
"194 rwd sedan 18420.0\n", | |
"195 rwd wagon 18950.0\n", | |
"196 rwd sedan 16845.0\n", | |
"197 rwd sedan 19045.0\n", | |
"198 rwd sedan 21485.0\n", | |
"199 rwd sedan 22470.0\n", | |
"200 rwd sedan 22625.0\n", | |
"\n", | |
"[201 rows x 3 columns]" | |
] | |
}, | |
"execution_count": 51, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"df_gptest" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" We can obtain the values of the method group using the method \"get_group\". " | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 52, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"4 17450.0\n", | |
"136 7603.0\n", | |
"140 9233.0\n", | |
"141 11259.0\n", | |
"144 8013.0\n", | |
"145 11694.0\n", | |
"150 7898.0\n", | |
"151 8778.0\n", | |
"Name: price, dtype: float64" | |
] | |
}, | |
"execution_count": 52, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"grouped_test2.get_group('4wd')['price']" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"we can use the function 'f_oneway' in the module 'stats' to obtain the <b>F-test score</b> and <b>P-value</b>." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 53, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ANOVA results: F= 67.95406500780399 , P = 3.3945443577151245e-23\n" | |
] | |
} | |
], | |
"source": [ | |
"# ANOVA\n", | |
"f_val, p_val = stats.f_oneway(grouped_test2.get_group('fwd')['price'], grouped_test2.get_group('rwd')['price'], grouped_test2.get_group('4wd')['price']) \n", | |
" \n", | |
"print( \"ANOVA results: F=\", f_val, \", P =\", p_val) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This is a great result, with a large F test score showing a strong correlation and a P value of almost 0 implying almost certain statistical significance. But does this mean all three tested groups are all this highly correlated? " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### Separately: fwd and rwd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 54, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ANOVA results: F= 130.5533160959111 , P = 2.2355306355677845e-23\n" | |
] | |
} | |
], | |
"source": [ | |
"f_val, p_val = stats.f_oneway(grouped_test2.get_group('fwd')['price'], grouped_test2.get_group('rwd')['price']) \n", | |
" \n", | |
"print( \"ANOVA results: F=\", f_val, \", P =\", p_val )" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
" Let's examine the other groups " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"#### 4wd and rwd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 55, | |
"metadata": { | |
"collapsed": false, | |
"scrolled": true | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ANOVA results: F= 8.580681368924756 , P = 0.004411492211225333\n" | |
] | |
} | |
], | |
"source": [ | |
"f_val, p_val = stats.f_oneway(grouped_test2.get_group('4wd')['price'], grouped_test2.get_group('rwd')['price']) \n", | |
" \n", | |
"print( \"ANOVA results: F=\", f_val, \", P =\", p_val) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h4>4wd and fwd</h4>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 56, | |
"metadata": { | |
"collapsed": false | |
}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"ANOVA results: F= 0.665465750252303 , P = 0.41620116697845666\n" | |
] | |
} | |
], | |
"source": [ | |
"f_val, p_val = stats.f_oneway(grouped_test2.get_group('4wd')['price'], grouped_test2.get_group('fwd')['price']) \n", | |
" \n", | |
"print(\"ANOVA results: F=\", f_val, \", P =\", p_val) " | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>Conclusion: Important Variables</h3>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<p>We now have a better idea of what our data looks like and which variables are important to take into account when predicting the car price. We have narrowed it down to the following variables:</p>\n", | |
"\n", | |
"Continuous numerical variables:\n", | |
"<ul>\n", | |
" <li>Length</li>\n", | |
" <li>Width</li>\n", | |
" <li>Curb-weight</li>\n", | |
" <li>Engine-size</li>\n", | |
" <li>Horsepower</li>\n", | |
" <li>City-mpg</li>\n", | |
" <li>Highway-mpg</li>\n", | |
" <li>Wheel-base</li>\n", | |
" <li>Bore</li>\n", | |
"</ul>\n", | |
" \n", | |
"Categorical variables:\n", | |
"<ul>\n", | |
" <li>Drive-wheels</li>\n", | |
"</ul>\n", | |
"\n", | |
"<p>As we now move into building machine learning models to automate our analysis, feeding the model with variables that meaningfully affect our target variable will improve our model's prediction performance.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h1>Thank you for completing this notebook</h1>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<div class=\"alert alert-block alert-info\" style=\"margin-top: 20px\">\n", | |
"\n", | |
" <p><a href=\"https://cocl.us/corsera_da0101en_notebook_bottom\"><img src=\"https://s3-api.us-geo.objectstorage.softlayer.net/cf-courses-data/CognitiveClass/DA0101EN/Images/BottomAd.png\" width=\"750\" align=\"center\"></a></p>\n", | |
"</div>\n" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<h3>About the Authors:</h3>\n", | |
"\n", | |
"This notebook was written by <a href=\"https://www.linkedin.com/in/mahdi-noorian-58219234/\" target=\"_blank\">Mahdi Noorian PhD</a>, <a href=\"https://www.linkedin.com/in/joseph-s-50398b136/\" target=\"_blank\">Joseph Santarcangelo</a>, Bahare Talayian, Eric Xiao, Steven Dong, Parizad, Hima Vsudevan and <a href=\"https://www.linkedin.com/in/fiorellawever/\" target=\"_blank\">Fiorella Wenver</a> and <a href=\" https://www.linkedin.com/in/yi-leng-yao-84451275/ \" target=\"_blank\" >Yi Yao</a>.\n", | |
"\n", | |
"<p><a href=\"https://www.linkedin.com/in/joseph-s-50398b136/\" target=\"_blank\">Joseph Santarcangelo</a> is a Data Scientist at IBM, and holds a PhD in Electrical Engineering. His research focused on using Machine Learning, Signal Processing, and Computer Vision to determine how videos impact human cognition. Joseph has been working for IBM since he completed his PhD.</p>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<hr>\n", | |
"<p>Copyright © 2018 IBM Developer Skills Network. This notebook and its source code are released under the terms of the <a href=\"https://cognitiveclass.ai/mit-license/\">MIT License</a>.</p>" | |
] | |
} | |
], | |
"metadata": { | |
"anaconda-cloud": {}, | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.8" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment