{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Scientific Python Quickstart" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### [John Stachurski](http://johnstachurski.net/)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### ANU" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is a fast-paced, hands-on introduction to scientific computing with Python, contained in a [Jupyter](http://jupyter.org/) notebook. The main focus will be on introducing Python's four most important scientific libraries: NumPy, Scipy, Pandas and Matplotlib.\n", "\n", "If you don't know how to use this notebook you need to first work through [this page](http://quant-econ.net/py/getting_started.html).\n", "\n", "A slower, more detailed and more systematic treatment of Python for scientific applications can be found at [quant-econ.net](http://quant-econ.net/py/index.html). But this notebook is a good place to start for those who like to learn by doing." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here's some information on the version of Python that I'm using:" ] }, { "cell_type": "code", "execution_count": 241, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "3.5.1 |Anaconda 2.4.1 (64-bit)| (default, Dec 7 2015, 11:16:01) \n", "[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]\n" ] } ], "source": [ "import sys\n", "print(sys.version)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Basic NumPy" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Perhaps the single most important scientific library for Python is NumPy. NumPy provides foundational data structures and routines on which many other libraries rely." ] }, { "cell_type": "code", "execution_count": 242, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "1.10.2\n" ] } ], "source": [ "import numpy as np # Import library and give it alias np\n", "print(np.__version__) # The version I'm using" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "NumPy defines a basic data type called an array (actually a numpy.ndarray)" ] }, { "cell_type": "code", "execution_count": 243, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 0., 0., 0.])" ] }, "execution_count": 243, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = np.zeros(3) # Create an array of zeros\n", "a # Print a" ] }, { "cell_type": "code", "execution_count": 244, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "numpy.ndarray" ] }, "execution_count": 244, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(a)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that array data *must be homogeneous*\n", "\n", "The most important data types are:\n", "\n", "* float64: 64 bit floating point number\n", "* float32: 32 bit floating point number\n", "* int64: 64 bit integer\n", "* int32: 32 bit integer\n", "* bool: 8 bit True or False\n", "\n", "There are also dtypes to represent complex numbers, unsigned integers, etc\n", "\n", "On most machines, the default dtype for arrays is float64 \n", "\n", "\n" ] }, { "cell_type": "code", "execution_count": 245, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "numpy.float64" ] }, "execution_count": 245, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a = np.zeros(3)\n", "type(a[1])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "When we create an array such as \n" ] }, { "cell_type": "code", "execution_count": 246, "metadata": { "collapsed": false }, "outputs": [], "source": [ "z = np.zeros(10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "z is a \"flat\" array with no dimension--- neither row nor column vector:" ] }, { "cell_type": "code", "execution_count": 247, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "(10,)" ] }, "execution_count": 247, "metadata": {}, "output_type": "execute_result" } ], "source": [ " z.shape" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here the shape tuple has only one element, which is the length of the array (tuples with one element end with a comma)\n", "\n", "To give it dimension, we can change the shape attribute \n", "\n", "For example, let's make it a column vector" ] }, { "cell_type": "code", "execution_count": 248, "metadata": { "collapsed": false }, "outputs": [], "source": [ "z.shape = (10, 1)" ] }, { "cell_type": "code", "execution_count": 249, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.],\n", " [ 0.]])" ] }, "execution_count": 249, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z" ] }, { "cell_type": "code", "execution_count": 250, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 0., 0.],\n", " [ 0., 0.]])" ] }, "execution_count": 250, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.zeros(4)\n", "z.shape = (2, 2)\n", "z" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Creating arrays" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Creating empty arrays --- initializing memory:" ] }, { "cell_type": "code", "execution_count": 251, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 0., 0., 0.])" ] }, "execution_count": 251, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.empty(3)\n", "z" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "These are just garbage numbers --- whatever was in those memory slots\n", "\n", "Here's how to make a regular gird sequence" ] }, { "cell_type": "code", "execution_count": 252, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 2. , 2.5, 3. , 3.5, 4. ])" ] }, "execution_count": 252, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.linspace(2, 4, 5) # From 2 to 4, with 5 elements\n", "z" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Creating an array of ones" ] }, { "cell_type": "code", "execution_count": 253, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 1., 1., 1.])" ] }, "execution_count": 253, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.ones(3)\n", "z" ] }, { "cell_type": "code", "execution_count": 254, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 1., 0.],\n", " [ 0., 1.]])" ] }, "execution_count": 254, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.identity(2)\n", "z" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Arrays can be made from Python lists or tuples" ] }, { "cell_type": "code", "execution_count": 255, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([10, 20])" ] }, "execution_count": 255, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.array([10, 20]) \n", "z" ] }, { "cell_type": "code", "execution_count": 256, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 10., 20.])" ] }, "execution_count": 256, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.array((10, 20), dtype=float) \n", "z" ] }, { "cell_type": "code", "execution_count": 257, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[1, 2],\n", " [3, 4]])" ] }, "execution_count": 257, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.array([[1, 2], [3, 4]]) # 2D array from a list of lists\n", "z" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Array indexing" ] }, { "cell_type": "code", "execution_count": 258, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 1. , 1.25, 1.5 , 1.75, 2. ])" ] }, "execution_count": 258, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.linspace(1, 2, 5)\n", "z" ] }, { "cell_type": "code", "execution_count": 259, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1.0" ] }, "execution_count": 259, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[0] # First element --- Python sequences are zero based, like C, Java, etc." ] }, { "cell_type": "code", "execution_count": 260, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "2.0" ] }, "execution_count": 260, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[-1] # Special syntax for last element" ] }, { "cell_type": "code", "execution_count": 261, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 1. , 1.25])" ] }, "execution_count": 261, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[0:2] # Meaning: Two elements, starting from element 0" ] }, { "cell_type": "code", "execution_count": 262, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[1, 2],\n", " [3, 4]])" ] }, "execution_count": 262, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.array([[1, 2], [3, 4]])\n", "z" ] }, { "cell_type": "code", "execution_count": 263, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1" ] }, "execution_count": 263, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[0, 0]" ] }, { "cell_type": "code", "execution_count": 264, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([1, 2])" ] }, "execution_count": 264, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[0,:] # First row" ] }, { "cell_type": "code", "execution_count": 265, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([1, 3])" ] }, "execution_count": 265, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[:,0] # First column" ] }, { "cell_type": "code", "execution_count": 266, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 2. , 2.5, 3. , 3.5, 4. ])" ] }, "execution_count": 266, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.linspace(2, 4, 5)\n", "z" ] }, { "cell_type": "code", "execution_count": 267, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([False, True, True, False, False], dtype=bool)" ] }, "execution_count": 267, "metadata": {}, "output_type": "execute_result" } ], "source": [ "d = np.array([0, 1, 1, 0, 0], dtype=bool)\n", "d" ] }, { "cell_type": "code", "execution_count": 268, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 2.5, 3. ])" ] }, "execution_count": 268, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[d]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Array methods" ] }, { "cell_type": "code", "execution_count": 269, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([4, 3, 2, 1])" ] }, "execution_count": 269, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A = np.array((4, 3, 2, 1))\n", "A" ] }, { "cell_type": "code", "execution_count": 270, "metadata": { "collapsed": false }, "outputs": [], "source": [ "A.sort()" ] }, { "cell_type": "code", "execution_count": 271, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([1, 2, 3, 4])" ] }, "execution_count": 271, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A" ] }, { "cell_type": "code", "execution_count": 272, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "2.5" ] }, "execution_count": 272, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.mean()" ] }, { "cell_type": "code", "execution_count": 273, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "10" ] }, "execution_count": 273, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.sum()" ] }, { "cell_type": "code", "execution_count": 274, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "4" ] }, "execution_count": 274, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.max()" ] }, { "cell_type": "code", "execution_count": 275, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 1, 3, 6, 10])" ] }, "execution_count": 275, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.cumsum()" ] }, { "cell_type": "code", "execution_count": 276, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "1.25" ] }, "execution_count": 276, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.var()" ] }, { "cell_type": "code", "execution_count": 277, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[1, 2],\n", " [3, 4]])" ] }, "execution_count": 277, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.shape = (2, 2)\n", "A" ] }, { "cell_type": "code", "execution_count": 278, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[1, 3],\n", " [2, 4]])" ] }, "execution_count": 278, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A.T # Transpose, equivalent to A.transpose()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Operations on arrays" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Standard arithmetic operations on arrays act elementwise" ] }, { "cell_type": "code", "execution_count": 279, "metadata": { "collapsed": false }, "outputs": [], "source": [ "a = np.array([1, 2, 3, 4])\n", "b = np.array([5, 6, 7, 8])" ] }, { "cell_type": "code", "execution_count": 280, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 6, 8, 10, 12])" ] }, "execution_count": 280, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a + b" ] }, { "cell_type": "code", "execution_count": 281, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([-4, -4, -4, -4])" ] }, "execution_count": 281, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a - b" ] }, { "cell_type": "code", "execution_count": 282, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([11, 12, 13, 14])" ] }, "execution_count": 282, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a + 10" ] }, { "cell_type": "code", "execution_count": 283, "metadata": { "collapsed": false }, "outputs": [], "source": [ "a.shape = 2, 2\n", "b.shape = 2, 2" ] }, { "cell_type": "code", "execution_count": 284, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[1, 2],\n", " [3, 4]])" ] }, "execution_count": 284, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a" ] }, { "cell_type": "code", "execution_count": 285, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[5, 6],\n", " [7, 8]])" ] }, "execution_count": 285, "metadata": {}, "output_type": "execute_result" } ], "source": [ "b" ] }, { "cell_type": "code", "execution_count": 286, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 5, 12],\n", " [21, 32]])" ] }, "execution_count": 286, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a * b # Pointwise multiplication!!" ] }, { "cell_type": "code", "execution_count": 287, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[19, 22],\n", " [43, 50]])" ] }, "execution_count": 287, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.dot(a, b) # Matrix multiplication" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For Python $\\geq 3.5$ and NumPy $\\geq 1.1$ the @ operator also works." ] }, { "cell_type": "code", "execution_count": 288, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[19, 22],\n", " [43, 50]])" ] }, "execution_count": 288, "metadata": {}, "output_type": "execute_result" } ], "source": [ "a @ b" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "I'll continue to use np.dot below for the benefit of those who are using older versions. But in my opinion the @ operator is much nicer." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Comparisons" ] }, { "cell_type": "code", "execution_count": 289, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ True, True], dtype=bool)" ] }, "execution_count": 289, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.array([2, 3])\n", "y = np.array([2, 3])\n", "z == y" ] }, { "cell_type": "code", "execution_count": 290, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([False, True], dtype=bool)" ] }, "execution_count": 290, "metadata": {}, "output_type": "execute_result" } ], "source": [ "y[0] = 3\n", "z == y" ] }, { "cell_type": "code", "execution_count": 291, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 0. , 2.5, 5. , 7.5, 10. ])" ] }, "execution_count": 291, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z = np.linspace(0, 10, 5)\n", "z" ] }, { "cell_type": "code", "execution_count": 292, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([False, False, True, True, True], dtype=bool)" ] }, "execution_count": 292, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z > 3" ] }, { "cell_type": "code", "execution_count": 293, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([ 5. , 7.5, 10. ])" ] }, "execution_count": 293, "metadata": {}, "output_type": "execute_result" } ], "source": [ "z[z > 3] # Conditional extraction" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Matplotlib" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Matplotlib is an outstanding plotting and visualization library for Python that interacts nicely with NumPy. Here are a few quick examples. We'll see more below when we discuss the SciPy library." ] }, { "cell_type": "code", "execution_count": 294, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import matplotlib.pyplot as plt # Import main functionality" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Display figures in this browser window rather than having them open up separately:" ] }, { "cell_type": "code", "execution_count": 295, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create something to plot" ] }, { "cell_type": "code", "execution_count": 296, "metadata": { "collapsed": false }, "outputs": [], "source": [ "x = np.linspace(-2, 2, 100)\n", "y = x**2" ] }, { "cell_type": "code", "execution_count": 297, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 297, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl81NXVx/HPwQAuKBYXUBE3cIMqisomklpbQQu2T7X6\naEVwAa1bXVvU1rTWitCnKiCigChWK9QFN3CpEsFaKQViVUBBcQEE9wUQWXKfP86gaUjIJLPcWb7v\n12teTjI/fnP8Ec7c3N+551oIARERKUyNYgcgIiKZoyQvIlLAlORFRAqYkryISAFTkhcRKWBK8iIi\nBSzpJG9mjcxsjpk9Wsvrw81soZlVmFnH9IUoIiINVZ+R/MXAvJpeMLPewD4hhHb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NVsBlY9pFq+nwvX81Gg\nf+L5GcAmP6yRrmcy1+ZRoF8irloX9mVYnXFWnYc1syPwcugYCd6o/WcxF67lRrXGmUPXEuBOYF4I\n4ZZaXq//Nc3w3eKFwDvAnMRjVOL7uwCPVzmuF34neSHw6wh3tX+Mz3N9ha/qnVo9TmAvvMphLvBK\nrsaZI9ezBfD3RAxPA9vnyvWs6drg7bEHVjlmJF7d8jKbqbaKGSe+wvzVxPV7EegcIcb7gGXA18C7\n+CLIXLyWm40zF65lIo7uwIYq/y7mJH4OUrqmWgwlIlLAtP2fiEgBU5IXESlgSvIiIgVMSV5EpIAp\nyYuIFDAleRGRAqYkLyJSwJTkRUQK2P8DfbjLt0rrzfQAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig, ax = plt.subplots() # Create axes and figure window\n", "ax.plot(x, y, 'b-')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here's a slightly more complex plot" ] }, { "cell_type": "code", "execution_count": 298, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 298, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEACAYAAABI5zaHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+x/HXd4YBAVncERWy3E0tFypNJdO0NG2zfbtt\n19ty08r0pqW2WrZoZb9bt67t95YttljmFpZ6Tc1dVCxF0UQEFET2me/vjy+4JQjMMGdm+Dwfj3k4\nZ+ZwzscDvDnzPd/z/SqtNUIIIQKLzeoChBBCeJ6EuxBCBCAJdyGECEAS7kIIEYAk3IUQIgBJuAsh\nRADySLgrpcYopTYppTYopT5SSgV7YrtCCCFqxu1wV0rFAg8A3bXWXYEg4Hp3tyuEEKLmgjy0HTsQ\nrpRyAWHAHx7arhBCiBpw+8xda/0H8BKwG9gLHNJaL3R3u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9aU/RzU+JjKTUxCCBGAZBJTIYQIQBLuQggRgCTc\nhRAiAEm4CyFEAJJwF0KIACThLoQQAUjCXQghApCEuxBCBKD/B8YkGFJQRnIZAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "y3 = x**3\n", "fig, ax = plt.subplots() # Create axes and figure window\n", "ax.plot(x, y, 'b-', lw=2, alpha=0.8, label='$x^2$')\n", "ax.plot(x, y3, 'g-', lw=2, alpha=0.8, label='$x^3$')\n", "ax.legend(loc='lower right')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## SciPy" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's just cover some simple examples --- references for further reading are below" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Statistics and distributions" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's use scipy.stats to generate some data from the Beta distribution" ] }, { "cell_type": "code", "execution_count": 299, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from scipy.stats import beta\n", "q = beta(5, 5) # Beta(a, b), with a = b = 5\n", "obs = q.rvs(2000) # 2000 observations" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let's histogram it and compare it to the original density" ] }, { "cell_type": "code", "execution_count": 300, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 300, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VNX9//HXB0LYRRYlKkoAWSqiqKj4hdbgVlxa1/K1\nal3rrlWpuNKCS1UK3xZti3zxq/SnQJUqrdDigkoqVsAFUFpIURQQiqmACCQBspzfH/dmIZlJJsnM\n3Jk77+fjMQ/mzj13zoch98MnZ84915xziIhIOLUIOgAREUkcJXkRkRBTkhcRCTEleRGREFOSFxEJ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243sNvM3sa7uUHYknwsn8VVwKMAzrm1ZvY5MAD4\nICkRpo4m5c1EDNdUXTxlZtl4F0/VPknnApdD1RW1ES+eCoEGPwszOwx4CfiRc25tADEmS4OfhXOu\nt//ohTcuf1MIEzzEdo68DAw3s5Zm1g7vi7bVSY4zGWL5LNbjLUCFPwbdD/gsqVEmjxH9N9gm5c24\nV/JOF09VieWzAH4GdAGm+BVsqXOu9gJwaS/Gz2KfQ5IeZJLEeI4UmNlrwMdAOTDNObcqwLATIsaf\ni4eB39eYWniXcy7aioRpy8xmAXlAVzPbAIwDsmlm3tTFUCIiIZbx93gVEQkzJXkRkRBTkhcRCTEl\neRGREFOSFxEJMSV5EZEQU5IXEQkxJXkRkRD7/7SF/GXzT/bOAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig, ax = plt.subplots()\n", "ax.hist(obs, bins=40, normed=True)\n", "grid = np.linspace(0.01, 0.99, 100)\n", "ax.plot(grid, q.pdf(grid), 'k-', linewidth=2)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Other methods" ] }, { "cell_type": "code", "execution_count": 301, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "scipy.stats._distn_infrastructure.rv_frozen" ] }, "execution_count": 301, "metadata": {}, "output_type": "execute_result" } ], "source": [ "type(q)" ] }, { "cell_type": "code", "execution_count": 302, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "['__class__',\n", " '__delattr__',\n", " '__dict__',\n", " '__dir__',\n", " '__doc__',\n", " '__eq__',\n", " '__format__',\n", " '__ge__',\n", " '__getattribute__',\n", " '__gt__',\n", " '__hash__',\n", " '__init__',\n", " '__le__',\n", " '__lt__',\n", " '__module__',\n", " '__ne__',\n", " '__new__',\n", " '__reduce__',\n", " '__reduce_ex__',\n", " '__repr__',\n", " '__setattr__',\n", " '__sizeof__',\n", " '__str__',\n", " '__subclasshook__',\n", " '__weakref__',\n", " 'a',\n", " 'args',\n", " 'b',\n", " 'cdf',\n", " 'dist',\n", " 'entropy',\n", " 'expect',\n", " 'interval',\n", " 'isf',\n", " 'kwds',\n", " 'logcdf',\n", " 'logpdf',\n", " 'logpmf',\n", " 'logsf',\n", " 'mean',\n", " 'median',\n", " 'moment',\n", " 'pdf',\n", " 'pmf',\n", " 'ppf',\n", " 'random_state',\n", " 'rvs',\n", " 'sf',\n", " 'stats',\n", " 'std',\n", " 'var']" ] }, "execution_count": 302, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dir(q) # Let's see all its methods" ] }, { "cell_type": "code", "execution_count": 303, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.50000000000000011" ] }, "execution_count": 303, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q.cdf(0.5)" ] }, { "cell_type": "code", "execution_count": 304, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "2.4609375000000009" ] }, "execution_count": 304, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q.pdf(0.5)" ] }, { "cell_type": "code", "execution_count": 305, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.5" ] }, "execution_count": 305, "metadata": {}, "output_type": "execute_result" } ], "source": [ "q.mean()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Basic linear regression:" ] }, { "cell_type": "code", "execution_count": 306, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "gradient = 1.874172371477785\n", "intercept = 1.4035329152756753\n" ] } ], "source": [ "from scipy.stats import linregress\n", "n = 100\n", "alpha, beta, sigma = 1, 2, 1.5\n", "x = np.random.randn(n) # n standard normals\n", "y = alpha + beta * x + sigma * np.random.randn(n)\n", "beta_hat, alpha_hat, r_value, p_value, std_err = linregress(x, y)\n", "print(\"gradient = {}\".format(beta_hat))\n", "print(\"intercept = {}\".format(alpha_hat))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's plot this with data and line of best fit" ] }, { "cell_type": "code", "execution_count": 307, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 307, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeIAAAE4CAYAAACHTPDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3XlY1Oe5+P/3h012BUUihMUlGmNdMDFRs7hm0RC3KDBD\n0pq0OVfbJK3GfpvtZD2JycmpiW3TNr8sp216mAGicSdqXCCLGKOJW6y7DCqKKCq7IPP8/kAQDMsH\nmJ37dV1elwPDZ565GeaeZ7sfTSmFEEIIIZzDy9kNEEIIIboyScRCCCGEE0kiFkIIIZxIErEQQgjh\nRJKIhRBCCCeSRCyEEEI4ke5ErGnaR5qmFWqatrvR18I0TVuvadoBTdPWaZrW3T7NFEIIITxTe3rE\nfwfuveZrzwAblFKDgE3As7ZqmBBCCNEVaO0p6KFpWhywSik17Mrt/cA4pVShpmnXAdlKqRvt01Qh\nhBDC83R2jri3UqoQQCl1Gujd+SYJIYQQXYetF2tJvUwhhBCiHXw6+fOFmqZFNhqaPtPSHTVNkyQt\nhBCiS1FKaW3dp709Yu3Kv3orgblX/v8zYEUbDZJ/bfx76aWXnN4Gd/knsZI4SawkTq78T6/2bF8y\nAVuAgZqm5Wua9gjwJnC3pmkHgElXbotOyMvLc3YT3IbESh+Jk34SK30kTrale2haKWVs4VuTbdQW\nIYQQosuRylouZu7cuc5ugtuQWOkjcdJPYqWPxMm22rWPuFMPpGnKUY8lhBBCOJumaSg7LNayufj4\neDRNk38e/C8+Pt4ur53s7Gy7XNfTSJz0k1jpI3Gyrc5uX+o0i8XSrtVlwv1oWpsfCIUQosty+tD0\nla67Q9ognEN+x0KIrshthqaFEEKIrkwSsXBbMk+lj8RJP4mVPhIn25JE3EGPPPIIL774orOb0W4/\n+clP+OKLL5zdDCGEEFe47ByxUor8/HwAYmNjO7TgxxbXaMkjjzxCT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wBPRExBfzVlUutTd1j1F90/14RPgzwy8iqRvo\nAD4KnAYejognsxZVUpI+A+wHeqnefBTAQxHxTNbCSkbSfOCnVP/fTQG2RcR3x93fC3qYmZnl0/C7\nps3MzOz/3IjNzMwyciM2MzPLyI3YzMwsIzdiMzOzjNyIzczMMnIjNjMzy8iN2MzMLKP/AcJWeH4U\nSpZvAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig, ax = plt.subplots(figsize=(8, 5))\n", "ax.plot(x, y, 'bo', alpha=0.6, label='observations')\n", "xgrid = np.linspace(-3, 3, 2)\n", "ax.plot(xgrid, alpha_hat + beta_hat * xgrid, 'k-', lw=2, alpha=0.8, label='best fit')\n", "ax.grid()\n", "ax.legend(loc='upper left')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Roots and fixed points" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's choose an arbitrary function to work with" ] }, { "cell_type": "code", "execution_count": 308, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[]" ] }, "execution_count": 308, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEACAYAAABVtcpZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHTVJREFUeJzt3XmYFNW9//H3FxAVCKgYERFwu4ob7oBbaJcoqBFvxAUU\no0avVx+NVxO3J/5kEjVqNCruYnDBiKDiwuYCwoC4ALIIsiiiyKISRUcEQWea7++PMziTkWGWrunq\n7vq8nqcfe6mp+lLO1KfrnDqnzN0REZFkahR3ASIiEh+FgIhIgikEREQSTCEgIpJgCgERkQRTCIiI\nJFgkIWBmg8xshZnNrubz7mZWYmYzyh/XR7FdERHJTJOI1vMYcC8weBPLTHL3kyPanoiIRCCSMwF3\nnwx8U8NiFsW2REQkOtnsEzjUzGaZ2Wgz2yuL2xURkWpE1RxUk+lAB3f/3sx6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ltfwbWWBmrwKzgTQw0N3nxVh2g6jl\n78VNwOOVLpu82t2/jqnkBmVmQ4AU0NrMlgD9gaZkcOzUYDERkQTT7SVFRBJMISAikmAKARGRBFMI\niIgkmEJARCTBFAIiIgmmEBARSTCFgIhIgv1/sOpWjlZiZ4UAAAAASUVORK5CYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig, ax = plt.subplots()\n", "def f(x):\n", " return np.sin(4 * (x - 0.25)) + x + x**20 - 1\n", "x = np.linspace(0, 1, 100)\n", "ax.plot(x, f(x))\n", "ax.plot(x, 0 * x)" ] }, { "cell_type": "code", "execution_count": 309, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.4082935042797544" ] }, "execution_count": 309, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from scipy.optimize import bisect # Bisection algorithm --- slow but robust\n", "bisect(f, 0, 1)" ] }, { "cell_type": "code", "execution_count": 310, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.40829350427935679" ] }, "execution_count": 310, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from scipy.optimize import newton # Newton's method --- fast but less robust\n", "newton(f, 0.2) # Start the search at initial condition x = 0.2" ] }, { "cell_type": "code", "execution_count": 311, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.70017000000002816" ] }, "execution_count": 311, "metadata": {}, "output_type": "execute_result" } ], "source": [ "newton(f, 0.7) # Start the search at x = 0.7 instead " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here we see that the algorithm gets it wrong --- newton is fast but not robust\n", "\n", "Let's try a hybrid method" ] }, { "cell_type": "code", "execution_count": 312, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.40829350427936706" ] }, "execution_count": 312, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from scipy.optimize import brentq\n", "brentq(f, 0, 1) # Hybrid method" ] }, { "cell_type": "code", "execution_count": 313, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "10000 loops, best of 3: 64.7 Âµs per loop\n" ] } ], "source": [ "timeit bisect(f, 0, 1)" ] }, { "cell_type": "code", "execution_count": 314, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "100000 loops, best of 3: 14.2 Âµs per loop\n" ] } ], "source": [ "timeit newton(f, 0.2)" ] }, { "cell_type": "code", "execution_count": 315, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "100000 loops, best of 3: 16.1 Âµs per loop\n" ] } ], "source": [ "timeit brentq(f, 0, 1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that the hybrid method is robust but still quite fast..." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Numerical optimization and integration" ] }, { "cell_type": "code", "execution_count": 316, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.0" ] }, "execution_count": 316, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from scipy.optimize import fminbound\n", "fminbound(lambda x: x**2, -1, 2) # Search in [-1, 2]" ] }, { "cell_type": "code", "execution_count": 317, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.33333333333333337" ] }, "execution_count": 317, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from scipy.integrate import quad\n", "integral, error = quad(lambda x: x**2, 0, 1)\n", "integral" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Linear Algebra" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's look at some of the most common routines from linear and matrix algebra" ] }, { "cell_type": "code", "execution_count": 318, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import scipy.linalg as la" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We'll experiment with matrices\n", "\n", "$$\n", " A = \\begin{bmatrix} 2 & -1 \\\\ 3 & 0 \\end{bmatrix} \n", " \\quad \\text{and} \\quad\n", " b = \\begin{bmatrix} 1 \\\\ 1 \\end{bmatrix}\n", "$$" ] }, { "cell_type": "code", "execution_count": 319, "metadata": { "collapsed": false }, "outputs": [], "source": [ "A = [[2, -1],\n", " [3, 0]]\n", "A = np.array(A) # Convert from list to NumPy array\n", "b = np.ones((2, 1)) # Shape is 2 x 1" ] }, { "cell_type": "code", "execution_count": 320, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 2, -1],\n", " [ 3, 0]])" ] }, "execution_count": 320, "metadata": {}, "output_type": "execute_result" } ], "source": [ "A" ] }, { "cell_type": "code", "execution_count": 321, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 1.],\n", " [ 1.]])" ] }, "execution_count": 321, "metadata": {}, "output_type": "execute_result" } ], "source": [ "b" ] }, { "cell_type": "code", "execution_count": 322, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[[ 0.33333333]\n", " [-0.33333333]]\n" ] } ], "source": [ "x = la.solve(A, b) # Solve for x in Ax = b\n", "print(x)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's check that $Ax = b$" ] }, { "cell_type": "code", "execution_count": 323, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 1.],\n", " [ 1.]])" ] }, "execution_count": 323, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.dot(A, x)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can also invert directly" ] }, { "cell_type": "code", "execution_count": 324, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 0. , 0.33333333],\n", " [-1. , 0.66666667]])" ] }, "execution_count": 324, "metadata": {}, "output_type": "execute_result" } ], "source": [ "la.inv(A)" ] }, { "cell_type": "code", "execution_count": 325, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "array([[ 1., 0.],\n", " [ 0., 1.]])" ] }, "execution_count": 325, "metadata": {}, "output_type": "execute_result" } ], "source": [ "np.dot(A, la.inv(A)) # Should be the identity" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's compute the eigenvalues and eigenvectors" ] }, { "cell_type": "code", "execution_count": 326, "metadata": { "collapsed": false }, "outputs": [], "source": [ "eigvals, eigvecs = la.eig(A)" ] }, { "cell_type": "code", "execution_count": 327, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "eigenvalues = [ 1.+1.41421356j 1.-1.41421356j]\n" ] } ], "source": [ "print(\"eigenvalues = {}\".format(eigvals))" ] }, { "cell_type": "code", "execution_count": 328, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "first eigenvector = [ 0.28867513+0.40824829j 0.86602540+0.j ]\n" ] } ], "source": [ "print(\"first eigenvector = {}\".format(eigvecs[:, 0]))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### More information" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "* linear algebra: http://docs.scipy.org/doc/scipy/reference/linalg.html\n", "* numerical integration: http://docs.scipy.org/doc/scipy/reference/integrate.html\n", "* interpolation: http://docs.scipy.org/doc/scipy/reference/interpolate.html\n", "* optimization: http://docs.scipy.org/doc/scipy/reference/optimize.html\n", "* distributions and random number generation: http://docs.scipy.org/doc/scipy/reference/stats.html\n", "* signal processing: http://docs.scipy.org/doc/scipy/reference/signal.html\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Pandas" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Pandas is a very popular library for working with data sets. In pandas, data is held in a dataframe, which is kind of like a spread sheet" ] }, { "cell_type": "code", "execution_count": 329, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pandas as pd" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's start by writing a test data set to the present working directory, so we can read it back in as a dataframe using pandas. We use an IPython magic to write the data from a cell to a file:" ] }, { "cell_type": "code", "execution_count": 330, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Overwriting test_data.csv\n" ] } ], "source": [ "%%file test_data.csv\n", "\"country\",\"country isocode\",\"year\",\"POP\",\"XRAT\",\"tcgdp\",\"cc\",\"cg\"\n", "\"Argentina\",\"ARG\",\"2000\",\"37335.653\",\"0.9995\",\"295072.21869\",\"75.716805379\",\"5.5788042896\"\n", "\"Australia\",\"AUS\",\"2000\",\"19053.186\",\"1.72483\",\"541804.6521\",\"67.759025993\",\"6.7200975332\"\n", "\"India\",\"IND\",\"2000\",\"1006300.297\",\"44.9416\",\"1728144.3748\",\"64.575551328\",\"14.072205773\"\n", "\"Israel\",\"ISR\",\"2000\",\"6114.57\",\"4.07733\",\"129253.89423\",\"64.436450847\",\"10.266688415\"\n", "\"Malawi\",\"MWI\",\"2000\",\"11801.505\",\"59.543808333\",\"5026.2217836\",\"74.707624181\",\"11.658954494\"\n", "\"South Africa\",\"ZAF\",\"2000\",\"45064.098\",\"6.93983\",\"227242.36949\",\"72.718710427\",\"5.7265463933\"\n", "\"United States\",\"USA\",\"2000\",\"282171.957\",\"1\",\"9898700\",\"72.347054303\",\"6.0324539789\"\n", "\"Uruguay\",\"URY\",\"2000\",\"3219.793\",\"12.099591667\",\"25255.961693\",\"78.978740282\",\"5.108067988\"" ] }, { "cell_type": "code", "execution_count": 331, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "./test_data.csv\r\n" ] } ], "source": [ "%ls ./*.csv # Check it's there" ] }, { "cell_type": "code", "execution_count": 332, "metadata": { "collapsed": false }, "outputs": [], "source": [ "df = pd.read_csv('./test_data.csv')" ] }, { "cell_type": "code", "execution_count": 333, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
countrycountry isocodeyearPOPXRATtcgdpcccg
0ArgentinaARG200037335.6530.999500295072.21869075.7168055.578804
1AustraliaAUS200019053.1861.724830541804.65210067.7590266.720098
2IndiaIND20001006300.29744.9416001728144.37480064.57555114.072206
3IsraelISR20006114.5704.077330129253.89423064.43645110.266688
4MalawiMWI200011801.50559.5438085026.22178474.70762411.658954
5South AfricaZAF200045064.0986.939830227242.36949072.7187105.726546
6United StatesUSA2000282171.9571.0000009898700.00000072.3470546.032454
7UruguayURY20003219.79312.09959225255.96169378.9787405.108068
\n", "
" ], "text/plain": [ " country country isocode year POP XRAT \\\n", "0 Argentina ARG 2000 37335.653 0.999500 \n", "1 Australia AUS 2000 19053.186 1.724830 \n", "2 India IND 2000 1006300.297 44.941600 \n", "3 Israel ISR 2000 6114.570 4.077330 \n", "4 Malawi MWI 2000 11801.505 59.543808 \n", "5 South Africa ZAF 2000 45064.098 6.939830 \n", "6 United States USA 2000 282171.957 1.000000 \n", "7 Uruguay URY 2000 3219.793 12.099592 \n", "\n", " tcgdp cc cg \n", "0 295072.218690 75.716805 5.578804 \n", "1 541804.652100 67.759026 6.720098 \n", "2 1728144.374800 64.575551 14.072206 \n", "3 129253.894230 64.436451 10.266688 \n", "4 5026.221784 74.707624 11.658954 \n", "5 227242.369490 72.718710 5.726546 \n", "6 9898700.000000 72.347054 6.032454 \n", "7 25255.961693 78.978740 5.108068 " ] }, "execution_count": 333, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's try that again but this time using the country as the index column" ] }, { "cell_type": "code", "execution_count": 334, "metadata": { "collapsed": false }, "outputs": [], "source": [ "df = pd.read_csv('./test_data.csv', index_col='country')" ] }, { "cell_type": "code", "execution_count": 335, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
country isocodeyearPOPXRATtcgdpcccg
country
ArgentinaARG200037335.6530.999500295072.21869075.7168055.578804
AustraliaAUS200019053.1861.724830541804.65210067.7590266.720098
IndiaIND20001006300.29744.9416001728144.37480064.57555114.072206
IsraelISR20006114.5704.077330129253.89423064.43645110.266688
MalawiMWI200011801.50559.5438085026.22178474.70762411.658954
South AfricaZAF200045064.0986.939830227242.36949072.7187105.726546
United StatesUSA2000282171.9571.0000009898700.00000072.3470546.032454
UruguayURY20003219.79312.09959225255.96169378.9787405.108068
\n", "
" ], "text/plain": [ " country isocode year POP XRAT tcgdp \\\n", "country \n", "Argentina ARG 2000 37335.653 0.999500 295072.218690 \n", "Australia AUS 2000 19053.186 1.724830 541804.652100 \n", "India IND 2000 1006300.297 44.941600 1728144.374800 \n", "Israel ISR 2000 6114.570 4.077330 129253.894230 \n", "Malawi MWI 2000 11801.505 59.543808 5026.221784 \n", "South Africa ZAF 2000 45064.098 6.939830 227242.369490 \n", "United States USA 2000 282171.957 1.000000 9898700.000000 \n", "Uruguay URY 2000 3219.793 12.099592 25255.961693 \n", "\n", " cc cg \n", "country \n", "Argentina 75.716805 5.578804 \n", "Australia 67.759026 6.720098 \n", "India 64.575551 14.072206 \n", "Israel 64.436451 10.266688 \n", "Malawi 74.707624 11.658954 \n", "South Africa 72.718710 5.726546 \n", "United States 72.347054 6.032454 \n", "Uruguay 78.978740 5.108068 " ] }, "execution_count": 335, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's drop the year since it's not very informative" ] }, { "cell_type": "code", "execution_count": 336, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
country isocodePOPXRATtcgdpcccg
country
ArgentinaARG37335.6530.999500295072.21869075.7168055.578804
AustraliaAUS19053.1861.724830541804.65210067.7590266.720098
IndiaIND1006300.29744.9416001728144.37480064.57555114.072206
IsraelISR6114.5704.077330129253.89423064.43645110.266688
MalawiMWI11801.50559.5438085026.22178474.70762411.658954
South AfricaZAF45064.0986.939830227242.36949072.7187105.726546
United StatesUSA282171.9571.0000009898700.00000072.3470546.032454
UruguayURY3219.79312.09959225255.96169378.9787405.108068
\n", "
" ], "text/plain": [ " country isocode POP XRAT tcgdp \\\n", "country \n", "Argentina ARG 37335.653 0.999500 295072.218690 \n", "Australia AUS 19053.186 1.724830 541804.652100 \n", "India IND 1006300.297 44.941600 1728144.374800 \n", "Israel ISR 6114.570 4.077330 129253.894230 \n", "Malawi MWI 11801.505 59.543808 5026.221784 \n", "South Africa ZAF 45064.098 6.939830 227242.369490 \n", "United States USA 282171.957 1.000000 9898700.000000 \n", "Uruguay URY 3219.793 12.099592 25255.961693 \n", "\n", " cc cg \n", "country \n", "Argentina 75.716805 5.578804 \n", "Australia 67.759026 6.720098 \n", "India 64.575551 14.072206 \n", "Israel 64.436451 10.266688 \n", "Malawi 74.707624 11.658954 \n", "South Africa 72.718710 5.726546 \n", "United States 72.347054 6.032454 \n", "Uruguay 78.978740 5.108068 " ] }, "execution_count": 336, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df.drop(['year'], axis=1, inplace=True)\n", "df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's add a column for GDP per capita" ] }, { "cell_type": "code", "execution_count": 337, "metadata": { "collapsed": false }, "outputs": [], "source": [ "df['GDP percap'] = df['tcgdp'] / df['POP']" ] }, { "cell_type": "code", "execution_count": 338, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
country isocodePOPXRATtcgdpcccgGDP percap
country
ArgentinaARG37335.6530.999500295072.21869075.7168055.5788047.903229
AustraliaAUS19053.1861.724830541804.65210067.7590266.72009828.436433
IndiaIND1006300.29744.9416001728144.37480064.57555114.0722061.717325
IsraelISR6114.5704.077330129253.89423064.43645110.26668821.138673
MalawiMWI11801.50559.5438085026.22178474.70762411.6589540.425897
South AfricaZAF45064.0986.939830227242.36949072.7187105.7265465.042648
United StatesUSA282171.9571.0000009898700.00000072.3470546.03245435.080382
UruguayURY3219.79312.09959225255.96169378.9787405.1080687.843971
\n", "
" ], "text/plain": [ " country isocode POP XRAT tcgdp \\\n", "country \n", "Argentina ARG 37335.653 0.999500 295072.218690 \n", "Australia AUS 19053.186 1.724830 541804.652100 \n", "India IND 1006300.297 44.941600 1728144.374800 \n", "Israel ISR 6114.570 4.077330 129253.894230 \n", "Malawi MWI 11801.505 59.543808 5026.221784 \n", "South Africa ZAF 45064.098 6.939830 227242.369490 \n", "United States USA 282171.957 1.000000 9898700.000000 \n", "Uruguay URY 3219.793 12.099592 25255.961693 \n", "\n", " cc cg GDP percap \n", "country \n", "Argentina 75.716805 5.578804 7.903229 \n", "Australia 67.759026 6.720098 28.436433 \n", "India 64.575551 14.072206 1.717325 \n", "Israel 64.436451 10.266688 21.138673 \n", "Malawi 74.707624 11.658954 0.425897 \n", "South Africa 72.718710 5.726546 5.042648 \n", "United States 72.347054 6.032454 35.080382 \n", "Uruguay 78.978740 5.108068 7.843971 " ] }, "execution_count": 338, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's sort the whole data frame by GDP per capita" ] }, { "cell_type": "code", "execution_count": 339, "metadata": { "collapsed": false }, "outputs": [], "source": [ "df.sort_values(by='GDP percap', inplace=True)" ] }, { "cell_type": "code", "execution_count": 340, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
country isocodePOPXRATtcgdpcccgGDP percap
country
MalawiMWI11801.50559.5438085026.22178474.70762411.6589540.425897
IndiaIND1006300.29744.9416001728144.37480064.57555114.0722061.717325
South AfricaZAF45064.0986.939830227242.36949072.7187105.7265465.042648
UruguayURY3219.79312.09959225255.96169378.9787405.1080687.843971
ArgentinaARG37335.6530.999500295072.21869075.7168055.5788047.903229
IsraelISR6114.5704.077330129253.89423064.43645110.26668821.138673
AustraliaAUS19053.1861.724830541804.65210067.7590266.72009828.436433
United StatesUSA282171.9571.0000009898700.00000072.3470546.03245435.080382
\n", "
" ], "text/plain": [ " country isocode POP XRAT tcgdp \\\n", "country \n", "Malawi MWI 11801.505 59.543808 5026.221784 \n", "India IND 1006300.297 44.941600 1728144.374800 \n", "South Africa ZAF 45064.098 6.939830 227242.369490 \n", "Uruguay URY 3219.793 12.099592 25255.961693 \n", "Argentina ARG 37335.653 0.999500 295072.218690 \n", "Israel ISR 6114.570 4.077330 129253.894230 \n", "Australia AUS 19053.186 1.724830 541804.652100 \n", "United States USA 282171.957 1.000000 9898700.000000 \n", "\n", " cc cg GDP percap \n", "country \n", "Malawi 74.707624 11.658954 0.425897 \n", "India 64.575551 14.072206 1.717325 \n", "South Africa 72.718710 5.726546 5.042648 \n", "Uruguay 78.978740 5.108068 7.843971 \n", "Argentina 75.716805 5.578804 7.903229 \n", "Israel 64.436451 10.266688 21.138673 \n", "Australia 67.759026 6.720098 28.436433 \n", "United States 72.347054 6.032454 35.080382 " ] }, "execution_count": 340, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we'll plot per capital GDP using the dataframe's plot method" ] }, { "cell_type": "code", "execution_count": 341, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 341, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAW0AAAFJCAYAAABQPHwCAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYXFWZ7/HvLwS5SowiaUeEqMcBUTGoMGC8FKIHRhAQ\nryBecQZnVCI+ekCcM2k8c84BRtERxxswGFBEURRxkItCgSACJkQCAmc8XLyRRhAxiDgE3vlj7Uoq\n1dVdu7urau+V/n2ep56qWlW199tJ91trr6siAjMzy8OcqgMwM7PynLTNzDLipG1mlhEnbTOzjDhp\nm5llxEnbzCwjpZO2pDmSVkj6TvF8vqRLJN0m6WJJ8wYXppmZwdRq2kuAn7U9Pxb4fkTsBFwGfKSf\ngZmZ2Xilkrak7YFXA6e1FR8ELCseLwMO7m9oZmbWqWxN+5PAh4H26ZMLImIMICJWA9v1OTYzM+vQ\nM2lL2h8Yi4iVgCZ5q+fDm5kN2NwS71kMHCjp1cAWwOMlnQWslrQgIsYkjQD3dPuwJCdzM7NpiIhx\nFeWeNe2IOC4idoiIZwBvBi6LiLcCFwDvKN72duD8SY7R19vSpUv7fsxB3Bzn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0COLeVVIv7vUjrhQOcBSwucZzrIuLuSG2EK4GFRbnY\ncB2JtaRab1HuAAABBklEQVQdSlrOAg6XNA/YE/jeNH8OsylzTds2FhN1zqylqJxIEvC4ttfad6B/\nlIn/Hh6ODTt/vgRcUHz+XLdx2zC5pm05ugx4Q7EcZmtZzB8BhxavH06xKw9wJ+u3hDoI2LTE8f8A\nbNP2fIPV2yLibtJaEx8Fzph6+GbT55q2ZScifibpf5O2TlsL3AC8H/iSpA8BvyW1NQOcCpxfdCJe\nDEy0RkR7TfpU4CJJv46Ifehei/8KsG1E3Dbzn8isPA/5M5sGSacAKyLCNW0bKidtsymS9BPgQeBV\nEfFI1fHY7OKkbWaWEXdEmpllxEnbzCwjTtpmZhlx0jYzy4iTtplZRpy0zcwy8l9jNhVmLB5TOwAA\nAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "df['GDP percap'].plot(kind='bar')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Exercises" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here are two exercises. Feel free to consult documentation such as can be found [here](http://docs.scipy.org/doc/scipy/reference/). The solutions are below. The cell with \"solution below\" is mean to push them below your line of sight and save you from temptation." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Exercise 1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Generate 10000 data points from the exponential distribution with density\n", "\n", "$$\n", "f(x; \\alpha) = \\alpha \\exp(-\\alpha x)\n", "\\qquad\n", "(x > 0, \\alpha > 0)\n", "$$\n", "\n", "using scipy.stats and taking $\\alpha = 0.5$. Then, after looking up the maximum likelihood estimator of $\\alpha$, compute the estimate given your data and check that it is in fact close to $\\alpha$." ] }, { "cell_type": "code", "execution_count": 342, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Put your solution here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Exercise 2" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Using the same data set, implement maximum likelihood again, but this time pretending that you don't know the analytical expression for the maximum likelihood estimator. Set up the log likelihood function and maximize it numerically using a routine from scipy.optimize." ] }, { "cell_type": "code", "execution_count": 343, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Put your solution here" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Solutions" ] }, { "cell_type": "code", "execution_count": 344, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "solution below\n", "\n" ] } ], "source": [ "# Print some nonsense to partially hide solutions\n", "filler_text = \"solution below\\n\" * 25\n", "print(filler_text)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Solution to Exercise 1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "After checking [the docs for the exponential distribution](http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.expon.html) we proceed as follows" ] }, { "cell_type": "code", "execution_count": 345, "metadata": { "collapsed": false }, "outputs": [], "source": [ "from scipy.stats import expon\n", "alpha = 0.5\n", "n = 10000\n", "ep = expon(scale=1.0/alpha) # scale controls the exponential parameter\n", "x = ep.rvs(n)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's check we've got the right distribution here" ] }, { "cell_type": "code", "execution_count": 346, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 346, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAecAAAE4CAYAAABhZTuuAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd8FHXixvHPd3fTKyQQQgIJihQBsYCieBp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lNm4gyhjjASKpuAKkHAZr7QJgz36jhwKvVA6/ApxXl2U1VjnXdCETFUcDMcak\nA8cCXzubJCg9CfwJ0MEaDacD8LMx5qXKnw8mGGMinA4VTKy1WcDjwGYqLhqVY62d62yqoNX6l7OX\nrLXbgdZ1eZNuERJkjDHRwBvALZVb0OInxpizgR2VeyhM5UP8zwMcDzxjrT0eKKRi16D4iTEmnoot\nujSgLRBtjBnlbKpmo07/sG+sct4GtK/2OrVynPhR5e6pN4DXrLVvO50nCPUFzjXGrAemAv2MMa86\nnCkYbQW2WGsXV75+g4qyFv85A1hvrd1trfUCbwKnOJwpWO0wxiQBGGPaADvr8qbGKueqC5lUHhE4\ngooLl4h/TQRWWmv/7XSQYGStvcda295aewQVf4bnW2svdTpXsKncBbjFGNOpctQAdACev20G+hhj\nwo0xhorvWAfd+cf+e9VmAZdXDl8G1GnDqVGurX2wC5k0xrqbC2NMX2A0sMwYs4SKXSf3WGtnO5tM\n5JDcDEw2xoQA69GFjfzKWrvQGPMGsAQoq3ye4Gyqps8YMwXIABKMMZuB+4BxwAxjzJXAJuCiOi1L\nFyEREREJLDogTEREJMConEVERAKMyllERCTAqJxFREQCjMpZREQkwKicRUREAozKWUREJMConEVE\nRALM/wOHEis7sev3QQAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "fig, ax = plt.subplots(figsize=(8, 5))\n", "xmin, xmax = 0.001, 10.0\n", "ax.set_xlim(xmin, xmax)\n", "ax.hist(x, normed=True, bins=40, alpha=0.3)\n", "grid = np.linspace(xmin, xmax, 200)\n", "ax.plot(grid, ep.pdf(grid), 'g-', lw=2, label='true density')\n", "ax.legend()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "It's [well-known](http://en.wikipedia.org/wiki/Exponential_distribution) that the MLE of $\\alpha$ is $1/\\bar x$ where $\\bar x$ is the mean of the sample. Let's check that it is indeed close to $\\alpha$." ] }, { "cell_type": "code", "execution_count": 347, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "max likelihood estimate of alpha is 0.5042739418869412\n" ] } ], "source": [ "alpha_mle = 1.0 / x.mean()\n", "print(\"max likelihood estimate of alpha is {}\".format(alpha_mle))" ] }, { "cell_type": "code", "execution_count": 348, "metadata": { "collapsed": false }, "outputs": [], "source": [ "s = x.sum()\n", "def neg_loglike(a):\n", " \"Minus the log likelihood function for exponential\"\n", " return - n * np.log(a) + a * s" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Minimize over a reasonable parameter space" ] }, { "cell_type": "code", "execution_count": 349, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "0.5042730725954131" ] }, "execution_count": 349, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from scipy.optimize import fminbound\n", "fminbound(neg_loglike, 0.01, 10.0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is very close to the analytical value of the max likelihood estimator we got in exercise 1" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "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.5.1" } }, "nbformat": 4, "nbformat_minor": 0 }