You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Data-Science-For-Beginners/1-Introduction/04-stats-and-probability/notebook.ipynb

1123 lines
155 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Introduction to Probability and Statistics\n",
"In this notebook, we will play around with some of the concepts we have previously discussed. Many concepts from probability and statistics are well-represented in major libraries for data processing in Python, such as `numpy` and `pandas`."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import random\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Random Variables and Distributions\n",
"Let's start with drawing a sample of 30 values from a uniform distribution from 0 to 9. We will also compute mean and variance."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sample: [4, 8, 5, 10, 5, 1, 1, 1, 7, 9, 7, 0, 2, 7, 3, 5, 9, 8, 3, 10, 2, 9, 2, 9, 9, 8, 1, 8, 7, 3]\n",
"Mean = 5.433333333333334\n",
"Variance = 10.178888888888887\n"
]
}
],
"source": [
"sample = [ random.randint(0,10) for _ in range(30) ]\n",
"print(f\"Sample: {sample}\")\n",
"print(f\"Mean = {np.mean(sample)}\")\n",
"print(f\"Variance = {np.var(sample)}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"To visually estimate how many different values are there in the sample, we can plot the **histogram**:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAWoAAAD4CAYAAADFAawfAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9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XJtQ77TL1JNckOQbSQ4leTjJDcueaVGS7EryQJK7lz3LIiQ5N8kdSR6d/rzfueyZxpbkj6e/1w8luT3Jq5c907wluSXJ0SQPHffYzyf5apJ/m37/uXm8VotQ79DL1J8HPlJVvwa8A/jQDtjmY24ADi17iAX6JHBvVf0q8Da2+bYnOR/4I2Ctqt7K5kkI1y13qlF8DrjyhMf2Al+rqjcDX5veP20tQs0OvEy9qp6sqvunt59h8w/v+cudanxJ9gBXAzcve5ZFSPI64DLgMwBV9VxV/WipQy3GbuA1SXYDZ7ENr72oqm8CPzzh4WuBW6e3bwXeM4/X6hLqWZepb/toHZNkFbgI2L/kURbhE8BHgf9b8hyL8iZgA/js9HDPzUnOXvZQY6qq7wJ/AXwHeBL4r6r6ynKnWpjXV9WTsLkzBvziPFbaJdSDLlPfjpK8FvgScGNVPb3secaU5N3A0ao6uOxZFmg3cDHw6aq6CPgxc/rrcFfT47LXAm8Efgk4O8l7lzvVK1uXUO/Iy9STnMFmpG+rqjuXPc8CXApck+Qwm4e3Lk/y+eWONLojwJGqOva3pTvYDPd29i7gP6pqo6r+F7gT+I0lz7QoP0jyBoDp96PzWGmXUO+4y9SThM3jloeq6uPLnmcRqupjVbWnqlbZ/Bl/vaq29Z5WVX0feCLJhdOHrgAeWeJIi/Ad4B1Jzpr+nl/BNn8D9ThfBt4/vf1+4K/nsdIh//e80S3hMvUOLgXeB/xrkgenj/1JVf3N8kbSSD4M3DbdCXkc+MCS5xlVVe1PcgdwP5tnNz3ANrycPMntwG8C5yU5AvwpcBPwxSQfZPM/WL8/l9fyEnJJ6q3LoQ9J0kkYaklqzlBLUnOGWpKaM9SS1JyhlqTmDLUkNff/C2KbzOLSKWIAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.hist(sample)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Analyzing Real Data\n",
"\n",
"Mean and variance are very important when analyzing real-world data. Let's load the data about baseball players from [SOCR MLB Height/Weight Data](http://wiki.stat.ucla.edu/socr/index.php/SOCR_Data_MLB_HeightsWeights)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"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>Name</th>\n",
" <th>Team</th>\n",
" <th>Role</th>\n",
" <th>Height</th>\n",
" <th>Weight</th>\n",
" <th>Age</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>Adam_Donachie</td>\n",
" <td>BAL</td>\n",
" <td>Catcher</td>\n",
" <td>74</td>\n",
" <td>180.0</td>\n",
" <td>22.99</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>Paul_Bako</td>\n",
" <td>BAL</td>\n",
" <td>Catcher</td>\n",
" <td>74</td>\n",
" <td>215.0</td>\n",
" <td>34.69</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>Ramon_Hernandez</td>\n",
" <td>BAL</td>\n",
" <td>Catcher</td>\n",
" <td>72</td>\n",
" <td>210.0</td>\n",
" <td>30.78</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>Kevin_Millar</td>\n",
" <td>BAL</td>\n",
" <td>First_Baseman</td>\n",
" <td>72</td>\n",
" <td>210.0</td>\n",
" <td>35.43</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>Chris_Gomez</td>\n",
" <td>BAL</td>\n",
" <td>First_Baseman</td>\n",
" <td>73</td>\n",
" <td>188.0</td>\n",
" <td>35.71</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1029</th>\n",
" <td>Brad_Thompson</td>\n",
" <td>STL</td>\n",
" <td>Relief_Pitcher</td>\n",
" <td>73</td>\n",
" <td>190.0</td>\n",
" <td>25.08</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1030</th>\n",
" <td>Tyler_Johnson</td>\n",
" <td>STL</td>\n",
" <td>Relief_Pitcher</td>\n",
" <td>74</td>\n",
" <td>180.0</td>\n",
" <td>25.73</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1031</th>\n",
" <td>Chris_Narveson</td>\n",
" <td>STL</td>\n",
" <td>Relief_Pitcher</td>\n",
" <td>75</td>\n",
" <td>205.0</td>\n",
" <td>25.19</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1032</th>\n",
" <td>Randy_Keisler</td>\n",
" <td>STL</td>\n",
" <td>Relief_Pitcher</td>\n",
" <td>75</td>\n",
" <td>190.0</td>\n",
" <td>31.01</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1033</th>\n",
" <td>Josh_Kinney</td>\n",
" <td>STL</td>\n",
" <td>Relief_Pitcher</td>\n",
" <td>73</td>\n",
" <td>195.0</td>\n",
" <td>27.92</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1034 rows × 6 columns</p>\n",
"</div>"
],
"text/plain": [
" Name Team Role Height Weight Age\n",
"0 Adam_Donachie BAL Catcher 74 180.0 22.99\n",
"1 Paul_Bako BAL Catcher 74 215.0 34.69\n",
"2 Ramon_Hernandez BAL Catcher 72 210.0 30.78\n",
"3 Kevin_Millar BAL First_Baseman 72 210.0 35.43\n",
"4 Chris_Gomez BAL First_Baseman 73 188.0 35.71\n",
"... ... ... ... ... ... ...\n",
"1029 Brad_Thompson STL Relief_Pitcher 73 190.0 25.08\n",
"1030 Tyler_Johnson STL Relief_Pitcher 74 180.0 25.73\n",
"1031 Chris_Narveson STL Relief_Pitcher 75 205.0 25.19\n",
"1032 Randy_Keisler STL Relief_Pitcher 75 190.0 31.01\n",
"1033 Josh_Kinney STL Relief_Pitcher 73 195.0 27.92\n",
"\n",
"[1034 rows x 6 columns]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df = pd.read_csv(\"../../data/SOCR_MLB.tsv\",sep='\\t', header=None, names=['Name','Team','Role','Height','Weight','Age'])\n",
"df"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> We are using a package called [**Pandas**](https://pandas.pydata.org/) here for data analysis. We will talk more about Pandas and working with data in Python later in this course.\n",
"\n",
"Let's compute average values for age, height and weight:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Age 28.736712\n",
"Height 73.697292\n",
"Weight 201.689255\n",
"dtype: float64"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df[['Age','Height','Weight']].mean()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now let's focus on height, and compute standard deviation and variance: "
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[74, 74, 72, 72, 73, 69, 69, 71, 76, 71, 73, 73, 74, 74, 69, 70, 72, 73, 75, 78]\n"
]
}
],
"source": [
"print(list(df['Height'])[:20])"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mean = 73.6972920696325\n",
"Variance = 5.316798081118074\n",
"Standard Deviation = 2.3058183105175645\n"
]
}
],
"source": [
"mean = df['Height'].mean()\n",
"var = df['Height'].var()\n",
"std = df['Height'].std()\n",
"print(f\"Mean = {mean}\\nVariance = {var}\\nStandard Deviation = {std}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In addition to mean, it makes sense to look at the median value and quartiles. They can be visualized using a **box plot**:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAACICAYAAAD6bB0zAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAATqUlEQVR4nO3dbWxW533H8d8/CYaV5cEJzcJmmNehhhSiZCXZMmcP1bIX3Rale9Fpi7aqzTImtslSK3Whq6U+vCjq1iXVxIuhpe0aVZOlNDIMWauVRSaIBZXxUCfQASpsEKCMAGEucopN5WsvfENunNsP55f4XOfE3490y8kdsP7+5hyfy5fvh0gpCQAAAMCE63IPAAAAAFQJC2QAAACgCQtkAAAAoAkLZAAAAKAJC2QAAACgyQ1z8UmXLFmSOjs75+JTAwAAAO+IvXv3nkspvXfy/XOyQO7s7NSePXvm4lPX2vnz53XbbbflHqNWaOahm4duHrp56Oahm4durUXE8Vb38xCLEu3fvz/3CLVDMw/dPHTz0M1DNw/dPHQrJubijULuu+++xA7yW42NjamtrS33GLVCMw/dPHTz0M1DNw/dPHRrLSL2ppTum3w/O8glev7553OPUDs089DNQzcP3Tx089DNQ7di2EEGAADAvMQOcgX09fXlHqF2aOahm4duHrp56Oahm4duxbCDDAAAgHmJHeQK4Ke34mjmoZuHbh66eejmoZuHbsWwgwwAAIB5iR3kChgYGMg9Qu3QzEM3D908dPPQzUM3D92KYQe5RCMjI1q8eHHuMWqFZh66eejmoZuHbh66eejWGjvIFTA0NJR7hNqhmYduHrp56Oahm4duHroVwwK5RCtWrMg9Qu3QzEM3D908dPPQzUM3D92KYYFcotOnT+ceoXZo5qGbh24eunno5qGbh27FsEAu0Y033ph7hNqhmYduHrp56Oahm4duHroVwwIZAAAAaMICuUQXL17MPULt0MxDNw/dPHTz0M1DNw/dimGBXKKlS5fmHqF2aOahm4duHrp56Oahm4duxbBALtGRI0dyj1A7NPPQzUM3D908dPPQzUO3YnijkBLxIt3F0cxDNw/dPHTz0M1DNw/dWuONQipgx44duUeoHZp56Oahm4duHrp56OahWzHsIAMAAGBeYge5Avr6+nKPUDs089DNQzcP3Tx089DNQ7di2EEGAADAvMQOcgXw01txNPPQzUM3D908dPPQzUO3YthBBgAAwLzEDnIF9Pf35x6hdmjmoZuHbh66eejmoZuHbsWwg1yisbExtbW15R6jVmjmoZuHbh66eejmoZuHbq2xg1wBO3fuzD1C7dDMQzcP3Tx089DNQzcP3YphgVyiu+++O/cItUMzD908dPPQzUM3D908dCuGBXKJjh07lnuE2qGZh24eunno5qGbh24euhXDArlES5YsyT1C7dDMQzcP3Tx089DNQzcP3YphgVyiS5cu5R6hdmjmoZuHbh66eejmoZuHbsWwQC7R5cuXc49QOzTz0M1DNw/dPHTz0M1Dt2JYIJeovb099wi1QzMP3Tx089DNQzcP3Tx0K4YFcolOnjyZe4TaoZmHbh66eejmoZuHbh66FcMCuUQrV67MPULt0MxDNw/dPHTz0M1DNw/dimGBXKLdu3fnHqF2aOahm4duHrp56Oahm4duxfBW0yUaHx/XddfxM0kRNPPQzUM3D908dPPQzUO31nir6QrYunVr7hFqh2Yeunno5qGbh24eunnoVgw7yAAAAJiX2EGugM2bN+ceoXZo5qGbh24eunno5qGbh27FsIMMAACAeYkd5ArYsmVL7hFqh2Yeunno5qGbh24eunnoVgw7yCXiGaTF0cxz66236sKFC7nHqJ30+ZsUX/xR7jFaam9v1+uvv557jJY4Tz1089DNQ7fW2EGugMHBwdwj1A7NPBcuXFBKiVvBm6TsM0x1q/IPPJynHrp56OahWzEskEt0//335x6hdmgGVB/nqYduHrp56FYMC+QSHTp0KPcItUMzoPo4Tz1089DNQ7diWCCX6IEHHsg9Qu10dHTkHgHADDhPPVXuFhG5R5hSlbtVGd2KmXGBHB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Lan1K6PaXUmVLq1MTC74ONcxpvmnyObtHE9zRFxPsltUniiY1vNbkb14TpvSrpgYh4T+M3Eg9JOiiuCTNp2Y1rQjG8isUciYh7NfEs+DZJ/y3pMUmrJP2DJn4deUnSX6aU9uaasYoav+I+Iel9KaXhxn23aeIVQJZr4sT/g5TS6/mmrJ4puh2RtFDS+cYf+25KaV2mESupVbdJ//2YpPt4FYs3TXGstUn6hqR7JY1J+nRKaTDbkBU0RbdfE9eEaUXEFyX9oSYeEvA9SX8m6afFNWFaU3T7vrgmzBoLZAAAAKAJD7EAAAAAmrBABgAAAJqwQAYAAACasEAGAAAAmrBABgAAAJqwQAYAAACasEAGAAAAmvw/tSpycIADqyoAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 720x144 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,2))\n",
"plt.boxplot(df['Height'], vert=False, showmeans=True)\n",
"plt.grid(color='gray', linestyle='dotted')\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also make box plots of subsets of our dataset, for example, grouped by player role."
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAI4CAYAAAB3OR9vAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABJy0lEQVR4nO3de5ycZX3//9eHBBIgHBQxCioRD7ghCprgMWrWeKIWtNZW9qsWdQvF+lvFtDbI+hWs3dZ4oNXUiuCqqHVREFSknIRdNCryBeQc0crBEyp4AAICJn5+f9z3kjubze4szO49s/N6Ph77yM49M/d85srcO++55rqvKzITSZIkSYXt6i5AkiRJaiUGZEmSJKnCgCxJkiRVGJAlSZKkCgOyJ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fnn1G4CLx9zlBmDPiHgOFEMuImL/mapXkmYTe5AlqUVl5vcj4irgMOBw4MSI2Am4EXjTmNveX0739tGy93ku8B/AdTNbtSS1P5ealiRJkiocYiFJkiRVGJAlSZKkCgOyJEmSVGFAliRJkioMyJIkSVKFAVmSJEmqMCBLkiRJFQZkSZIkqeL/Bzi4LlK03SS8AAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x576 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"df.boxplot(column='Height', by='Role', figsize=(10,8))\n",
"plt.xticks(rotation='vertical')\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> **Note**: This diagram suggests, that on average, the heights of first basemen are higher than heights of second basemen. Later we will learn how we can test this hypothesis more formally, and how to demonstrate that our data is statistically significant to show that. \n",
"\n",
"Age, height and weight are all continuous random variables. What do you think their distribution is? A good way to find out is to plot the histogram of values: "
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGqCAYAAAAWf7K6AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAn10lEQVR4nO3de5hlZXnn/e9PUDS2AgatIJK0GkwE+g0TShIPMdWaUSNMMPOqwWEURmNHYw7GTt40mqjRkCEmaCZjoukEXjEqLSMeiJAoMTaoI2rDoA2iItIoBxsFBFoJSeM9f6xV8lDUqYu9a9fh+7muumrvZ6291r3vrq761VPPXjtVhSRJkqTO/UZdgCRJkrSUGJAlSZKkhgFZkiRJahiQJUmSpIYBWZIkSWoYkCVJkqSGAVnSgiU5PslH57nviUk+OeDz70jyC/3tVyf5uwEee1eSx/S335Hkjwd47Lcn+cNBHW8PzvvyJDv75/b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JOBF08eI8kDgb8BnlpVV/fvEtn6SWA98BDgy0neBmwCDq+qI4b6BCVpCTMgS9LSNTmL/CTgzXQB+Ul0Afk64Bnc/XbSewE3THn8TwJfq6qr+/tn0r/tbO/cqroTuDPJjcDYkJ6HJC0rBmRJWrom1yGvo1ti8Q1gI3Ab8C/AQVX1xFkenzmOf2dz+y78mSBJgGuQJWkp+xRwDHBzVd1VVTfTvYjuicB7gYcneSJAkvsnOWzK478EPCbJ2v7+r8zjnLfTLbmQpFXLgCxJS9d2uqtXXDRl7NaquhF4LvCnST4PXMrdL+oDoKruoLsixT8l+SSwk255xoyq6ibgU0ku80V6klarVNWoa5AkDUmSNVW1K91C5b8Crqyqt4y6LklaypxBlqSV7aVJLgUuB/alu6qFJGkWziBLkiRJDWeQJUmSpIYBWZIkSWoYkCVJkqSGAVmSJElqGJAlSZKkxv8FiHh2DxCDPowAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"df['Weight'].hist(bins=15, figsize=(10,6))\n",
"plt.suptitle('Weight distribution of MLB Players')\n",
"plt.xlabel('Weight')\n",
"plt.ylabel('Count')\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Normal Distribution\n",
"\n",
"Let's create an artificial sample of weights that follows a normal distribution with the same mean and variance as our real data:"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([73.46072234, 70.40678311, 70.23689776, 73.81190675, 72.41091792,\n",
" 76.00127651, 71.91641414, 77.18162239, 76.7173353 , 73.93996587,\n",
" 74.2862748 , 76.88034696, 72.15184905, 74.43537605, 76.37723417,\n",
" 65.66976051, 74.3200533 , 77.3235274 , 72.8840488 , 77.50300255])"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"generated = np.random.normal(mean, std, 1000)\n",
"generated[:20]"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGoCAYAAABbtxOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAXh0lEQVR4nO3df4xlZ33f8c+33oQWQoqJB2SM3TXIoELVGrpy0yIQrUlwcIQhEtRWSt0EdUEyUmj5gwWkQiNZchoc/kkDWmIXJyLGDsbBkkmL60ahSOXHGhxjYzu2YYG1t+sNTgMpiHTNt3/M2eTxcmdnPPfeGa/39ZJG997nnjPz+Nmrs2+fPXNvdXcAAIBVf2u7JwAAAE8kAhkAAAYCGQAABgIZAAAGAhkAAAY7tnsCSXLaaaf1zp07t3saAACcRG677bY/6+6VY8efEIG8c+fO7Nu3b7unAQDASaSqvjFr3CUWAAAwEMgAADAQyAAAMBDIAAAwEMgAADAQyAAAMBDIAAAwEMgAADAQyAAAMBDIAAAwWDeQq+rMqvqjqrq7qu6qql+Zxp9ZVbdU1X3T7anDPu+qqvur6t6qevUy/wMAAGCRNnIG+UiSd3T330/y00kuq6oXJdmT5NbuPifJrdPjTM9dnOTFSS5I8ltVdcoyJg8AAIu2biB398Hu/tJ0/7tJ7k5yRpKLklwzbXZNktdN9y9K8rHu/kF3fz3J/UnOW/C8AQBgKR7XNchVtTPJS5J8Psmzu/tgshrRSZ41bXZGkm8Nux2Yxo79Xrural9V7Tt8+PAmpg4AAIu34UCuqp9IckOSt3f3d4636Yyx/pGB7r3dvau7d62srGx0GgAAsFQbCuSq+rGsxvFHu/sT0/Chqjp9ev70JA9P4weSnDns/twkDy1mugAAsFwbeReLSnJVkru7+zeGp25Kcul0/9IknxzGL66qp1TV2UnOSfKFxU0ZAACWZ8cGtnlZkjcl+UpV3T6NvTvJFUmur6o3J/lmkjckSX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vSfJkSQfXWNXr98NmLG+jr8LdJzjg+PvHKb/cbsoydlJnpPkaVX1rza6+4wxr9/Beut7shx/tzOQDyQ50N2fnx5/PMlLu/tQdz/a3T9M8uGs/nPIrH19lPXxzVzfJJn+yeQXkly31s7d/dB0+3CSGzP7z4HVA8CXuvvQ9PhQVZ2eJNPtwzP28frduGPXN1V1aZKfT/KLvcYvUXj9bthj1tfxd+FmvX4df+f3qiRf7+7D3f3/knwiyT+L4++irLW+J9Xxd9sCubv/d5JvVdULp6Hzk3z16It78vokd87Y3UdZr2Ot9Z3uvyrJPd19YNa+VfW0qnr60ftJfjaz/xz40TNBNyW5dLp/aZJPztjH63fjHrO+VXVBkncmeW13f2/WDl6/j8ux6+v4u1izzhQ7/s7vm0l+uqqeOl3PfX6Su+P4uygz1/ekO/5297Z9ZfWf8fYluSPJHyQ5NcnvJvnKNHZTktOnbZ+T5FPDvq/J6m+iPpDkPdv53/FE/Zq1vtP4R5K89Zht/3p9s3r98p9MX3dZ3zXX96lJvp3k7w5jP5Xk1iT3TbfPPHZ9p8dev5tb3/uzev3g7dPXh45dX6/fudbX8XeJ6zuNO/4uZn3/Y5J7shpfv5vkKY6/S1/fk+r466OmAQBg4JP0AABgIJABAGAgkAEAYCCQAQBgIJABAGAgkAEAYCCQAQBg8P8B40VGjZpezWQAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.hist(generated, bins=15)\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGoCAYAAABbtxOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAA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vqu7r5rkq8NJfn9ZwnEiIDNbx6vq81X1uWxOS7EU0IX9pyTfluSBydJ4/2XRBS2rqvqnVXUmyfcnub+qPrzompbJ5GDPdyf5cDYPoDrR3Y8stqrlVVUfSPKJJN9VVWeq6rZF17Tk3pzkx5K8dfJe9ZlJ14/zXZHkDyZ/Bz+VzTnIS7V8GdNxJj0AABjoIAMAwEBABgCAgYAMAAADARkAAAYCMgAADARkAAAYCMgAADAQkAEAYPD/ASvKmaTtYFHZAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.hist(np.random.normal(0,1,50000), bins=300)\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Since most values in real life are normally distributed, we should not use a uniform random number generator to generate sample data. Here is what happens if we try to generate weights with a uniform distribution (generated by `np.random.rand`):"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGoCAYAAABbtxOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAATQElEQVR4nO3db6ykd3nf4e9db4FCFGHLx+7GNl1TbUgMapv0hKaNWkV10zoxst1WREakWgVLWyoSSNUorItUV4qQnCbqnxdNpS1xs2opxCKktorSYC35o7wAugaSYAy1G4y99sZekhSSRjI13H1xJs7tk13WPnPOzK73uiRrZn4zc+Z+8dPZj57zeJ7q7gAAAFv+zLoHAACA84lABgCAQSADAMAgkAEAYBDIAAAw7Fv3AEly+eWX94EDB9Y9BgAAF5H777//i929sX39vAjkAwcO5MSJE+seAwCAi0hVfeFM606xAACAQSADAMAgkAEAYBDIAAAwnDO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Rbb8jfjDJH3b3T613KtZp2554dZJ3Jbmxu5+uqiu6+6l1zeYIMjt1fZL/3d1f6O4Pd/czi/WPZut7r7n4zD3x5bH+imy7UBAXjWf3xOLxv0nyY7EfLlbb9wPMPfFPktzZ3U8nyTrjOBHI7NytSd53hvW3JPnFFc/C+eE5e6Kq3l1VjyV5c5J/sbapWKdn90RV3ZTk8e7+jfWOxBpt/3fjhxanYt1VVZeuayjWau6Jb07yN6vqY1X1q1X1HWucyykWvHCLi788keS13f3kWH9Xks0k/6BtrIvK2fbE4rnbk7ysu+9Yy3CsxdwTSf4gyS8n+bvd/aWqeiTJplMsLh7bf0dU1ZVJvpitvyb8eJL93f2Wdc7Iap1hT3w6yUeSvCPJdyT5uSSvXldPOILMTnxvkk9si+NDSd6Q5M3i+KL0p/bE8F+T/MMVz8P6zT3xF5Ncm+Q3FnF8dZJPVNWfX+N8rNZzfkd095Pd/dXu/lqS/5jk9WudjnXY/u/GySQf7C0fT/K1JGv7n3kFMjvxpjz3T+k3JHlnkpu6+4/WNhXrtH1PHBzP3ZTksyufiHV7dk9092919xXdfaC7D2TrH8Jv7+7fWeeArNT23xH7x3N/P8mnVz4R6/acPZHkvyX520lSVd+c5CXZ+ivDWjjFghekql6e5LFs/dnjS4u1h5O8NMnvLl72Ud9YcPE4y574+Wx9u8nXknwhyVu7+/H1TckqnWlPbHv+kTjF4qJxlt8R/znJX8nWKRaPJPnH3X1qXTOyWmfZEy9Jcle29sVXkvxod39kbTMKZAAA+BNOsQAAgEEgAwDAIJABAGAQyAAAMAhkAAAYBDIAAAwCGQAAhv8PCCPnhqb/Rl0AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"wrong_sample = np.random.rand(1000)*2*std+mean-std\n",
"plt.figure(figsize=(10,6))\n",
"plt.hist(wrong_sample)\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Confidence Intervals\n",
"\n",
"Let's now calculate confidence intervals for the weights and heights of baseball players. We will use the code [from this stackoverflow discussion](https://stackoverflow.com/questions/15033511/compute-a-confidence-interval-from-sample-data):"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"p=0.85, mean = 201.73 ± 0.94\n",
"p=0.90, mean = 201.73 ± 1.08\n",
"p=0.95, mean = 201.73 ± 1.28\n"
]
}
],
"source": [
"import scipy.stats\n",
"\n",
"def mean_confidence_interval(data, confidence=0.95):\n",
" a = 1.0 * np.array(data)\n",
" n = len(a)\n",
" m, se = np.mean(a), scipy.stats.sem(a)\n",
" h = se * scipy.stats.t.ppf((1 + confidence) / 2., n-1)\n",
" return m, h\n",
"\n",
"for p in [0.85, 0.9, 0.95]:\n",
" m, h = mean_confidence_interval(df['Weight'].fillna(method='pad'),p)\n",
" print(f\"p={p:.2f}, mean = {m:.2f} ± {h:.2f}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Hypothesis Testing\n",
"\n",
"Let's explore different roles in our baseball players dataset:"
]
},
{
"cell_type": "code",
"execution_count": 16,
"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>Height</th>\n",
" <th>Weight</th>\n",
" <th>Count</th>\n",
" </tr>\n",
" <tr>\n",
" <th>Role</th>\n",
" <th></th>\n",
" <th></th>\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>Catcher</th>\n",
" <td>72.723684</td>\n",
" <td>204.328947</td>\n",
" <td>76</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Designated_Hitter</th>\n",
" <td>74.222222</td>\n",
" <td>220.888889</td>\n",
" <td>18</td>\n",
" </tr>\n",
" <tr>\n",
" <th>First_Baseman</th>\n",
" <td>74.000000</td>\n",
" <td>213.109091</td>\n",
" <td>55</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Outfielder</th>\n",
" <td>73.010309</td>\n",
" <td>199.113402</td>\n",
" <td>194</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Relief_Pitcher</th>\n",
" <td>74.374603</td>\n",
" <td>203.517460</td>\n",
" <td>315</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Second_Baseman</th>\n",
" <td>71.362069</td>\n",
" <td>184.344828</td>\n",
" <td>58</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Shortstop</th>\n",
" <td>71.903846</td>\n",
" <td>182.923077</td>\n",
" <td>52</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Starting_Pitcher</th>\n",
" <td>74.719457</td>\n",
" <td>205.163636</td>\n",
" <td>221</td>\n",
" </tr>\n",
" <tr>\n",
" <th>Third_Baseman</th>\n",
" <td>73.044444</td>\n",
" <td>200.955556</td>\n",
" <td>45</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" Height Weight Count\n",
"Role \n",
"Catcher 72.723684 204.328947 76\n",
"Designated_Hitter 74.222222 220.888889 18\n",
"First_Baseman 74.000000 213.109091 55\n",
"Outfielder 73.010309 199.113402 194\n",
"Relief_Pitcher 74.374603 203.517460 315\n",
"Second_Baseman 71.362069 184.344828 58\n",
"Shortstop 71.903846 182.923077 52\n",
"Starting_Pitcher 74.719457 205.163636 221\n",
"Third_Baseman 73.044444 200.955556 45"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df.groupby('Role').agg({ 'Height' : 'mean', 'Weight' : 'mean', 'Age' : 'count'}).rename(columns={ 'Age' : 'Count'})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's test the hypothesis that First Basemen are taller than Second Basemen. The simplest way to do this is to test the confidence intervals:"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Conf=0.85, 1st basemen height: 73.62..74.38, 2nd basemen height: 71.04..71.69\n",
"Conf=0.90, 1st basemen height: 73.56..74.44, 2nd basemen height: 70.99..71.73\n",
"Conf=0.95, 1st basemen height: 73.47..74.53, 2nd basemen height: 70.92..71.81\n"
]
}
],
"source": [
"for p in [0.85,0.9,0.95]:\n",
" m1, h1 = mean_confidence_interval(df.loc[df['Role']=='First_Baseman',['Height']],p)\n",
" m2, h2 = mean_confidence_interval(df.loc[df['Role']=='Second_Baseman',['Height']],p)\n",
" print(f'Conf={p:.2f}, 1st basemen height: {m1-h1[0]:.2f}..{m1+h1[0]:.2f}, 2nd basemen height: {m2-h2[0]:.2f}..{m2+h2[0]:.2f}')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see that the intervals do not overlap.\n",
"\n",
"A statistically more correct way to prove the hypothesis is to use a **Student t-test**:"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"T-value = 7.65\n",
"P-value: 9.137321189738925e-12\n"
]
}
],
"source": [
"from scipy.stats import ttest_ind\n",
"\n",
"tval, pval = ttest_ind(df.loc[df['Role']=='First_Baseman',['Height']], df.loc[df['Role']=='Second_Baseman',['Height']],equal_var=False)\n",
"print(f\"T-value = {tval[0]:.2f}\\nP-value: {pval[0]}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The two values returned by the `ttest_ind` function are:\n",
"* p-value can be considered as the probability of two distributions having the same mean. In our case, it is very low, meaning that there is strong evidence supporting that first basemen are taller.\n",
"* t-value is the intermediate value of normalized mean difference that is used in the t-test, and it is compared against a threshold value for a given confidence value."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Simulating a Normal Distribution with the Central Limit Theorem\n",
"\n",
"The pseudo-random generator in Python is designed to give us a uniform distribution. If we want to create a generator for normal distribution, we can use the central limit theorem. To get a normally distributed value we will just compute a mean of a uniform-generated sample."
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGoCAYAAABbtxOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAARLElEQVR4nO3df4zkd13H8ddblgbkR4DcghU4Fgghlj/4kbOIGFNDMEiNQIIJJGI1mFMjBJREL/yh/FnjryZGMRWQGn6FQPkRriqkkqCJEq9QQpuCIFQsXLg2KKAxIS0f/9g5eLfdc7fznd3v7O3jkUxu5rszO+/93Ox+n/e9mZ0aYwQAANj2A3MPAAAA60QgAwBAI5ABAKARyAAA0AhkAABoNg7yzo4dOza2trYO8i4BAGBHN910011jjM37bj/QQN7a2sqZM2cO8i4BAGBHVfXvO233FAsAAGgEMgAANAIZAAAagQwAAI1ABgCARiADAEAjkAEAoBHIAADQCGQAAGgEMgAANAIZAAAagQwAAI1ABgCARiADAEAjkAEAoBHIAADQCGQAAGg25h4AgAdm69TpuUeYxe1XXzn3CMAR4QgyAAA0AhkAABqBDAAAjUAGAIBGIAMAQCOQAQCgEcgAANAIZAAAaAQyAAA0AhkAABqBDAAAjUAGAIBGIAMAQCOQAQCgEcgAANAIZAAAaAQyAAA0AhkAABqBDAAAjUAGAIBGIAMAQCOQAQCgEcgAANAIZAAAaAQyAAA0AhkAABqBDAAAjUAGAIBGIAMAQCOQAQCg2TWQq+qJVfXxqrqtqm6tqtcttj+mqj5WVV9Y/Pno/R8XAAD2116OIN+d5A1jjB9J8mNJfqOqLktyKsmNY4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fwe+5wk09fymtjnnDdlLdd2vyOQp9nL221fk+R3xhj37PgJqh6e7aNPrx9jfGu14x0qS69lVf1sknNjjJv2abbDZMpjciPJc5K8eYzx7CT/k+QoP99zymPy0dk+gvLkJD+c5GFV9Qv7MeQhsZe1/FSSJ40xnpnkT5N88AHc9qiYso7bn8A+57yl19I+536mPC7Xdr+z9BuFkGRvb7d9Isl7qipJjiV5cVXdPcb4YFU9ONs/qN45xrj+IAZeY0uvZZLnJvm5qnpxkockeWRVvWOMcRSDZMo6/nOSO8YY548qvS9r8oNqJlPW8sFJvjzGuDNJqur6JD+e5B37PfSa2nUte6yNMW6oqj+vqmN7ue0RsvQ6jjHuss+5lymPyefHPqeb+v29nvuduZ8EfZhP2f4HxpeyfZTo/BPTn/H/XP/t+f6LeCrJXye5Zu6vYx1OU9byPtuvyBF+wcTUdUzyD0mevjj/piR/MPfXdBjXMtv/aLs12889rmy/COW1c39N67yWSX4o33/zqsuz/fSUeqB/DxfzaeI62uesaC3vc50jvc9ZxVqu637HEeQJxgXebruqfm3x8Qs+7zjb/wJ9VZLPVtXNi21vHGPcsJ8zr6uJa8nCCtbxtUneWVWXZPsH3i/v68BrbMpajjE+WVXvy/Z/K96d5NM5ZG+zukp7XMuXJ/n1xRH4/03yirG9x9zxtrN8ITObso5V9ROxz/meiY9JmhWs5Vrud7zVNAAANF6kBwAAjUAGAIBGIAMAQCOQAQCgEcgAANAIZAAAaAQyAAA0/wceFVFs3MY9ywAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"def normal_random(sample_size=100):\n",
" sample = [random.uniform(0,1) for _ in range(sample_size) ]\n",
" return sum(sample)/sample_size\n",
"\n",
"sample = [normal_random() for _ in range(100)]\n",
"plt.figure(figsize=(10,6))\n",
"plt.hist(sample)\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Correlation and Evil Baseball Corp\n",
"\n",
"Correlation allows us to find relations between data sequences. In our toy example, let's pretend there is an evil baseball corporation that pays its players according to their height - the taller the player is, the more money he/she gets. Suppose there is a base salary of $1000, and an additional bonus from $0 to $100, depending on height. We will take the real players from MLB, and compute their imaginary salaries:"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[(74, 1075.2469071629068), (74, 1075.2469071629068), (72, 1053.7477908306478), (72, 1053.7477908306478), (73, 1064.4973489967772), (69, 1021.4991163322591), (69, 1021.4991163322591), (71, 1042.9982326645181), (76, 1096.746023495166), (71, 1042.9982326645181)]\n"
]
}
],
"source": [
"heights = df['Height']\n",
"salaries = 1000+(heights-heights.min())/(heights.max()-heights.mean())*100\n",
"print(list(zip(heights, salaries))[:10])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's now compute covariance and correlation of those sequences. `np.cov` will give us a so-called **covariance matrix**, which is an extension of covariance to multiple variables. The element $M_{ij}$ of the covariance matrix $M$ is a correlation between input variables $X_i$ and $X_j$, and diagonal values $M_{ii}$ is the variance of $X_{i}$. Similarly, `np.corrcoef` will give us the **correlation matrix**."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Covariance matrix:\n",
"[[ 5.31679808 57.15323023]\n",
" [ 57.15323023 614.37197275]]\n",
"Covariance = 57.153230230544736\n",
"Correlation = 1.0\n"
]
}
],
"source": [
"print(f\"Covariance matrix:\\n{np.cov(heights, salaries)}\")\n",
"print(f\"Covariance = {np.cov(heights, salaries)[0,1]}\")\n",
"print(f\"Correlation = {np.corrcoef(heights, salaries)[0,1]}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A correlation equal to 1 means that there is a strong **linear relation** between two variables. We can visually see the linear relation by plotting one value against the other:"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"output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qRtP0LMZAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.scatter(heights,salaries)\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's see what happens if the relation is not linear. Suppose that our corporation decided to hide the obvious linear dependency between heights and salaries, and introduced some non-linearity into the formula, such as `sin`:"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Correlation = 0.9835304456670837\n"
]
}
],
"source": [
"salaries = 1000+np.sin((heights-heights.min())/(heights.max()-heights.mean()))*100\n",
"print(f\"Correlation = {np.corrcoef(heights, salaries)[0,1]}\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In this case, the correlation is slightly smaller, but it is still quite high. Now, to make the relation even less obvious, we might want to add some extra randomness by adding some random variable to the salary. Let's see what happens:"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Correlation = 0.9363097848296155\n"
]
}
],
"source": [
"salaries = 1000+np.sin((heights-heights.min())/(heights.max()-heights.mean()))*100+np.random.random(size=len(heights))*20-10\n",
"print(f\"Correlation = {np.corrcoef(heights, salaries)[0,1]}\")"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGoCAYAAABbtxOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAlY0lEQVR4nO3dcZTdZ3kn9u/jsUzGzqFjg02tMa4IdZQT44BiLThlt8su64p2E5h1IIsLB5+Wxrs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XpL39zGucdSdq6q6NIvtAv9Tv6MaX8t8bV2c5PIkNyXZm+QDVVU9DW/sLDNf3uuXGPQWvybJC5JsT3JZVb2x31GNr3PNl/f5sxOQx9exJMdaa58Z3P9gFgPzbUkeGNR+K4kLN870nyf5/dba1wb3v1ZVVyfJ4Navdc+0dL5SVbcl+ckkb2guUujqztULs/hD53NV9eUs/ory96vqP+xxfONm6dfWsSQPtEW/l+TpJC5s/L6l8+W9/pn+TpI/aa092Vo7mcX5+U/ifX6YYfPlfX4FBOQx1Vr70yRfraqdg9Irk/xRFvut/uag9reTPNLD8MbZrTmzXeDDWfxBk8Hth9Z9ROPtjPmqqlcleWuSV7fWvt3bqMbT6blqrR1prV3VWtvRWtuRxfD344PvWxYt/V6czeJ7Vqrqh5NcksRFjd+3dL681z/TY0luqqpLB799eGWSP473+WGWnS/v8ytjF4sxVlUvyeIV8pck+VKS/yrJ9Un+lyz+uvKvkvy3rbXP9jXGcTL4tfdXk/xQa+0bg9pzsrjzx7VZfLN4XWvtqf5GOT6GzNejSZ6V5M8HTzvYWvuHPQ1xbCw3V0se/3KS3XaxWDTka+uSJO9J8pIk303yS621T/Q2yDEyZL7+erzXP0NV/WqSv5/F1oDDSf6bJD8Y7/PLGjJfD8f7/DkJyAAA0KHFAgAAOgRkAADoEJABAKBDQAYAgA4BGQAAOgRkAADoEJABAKDj/wceBaX6Xh706QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.scatter(heights, salaries)\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"> Can you guess why the dots line up into vertical lines like this?\n",
"\n",
"We have observed the correlation between an artificially engineered concept like salary and the observed variable *height*. Let's also see if the two observed variables, such as height and weight, correlate too:"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[ 1., nan],\n",
" [nan, nan]])"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.corrcoef(df['Height'],df['Weight'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Unfortunately, we did not get any results - only some strange `nan` values. This is due to the fact that some of the values in our series are undefined, represented as `nan`, which causes the result of the operation to be undefined as well. By looking at the matrix we can see that `Weight` is the problematic column, because self-correlation between `Height` values has been computed.\n",
"\n",
"> This example shows the importance of **data preparation** and **cleaning**. Without proper data we cannot compute anything.\n",
"\n",
"Let's use `fillna` method to fill the missing values, and compute the correlation: "
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[1. , 0.52959196],\n",
" [0.52959196, 1. ]])"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.corrcoef(df['Height'],df['Weight'].fillna(method='pad'))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"There is indeed a correlation, but not such a strong one as in our artificial example. Indeed, if we look at the scatter plot of one value against the other, the relation would be much less obvious:"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAsgAAAGoCAYAAABbtxOxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABCr0lEQVR4nO3df3Td5XXn+8+2kEEQiKAxpBZ27XgcpTBOcavEppreUjpeYqA3aPk2Db7QlZnmktUObeqQqLWLV7NyF1x76lzSzGp714Um03TsOiGJR82MIa47Dp2Jr20qYhI1EA9QiI2cAq1jYIhijLzvH+cc+fz6SufYPt9nH533ay0tpK0f3jzne77aes7z7MfcXQAAAAAK5qVOAAAAAIiEAhkAAAAoQ4EMAAAAlK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3X6JCAfjTxecqap9/oyrco2Rm75Q0XxIbGguqx4r7eq0jklab2cXFVx5+UdJT4r5eT92x4r4+O7pYtCkzu06F3fLzJf29pH8j6VpJn1Hh5csfSfq37v54qhyjKL78fVTSO9z9lWLsx1To+rFYhRvI+939eLosY8gYq2ckXSjpn4pfdsDdfz1RiiHUG6eqzz8vaYAuFpnX1HxJn5N0naQ3JH3c3fcmSzKIjLH6F+K+XsPMPinpAyosDzgk6f+Q9BZxX6+RMVbfEff1GVEgAwAAAGVYYgEAAACUoUAGAAAAylAgAwAAAGUokAEAAIAyFMgAAABAGQpkAAjMzP5n1cf/2sz+aJbveZ+ZbZjla24ws/+S8bn1xZZjANCRKJABYI5x96+6+5Zz+BHrJVEgA+hYFMgA0KbMbIGZfcXM/rb4NliMT88ym9kyMztQ/Pz/WTUj/RYz+7KZfdfMtlvBRyQtlPR1M/t6gv8tAEjugtQJAABm1GNmT5R9fIUKR+pKhRPWPu3u3zCzxZJ2S/rJqu//jKTPuPsOM6s+KWulCidwHpO0T9Kgu/97M7tb0i9wEiCATkWBDACxTbr7daUPzOxfSxoofvgvJV1jZqVPX2Zml1Z9//WShovv/4WkT5V97jF3f6H4c5+QtETSN85b5gDQpiiQAaB9zZN0vbtPlgfLCubZnCx7f0r8TgAASaxBBoB29leSfrP0gZldV+drDkj634rv39bgz31NUvVMNAB0DApkAGhfH5E0YGbfNrMnJVWvMZYKHSnuNrPHJP24pFca+LkPSHqETXoAOpW5e+ocAAAtUuxnPOnubma3SVrn7remzgsAImO9GQDMbT8j6Y+ssDD5hKRfS5sOAMTHDDIAAABQhjXIAAAAQBkKZAAAAKAMBTIAAABQhgIZAAAAKEOBDAAAAJT5/wEF2g87zs/PPwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 720x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(10,6))\n",
"plt.scatter(df['Height'],df['Weight'])\n",
"plt.xlabel('Height')\n",
"plt.ylabel('Weight')\n",
"plt.tight_layout()\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Conclusion\n",
"\n",
"In this notebook we have learnt how to perform basic operations on data to compute statistical functions. We now know how to use a sound apparatus of math and statistics in order to prove some hypotheses, and how to compute confidence intervals for arbitrary variables given a data sample. "
]
}
],
"metadata": {
"interpreter": {
"hash": "86193a1ab0ba47eac1c69c1756090baa3b420b3eea7d4aafab8b85f8b312f0c5"
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.8.12"
}
},
"nbformat": 4,
"nbformat_minor": 4
}