Skip to content

Instantly share code, notes, and snippets.

@tuffacton
Created March 30, 2017 17:11
Show Gist options
  • Save tuffacton/4d666478a84a74017321ca277293a4a9 to your computer and use it in GitHub Desktop.
Save tuffacton/4d666478a84a74017321ca277293a4a9 to your computer and use it in GitHub Desktop.
Iterative-base for robust statistics functions and plotting.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Homework #3: Nicolas Acton"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Consider two random variables h1 and h2 that are distributed according to a Gaussian distribution with zero\n",
"mean, a unit variance and a correlation coefficient of 0.5. Generate 1000 realizations of these two random\n",
"variables to get 1000 two-dimensional data points, {(h1i, h2i), i=1,…,1000}. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 1.\n",
"Describe the method that you use to generate 1000 correlated Gaussian data points. One method will\n",
"be to create a 2x2 covariance matrix C where the main diagonal elements are equal to 1 and the offdiagonal\n",
"elements are equal to 0.5. Then apply a Cholesky factorization to the matrix C to get C = LL’,\n",
"where L is a lower triangular matrix and L’ is the transpose of L. Let y1 and y2 be two statistically\n",
"independent vectors, each containing 1000 realizations drawn from N(0,1); use the Box-Muller method\n",
"to generate these realizations. Let [h1 h2]= [y1 y2] L. Show that h1 and h2 contain 1000 realizations\n",
"drawn from a bivariate Gaussian distribution with zero means, unit variances, and correlation\n",
"coefficient of 0.5."
]
},
{
"cell_type": "code",
"execution_count": 173,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# As demonstrated in HMWK2, the Box-Muller method can be used to generate realizations of normal distributions.\n",
"# However, instead of plotting the bi-variates together we'll plot them seperately.\n",
"%matplotlib inline\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import math\n",
"import random\n",
" \n",
"def rng(a, m, c, xi, n):\n",
" u = []\n",
" u.append(xi)\n",
" for i in range(0, n-1):\n",
" u.append((a*u[i] + c)%m)\n",
" i = i + 1\n",
" u2 = []\n",
" for i in range(0,n-1):\n",
" u2.append(u[i]/m)\n",
" i = i + 1\n",
" return u2\n",
" \n",
"\n",
"def boxMully1(a, m, c, xi, n):\n",
" # Define Box-Muller Method\n",
" u1 = rng(a,m,c,xi,n)\n",
" x = []\n",
" for i in range(0,n-1):\n",
" x.append(np.sqrt(-2*np.log(u1[i]))*np.cos(2*np.pi*a*u1[i] + 2*np.pi*(c/m)))\n",
" i = i +1\n",
" return x\n",
"\n",
"def boxMully2(a, m, c, xi, n):\n",
" # Define Box-Muller Method\n",
" u1 = rng(a,m,c,xi,n)\n",
" x = []\n",
" for i in range(0,n-1):\n",
" x.append(np.sqrt(-2*np.log(u1[i]))*np.sin(2*np.pi*a*u1[i] + 2*np.pi*(c/m)))\n",
" i = i +1\n",
" return x\n",
"\n",
"def gaussPlot(x):\n",
" plt.hist(x, 30, range=[-5, 5])\n",
" plt.ylabel('some numbers')\n",
" plt.show()\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": 174,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAD8CAYAAABthzNFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEutJREFUeJzt3X+QH3d93/HnK8Y2UKDG44uqWjYnGA0Z44SBuXqYmik0\nhthBDqKZQbE7MAo4iHZcYloSIkGI//KMOklJ6LQkVjBFM7iAQhzsxibYiF/ttBifHYyxjYMCsi1F\nsi41jN1ATGS/+8d3hQ95pVudbr/71d3zMaO53c/ufvf9Hc3c6z67n/1sqgpJko70U0MXIEmaTAaE\nJKmVASFJamVASJJaGRCSpFYGhCSplQEhSWplQEiSWhkQkqRWzxq6gBNx1lln1fT09NBlSNJJ5c47\n7/zbqppaaL+TOiCmp6eZnZ0dugxJOqkkebDLfl5ikiS16i0gknw0ycEk32zZ9p4kleSseW1bk+xO\n8kCSi/uqS5LUTZ89iI8BlxzZmOQc4BeAh+a1nQdcBrysOebDSU7psTZJ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UFW3ALcMXUfPTupLZIvkd14ZVtp3XtbfN1U1dA2SpAk0afcgJEkTwoAYWJL3JKkkZw1dS9+S/G6S\nbyX5RpI/S3LG0DX1YaVNF5PknCRfTHJfknuTXDV0TeOS5JQkf5nkz4eupQ8GxICSnAP8AvDQ0LWM\nyW3A+VX1c8BfAVsHrmfJzZsu5heB84DLk5w3bFW9OwS8p6rOA14FXLkCvvNhVwH3D11EXwyIYf0+\n8F5gRdwIqqpbq+pQs/pVRs+5LDc/ni6mqn4EHJ4uZtmqqv1VdVez/DijX5jLfgaEJGuA9cBHhq6l\nLwbEQJJsAPZV1d1D1zKQtwOfHbqIHqzo6WKSTAOvAG4ftpKx+ANGf+A9NXQhfZm4Ya7LSZLPA/+k\nZdP7gfcxury0rBzrO1fVjc0+72d0WeL6cdamfiV5HvCnwLur6rGh6+lTkkuBg1V1Z5LXDl1PXwyI\nHlXV69rak/wssBa4OwmMLrXcleSCqjowxhKX3NG+82FJfhW4FLiolucY6wWni1mOkpzKKByur6ob\nhq5nDC4E3pjkDcCzgRck+XhVvWXgupaUz0FMgCR7gJmqOhkn/eosySXAB4HXVNXc0PX0IcmzGN2A\nv4hRMNwB/OvlPCNARn/l7AAerap3D13PuDU9iN+oqkuHrmWpeQ9C4/RfgOcDtyX5epI/Grqgpdbc\nhD88Xcz9wM7lHA6NC4G3Aj/f/L9+vfnLWic5exCSpFb2ICRJrQwISVIrA0KS1MqAkCS1MiAkSa0M\nCElSKwNCktTKgJAktfr/U135RqkYhUEAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x8337940>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# We can use the function to generate one factorization\n",
"y1 = boxMully1(7**5, 2**31-1, 0, 1, 1000)\n",
"gaussPlot(y1)"
]
},
{
"cell_type": "code",
"execution_count": 175,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAD8CAYAAABthzN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BucBlyR5PfBc4EVJPlJVbxq4rkXlcxATIMkDwHRVnYiTfnWW5CLgj4Cfq6rZoevpQ5LnMLoB\nfwGjYLgN+E9LeUaAjP7K2QE8WlXvHLqecWt6EL9TVRcPXcti8x6ExulPgRcCu5J8NclfDF3QYmtu\nwh+eLuZeYOdSDofGecCbgZ9v/r1+tfnLWic4exCSpFb2ICRJrQwISVIrA0KS1MqAkCS1MiAkSa0M\nCElSKwNCktTKgJAktfr/sgjwqbkwOXIAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x82bc438>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# An another\n",
"y2 = boxMully2(7**5, 2**31-1, 0, 1, 1000)\n",
"gaussPlot(y2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The Covariance Matrix, C, with a covariance coefficient of $\\rho = 0.5$ can demonstrated as $C = [\\begin{matrix} 1 & 0.5 \\\\ 0.5 & 1 \\end{matrix}]$. Applying a Cholesky factorization can help find a lower triangular matrix L which will be applied to the previously generated Gaussian bi-variate to correlate them correctly.\n",
"$$ C = \\begin{bmatrix} 1 & \\rho \\\\ \\rho & 1 \\end{bmatrix} = LL^{T} = \\begin{bmatrix} 1 & 0 \\\\ \\rho & \\sqrt{1-\\rho^{2}} \\end{bmatrix} \\begin{bmatrix} 1 & \\rho \\\\ 0 & \\sqrt{1-\\rho^{2}} \\end{bmatrix} $$\n",
"So $ L = \\begin{bmatrix} 1 & 0 \\\\ \\rho & \\sqrt{1-\\rho^{2}} \\end{bmatrix} = \\begin{bmatrix} 1 & 0 \\\\ 0.5 & \\sqrt{0.75} \\end{bmatrix} $"
]
},
{
"cell_type": "code",
"execution_count": 176,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"L = [[1,0],[0.5, 0.866025404]]"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We are going to let $(h_{1} h_{2}) = (y_{1} y_{2})L$"
]
},
{
"cell_type": "code",
"execution_count": 177,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# h is an array of arrays that represents (h1 h2)\n",
"y = np.column_stack((y1,y2))\n",
"\n",
"def constructH(y):\n",
" global L\n",
" h = []\n",
" for i in range(0,998):\n",
" t = np.matmul(y[i],L)\n",
" h.append(t)\n",
" i = i+1\n",
" return h\n",
"\n",
"h = constructH(y)"
]
},
{
"cell_type": "code",
"execution_count": 178,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Split h into two lists, h1 and h2, for further analysis\n",
"h1 = []\n",
"h2 = []\n",
"# Populate the lists\n",
"for i in range(0,998):\n",
" h1.append(h[i][0])\n",
" h2.append(h[i][1])"
]
},
{
"cell_type": "code",
"execution_count": 179,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAD8CAYAAABthzNFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEflJREFUeJzt3XuMHWd9xvHvQ27l2iTK1k1zwQZZIHMTaItQgwrF0KQ4\nTShSQqhABgKmVQqh5eZAaVSpSK6gFKoWiEkAS0QEl1sCCRBjbq0qAk4IlySYBHAgwYlNgZJCCTj8\n+scZJxszzo53d84c734//5yZ98zZ+R1Z3mff9515J1WFJEn7ut/QBUiSJpMBIUlqZUBIkloZEJKk\nVgaEJKmVASFJamVASJJaGRCSpFYGhCSp1aFDFzAfxxxzTC1fvnzoMiTpoHL11Vf/sKqmZjvuoA6I\n5cuXs23btqHLkKSDSpKbuxznEJMkqZUBIUlqZUBIkloZEJKkVgaEJKmVASFJamVASJJaGRCSpFYG\nhCSp1UF9J7U0yZavv7zTcTs2rOm5Emlu7EFIkloZEJKkVr0FRJJ3J9mV5Bsz2t6U5JtJvpbkI0mO\nnPHeeUluSrI9ycl91SVJ6qbPHsR7gVP2adsCPLqqHgt8CzgPIMkq4CzgUc1n3p7kkB5rkyTNoreA\nqKovAD/ap+3KqtrT7H4ROL7ZP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h5nbepXkgcBHwJeUVU/HbqePiU5FdhVVVcneerQ9fTFgOhRVT29rT3JY4AVwFeT\nwGio5ZokT6yq28ZY4oLb33feK8kLgFOB1bU4r7GedbmYxSjJYYzC4eKq+vDQ9YzBScBpSZ4J/Bbw\nkCTvq6rnDVzXgvI+iAmQZAcwXVUH46JfnSU5BXgL8JSq2j10PX1IciijCfjVjILhy8CfL+YVATL6\nK2cT8KOqesXQ9Yxb04N4VVWdOnQtC805CI3TvwIPBrYkuTbJO4cuaKE1k/B7l4u5Adi8mMOhcRLw\nfOBpzb/rtc1f1jrI2YOQJLWyByFJamVASJJaGRCSpFYGhCSplQEhSWplQEiSWhkQkqRWBoQkqdX/\nAzGdry1RSZvTAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0xc208ba8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# To verify, lets plot both and check their distribution.\n",
"gaussPlot(h1)"
]
},
{
"cell_type": "code",
"execution_count": 180,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The mean is -0.0471965647782\n",
"The standard deviation is 1.18122804447\n"
]
}
],
"source": [
"# Lets also calculate their means and st.devs.\n",
"meanH1 = np.mean(h1)\n",
"print(\"The mean is \" + str(meanH1))\n",
"stdevH1 = np.std(h1)\n",
"print(\"The standard deviation is \" + str(stdevH1))"
]
},
{
"cell_type": "code",
"execution_count": 181,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAADhNJREFUeJzt3X+o3fV9x/Hnq+rcsB2zeBdiDLsW0jEdm8IlG7QMh1uV\nOhb9oxIZxbFCWrCdQscWLcyuI5Cy/hhsa1mK0hRcXcBKA3Zb1Qld/2jtVTI1ia6hRpIQk9t2RWXg\nSHzvj/t1ntp4z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77nmcCfAP/S9xDngDN9pMeaiUxrkswCVwPf7XeS8SQ5L8k+\n4CTwcFWt2vxNhj7JI0meOcOvLQBV9Ymq2gjcB3y032l/1rD5u20+AZxi8TWcVUaZX1qOJG8HHgDu\neNOfzs96VXW6qq5i8U/hm5Os2im0Jv+Gqar6vRE3vY/Fa/3vnuI4Yxs2f5I/Bv4AuLbOwh+yjPHP\nf60Y+pEemr7u3PYDwH1V9bW+51muqvpJkseA64FV+eF4k0f0S0myaeDuFuDZvmZZjiTXA38O/GFV\n/U/f85wj/EiPnnU/zLwHOFhVn+t7nnElmXn9Crkkv8DiD/ZXrT3n4lU3DwC/yuKVHy8AH6mqNXN0\nluQQcCHwo27pO2vsqqGbgL8DZoCfAPuq6rp+pxouyfuBv+WNj/TY0fNIY0nyVeAaFj858QRwd1Xd\n0+tQY0jyXuA/gKdZ/G8X4K7uHfhnvSS/Aexm8ffP24A9VfWpVdv/uRZ6STrXnHOnbiTpXGPoJalx\nhl6SGmfoJalxhl6SGmfoJalxhl6SGmfoJalx/wfJcKK0KM8TfwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0xba2b5f8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"plt.hist(h2)\n",
"plt.show()\n",
"pass"
]
},
{
"cell_type": "code",
"execution_count": 182,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The mean is -0.0069222789135\n",
"The standard deviation is 0.845544795575\n"
]
}
],
"source": [
"meanH2 = np.mean(h2)\n",
"print(\"The mean is \" + str(meanH2))\n",
"stdevH2 = np.std(h2)\n",
"print(\"The standard deviation is \" + str(stdevH2))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"So far, the means are incredibly close to zero and we have a unit variances."
]
},
{
"cell_type": "code",
"execution_count": 183,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Sum of standardized products is 465.710577293\n",
"The coefficient of correlation is 0.467111913032\n"
]
}
],
"source": [
"# Now lets build standardized arrays for h1 and h2 that will help us find the correlation coefficient.\n",
"z1 = []\n",
"z2 = []\n",
"\n",
"for i in range(0,998):\n",
" z1.append((h1[i]-meanH1)/stdevH1)\n",
" z2.append((h2[i]-meanH2)/stdevH2)\n",
"\n",
"# Now multiply the corresponding values\n",
"z = []\n",
"for i in range(0,998):\n",
" z.append(z1[i]*z2[i])\n",
"zsum = np.sum(z)\n",
"print(\"Sum of standardized products is \" + str(zsum))\n",
"rho = zsum/((len(z))-1)\n",
"print(\"The coefficient of correlation is \" + str(rho))"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We have shown arithmetically that the bivariate Gaussian distribution between the RVs h1 and h2 are zero mean with unit variances and a correlation coefficient very close to 0.5!\n",
"\n",
"Source for Calculating Correlation Coefficient: https://www.thoughtco.com/how-to-calculate-the-correlation-coefficient-3126228"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2.\n",
"Perform a QQ plot for the realizations of the random variable h1 to show that they follow a Gaussian\n",
"distribution, N(0,1). To this end, draw 1000 samples of size 999 data points for the random variable,\n",
"h1; then plot the sample medians and the interquartile ranges on a 2-dimensional graph versus the 999\n",
"quantiles of the Gaussian distribution, N(0,1). The interquartile ranges are displayed using vertical bars\n",
"for each of the quantiles. Discuss the results."
]
},
{
"cell_type": "code",
"execution_count": 184,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEWCAYAAABmE+CbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VHXaxvHvQ+iggIKuIklQsWBZ1NhdXUXXXrBrEBEV\nBRVQahbX3cVFqgqoqMECyqwdy7siKthWV1RQFAUrkCg2LKiAUp/3j3NiQkgmE5KZM0nuz3XlSubk\nzJknEefO7/yauTsiIiL1oi5ARETSgwJBREQABYKIiIQUCCIiA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QBAREQD+Hymy2VRi5wqjAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0xb45a748>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# First we use the scipy statistics library to make the plot and use pylab to plot it.\n",
"import pylab\n",
"import scipy.stats as stats\n",
"\n",
"stats.probplot(h1, dist=\"norm\", plot=pylab)\n",
"pylab.title(\"Q-Q Plot\")\n",
"pylab.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As demonstrated, h1 does seem to follow a Gaussian normal distribution of N(0,1). Let's draw this 1000 more times. However, we're only really concerned with the medians and the IQR for each value along the 999 value sets, so let's retrieve those instead of massive amounts of data."
]
},
{
"cell_type": "code",
"execution_count": 185,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Lets create a function that will make h1 using the seed as a differentiator.\n",
"def buildH(x1):\n",
" # First build the h1 value\n",
" y1 = boxMully1(7**5, 2**31-1, 0, x1, 1000)\n",
" y2 = boxMully2(7**5, 2**31-1, 0, x1, 1000)\n",
" y = np.column_stack((y1,y2))\n",
" h = constructH(y)\n",
" h1 = []\n",
" for i in range(0, len(y1)-1):\n",
" h1.append(h[i][0])\n",
" h1.sort()\n",
" return h1\n",
"\n",
"# Now lets create a function that will build as many instances of h1 as we need, seeding from 0 to n\n",
"# As long as n is less than the orginal m, this should work!\n",
"def hSet(n):\n",
" set = []\n",
" for i in range(1, n+1):\n",
" set.append(buildH(i))\n",
" i = i+1\n",
" return set\n",
"\n",
"# Now lets create a function that will iterate through all the sets and retrieve a list of medians and their associated IQR for each value of h1!\n",
"def medqq(n):\n",
" # generate set of h1\n",
" temp = hSet(n)\n",
" # transpose said set\n",
" temp2 = np.transpose(temp)\n",
" # create sets of median, q1, and q3\n",
" temp3 = []\n",
" for i in range(0, len(temp2)-1):\n",
" temp3.append([np.median(temp2[i]), np.percentile(temp2[i],25), np.percentile(temp2[i],75)])\n",
" i = i+1\n",
" return temp3"
]
},
{
"cell_type": "code",
"execution_count": 186,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Now that we've built all that, lets build our set of 1000 points and plot it.\n",
"# Just for fun, we'll time it while we're at it and maybe improve our functions with some parallelization later.\n",
"\n",
"# Returns dataset of medians\n",
"def retMed(n):\n",
" medianData = []\n",
" for i in range(0,len(n)):\n",
" medianData.append(n[i][0])\n",
" i = i+1\n",
" return medianData\n",
"\n",
"# Returns dataset of first quarters from IQR\n",
"def retQ1(n):\n",
" q1Data = []\n",
" for i in range(0,len(n)):\n",
" q1Data.append(n[i][1])\n",
" i = i+1\n",
" return q1Data\n",
"\n",
"# Returns dataset of third quarters from IQR\n",
"def retQ3(n):\n",
" q3Data = []\n",
" for i in range(0,len(n)):\n",
" q3Data.append(n[i][2])\n",
" i = i+1\n",
" return q3Data\n",
"\n",
"# Returns all 3 of the previously mentioned, for brevity.\n",
"def retAll(n):\n",
" med = retMed(n)\n",
" q1 = retQ1(n)\n",
" q2 = retQ3(n)\n",
" return([med, q1, q2])\n"
]
},
{
"cell_type": "code",
"execution_count": 187,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEWCAYAAABmE+CbAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xuc1nP6x/HX1RRKS1Q/KiqntU0kmc15qYnFWqcctxCm\nw0SyDpFYp40OzkKmIjTWqSy7zqWcxXRQmrAWIbGF0IEOc/3++H7vmrnnnpl7au7T3O/n4zGP5nvP\n/bnva6K55vp+PtfnY+6OiIhIg1QHICIi6UEJQUREACUEEREJKSGIiAighCAiIiElBBERAZQQREQk\npIQgkmRmNsPMClIdh0g0JQTJKmbWx8zmm9kqM/vGzO4xs21rGLOlmd1kZl+Y2Woz+4+ZXWpmVs2Y\nz8PnrjCzb81sopk1rWWs7c3MzaxhbcaJbColBMkaZnYJMBK4DNgWOABoD7xkZo2qGfoEkA8cA/wG\nOBP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VUPMvx93fxIoAXqF38fq\nKmLpAJwGHBxWZOsJdvXtDLRx973cfW/ggThilHomKze3k7T3mbvPDT+fBbQPd7Q8CHhi489Ftgz/\nPBA4Kfz8YWBUudd6wt3Xh58fCRxnZpeG11sBbWuIpTtwFgQ7UwI/ho9fGG61AcHmdnuwcbuQaPsD\nM9x9KYCZPQb8tob3NeBGCw6wKSPYUnuH8GuV/n5qeK3y8oH9gPfCv8fGBFsv/wvY1czuAp4FXqrF\na0o9oYQg6ejXcp+vJ/ih1QBYHv5WWxsry31uBL9NVziEx8z2r80LmtnhQA/gQHdfZWYzCJLLplhH\nWKmbWQNgi/DxXgR7Ou3n7mvN7PNy7xHr7yfu8AmqqaGVvmC2D/BHYABwKsF5GpJFdMtIMkK4z/1n\nZnYKBDtdhj/AAN4i2GUUgh+kr1fxMi8CgyK3Xsxs3/Dxn4HfVDFmGlAYPj/HzLYFtgV+CJPB74AD\nagh/JnBYuLKqEXBKua99TvAbO8BxBLewCN/jf2Ey6Aa0q+E9avo+yn8/J5vZ/4Xf0/Zm1i5cgdTA\n3ScDVxHcHpMso4QgmaQXcJ6ZvU9wLz9yqM4g4BwzmwecCVR12PoNBD9w55nZgvAaYDqQG5lUjhoz\nGOhmZvMJbs/kAi8ADc1sITCC4KjSKrn7EuBa4G3gTYKjHiPGESSL9wlufUUqmmIgL3zfs4hvW+SJ\nwNjIpHIVsZQS/MB/Kfz7ehloRXBLaoYFp3dNAipVEFL/abdTkSSz4ACjPHdPu9P4JLupQhAREUAV\ngoiIhFQhiIgIoIQgIiIhJQQREQGUEEREJKSEICIiAPw/PQiBctSyBz4AAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0xb4705f8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Now that we've retrieved the median of these,\n",
"n = 1000\n",
"data = medqq(n)\n",
"x = retMed(data)\n",
"y = retQ1(data)\n",
"z = retQ3(data)\n",
"\n",
"stats.probplot(x, dist=\"norm\", plot=pylab)\n",
"pylab.title(\"Q-Q Plot\")\n",
"pylab.show()"
]
},
{
"cell_type": "code",
"execution_count": 188,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXYAAAD8CAYAAABjAo9vAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8VPW9//HXZxJ2goIJqGgEFa5SXKjRgvaKK9KriPan\ndW9ttVx3vKUuiLUiUlFBUYvY/NRG7rVqW1O1yq3G1hZvrxgSWRUdBNkUgYHsmSyTfO8fk8QQQkIy\nJ7Pl/Xw8eIRJDmc+6oP34+PnfM4Zc84hIiLJwxfrAkRExFsKdhGRJKNgFxFJMgp2EZEko2AXEUky\nCnYRkSSjYBcRSTIKdhGRJKNgFxFJMqmxeNP09HQ3bNiwWLy1iEjCKiwsDDjnMto7LibBPmzYMAoK\nCmLx1iIiCcvMNu3PcRrFiIgkGc+C3cxSzGy5mb3p1TlFRKTjvOzYpwJrPTyfiIh0gifBbmaHAecD\nz3pxPhER6TyvOvb5wJ1AvUfnExGRToo42M3sAmCHc66wneOmmFmBmRXs3Lkz0rcVEZF98KJjPw24\n0Mw2Ai8DZ5nZf7U8yDmX7ZzLcs5lZWS0u4YpIiKdFHGwO+emO+cOc84NAy4H/uacuzriykREkkwg\nGIjK+2iPXUQkCgLBALOXzo5KuFssPsw6KyvL6c5TEeluAsEA6X3SO/3nzazQOZfV3nHq2EVEoiSS\nUO8IBbuISJJRsIuIJBkFu4hIlOwsq47K+yjYRUSiYGdZNb94bU1Uwl3BLiISBRlpvZh10Wgy0np1\n+Xsp2EVEoiQaoQ4KdhGRTonWXaSdoWAXEemgaN5F2hkKdhGRDkrvk86MsTM6fsNR+Y6uKagFBbuI\nSCd0KtTfmhaVcFewi4h0QofXFvsPhvPnhb92MQW7iMg+7GuG3umd9CiEOijYRURa1dYF0mjupHeG\ngl1EpBXtXSCN11AHBbuICND62CVa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w\nFVgGXOGc+ySmhbVgZqcD5cAi59zoWNezL2Z2CHCIc+4jM0sDCoGL4vDfpwH9nHPlZtYD+B9gqnNu\naYxLi4g69jY0hnqDfkTjU6I6wTn3jnMu1PByKeFHKMcd59xa59xnsa5jH04BPnfObXDO1QAvA5Nj\nXNNenHNLgN2xrqM9zrltzrmPGn5fBqwFhsa2qr25sPKGlz0afsXl3/OOULC3w8xmm9kW4CrgvljX\nsx9+Avx3rItIQEOBLc1ebyUOgygRmdkwYAzwYWwraZ2ZpZjZCmAHkOeci8s6O6LbB7uZvWtma1r5\nNRnAOTfDOXc48CJwS7zW2XDMDCDUUGvc1indh5n1B14Fbm/xf8BxwzlX55w7kfD/6Z5iZnE74tpf\nnj22N1E5587Zz0NfBBYDv+zCcvapvTrN7FrgAuBsF8MLJx349xlvvgQOb/b6sIbvSSc1zKxfBV50\nzuXGup72OOeKzew9YCIQ1xen29PtO/a2mNmIZi8nA5/Gqpa2mNlE4E7gQudcZXvHS6uWASPMbLiZ\n9QQuB96IcU0Jq+Gi5HPAWufcY7GuZ1/MLKNxi8zM+hC+eB6Xf887QlsxbTCzV4F/IbzJsQm4wTkX\nd12cmX0O9AJ2NXxraZxu71wMPAVkAMXACufcebGt6htm9m/AfCAFeN45NzvGJe3FzF4CziD8JMLt\nwC+dc8/MovbYAAAAYUlEQVTFtKhWmNl3gfeB1YT//gDc45xbHLuq9mZmxwMvEP5v7gN+75x7ILZV\nRU7BLiKSZDSKERFJMgp2EZEko2AXEUkyCnYRkSSjYBcRSTIKdhGRJKNgFxFJMgp2EZEk83+8wnE3\nQudcOAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0xb3a8860>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# We can plot the quartiles agains the medians we've retrieved quite easily!\n",
"# For all plots, green is Q3, orange is the median, and blue is Q1\n",
"# Python libraries like matplotlib do not have the best support for more detailed statistics on quartile mapping.\n",
"# Will request more features related.\n",
"plt.scatter(x, x, s = 0.1)\n",
"plt.scatter(x, y, s = 0.1)\n",
"plt.scatter(x, z, s = 0.1)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 189,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAD8CAYAAABthzNFAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAF6RJREFUeJzt3XuMpfV93/H3l+Vid7M2jpbFWS4OcRcTasKqnhBVWBSb\nNV0j7JWJo/pSu8SpVtvEKX9EwtBt7MrIzTpUqpBtabOBSo2F5USVEY7BwK4rioJiYLYebmGNWQJd\ndtXu4nIN5rLw7R9nntkzZ37nMvOcM3Mu75eEZs6ch/M8fnLEJ7/v9/f7PZGZSJLU6riVvgBJ0nAy\nICRJRQaEJKnIgJAkFRkQkqQiA0KSVFQrICLidyLi0Yh4KyKmOhz3VEQ8HBEzETFd55ySpOVxfM1/\n/xHgCuDPejj2Q5n5bM3zSZKWSa2AyMzHACKiP1cjSRoadUcQvUpgT0S8CfxZZu5qd2BEbAW2Aqxe\nvfoD55xzzjJdoiSNhleOvsKBFw9wNI8CsCpWcdJxx3Pq0Tf5v4dfzp+/kn3pL3cNiIjYA7y78Nb2\nzLy1x/N8MDMPRsQ6YHdE7MvMe0oHzobHLoCpqamcnrZlIUkAM4dn+NMH/pS/f+HvWfXGKn7phF/i\nrHeexdXvuZyNt22HX/w/pnYd17eSTteAyMxNdU+SmQdnfx6OiFuAC4BiQEiSFpo5PMMf/o8/5PnX\nngfg5JNO5hvv/7ds/Nub4KEvwWsvwolr+MXRV17t1zkHXmKKiNXAcZn50uzvlwJfHfR5JWkcNI8a\nXn7j5eKoAeCNk97Ff3jbdn4WO07o17lrBUREfAL4BnAKcFtEzGTmv4iI9cCNmXkZcCpwy2wj+3jg\nO5l5R83rlqSx1+uo4eV3vJc/+Pkn+Z8vrCeOO25Vv85fdxbTLcAthb8fAi6b/f1J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8p70eB9OMZ7cYz34pi+3YvIbDf5SJI0yVxJLUkqMiAk\nSUVDFxBu2wERcV1EPBQRMxFxV0Ssb3PcUxHx8OxxfZvaNkwWcS8m4XtxfUTsm70ft0TEyW2Om4Tv\nRa/3YhK+F78TEY9GxFsR0Xaq75K+F5k5NP/QmA57J/A0sLbw/ipgP/BrwInAg8C5K33dA7gP72j6\n/d8BO9sc91TpPo3TP73ciwn6XlwKHD/7+9eBr0/w96LrvZig78Wv01gcdzeNmaTtjlv092LYRhBu\n2wFk5otNL1fT/n6MvR7vxaR8L+7KxqxAgB/TWFM0kXq8F5PyvXgsM386iM8emoBo3rajw2GlbTtO\nG+iFrZCI+FpEHAA+C3y5zWEJ7ImIvbNblIylHu7FxHwvmnwB+GGb9ybie9Gk3b2YxO9FJ4v+XtTa\ni2mxlnvbjmHW6V5k5q2ZuR3YHhHX0lhH8pXCsR/MzIMRsQ7YHRH7MvOeAV72QPTpXoyFbvdi9pjt\nwFHg5jYfMxHfi9ljut2LsdDLvejBor8XyxoQ6bYdc9rdi4Kbgdsp/EcxMw/O/jwcEbfQGFKP3H8I\n+nAvJuZ7ERFXApcDl+RsYbnwGRPxvejhXkzM96LHz1j092IoSkyZ+XBmrsvMX83MX6UxFPynLeEA\nTdt2RMSJNLbt+P4yX+7ARcSGppdbgH2FY1ZHxJrqdxqjr7Hb+baXe8HkfC820+jRfTwzX2lzzKR8\nL7reCybke9GLpX4vhiIgOunjth2jZEdEPBIRD9H4P+RVMP9eAKcCfxMRDwL3A7dl5h0rc7kD1fVe\nTND34pvAGhrlgZmI2AkT+73oei8m5XsREZ+IiGeAfwbcFhF3zv699vfCrTYkSUVDP4KQJK0MA0KS\nVGRASJKKDAhJUpEBIUkqMiAkSUUGhCSp6P8D/ftS5+6+VLQAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0xd02c668>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# This doesn't seem all that useful in my opinion, so lets view it a little closer near the ends and just view the differences\n",
"y2 = []\n",
"z2 = []\n",
"for i in range(0, len(x)):\n",
" y2.append(x[i]-y[i])\n",
" z2.append(x[i]-z[i])\n",
" i = i + 1\n",
"\n",
"# First let's see the spread of points between -4.0 and -1.5\n",
"plt.scatter(x, y, s = 2)\n",
"plt.scatter(x, x, s = 2)\n",
"plt.scatter(x, z, s = 2)\n",
"plt.axis([-4,-1.5, -4, -1.5])\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 190,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAD8CAYAAAB3u9PLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl8lOW5//HPDUkgIRAIO4FIsAgIBtAIahcEDAiiqKjH\nasGlLUTRo627tdqftVTtIh4VlXpQoVZ7Tlt3EAEPimtFBCSACknIQlaWSWAmzGS4f3/MJIzDBEIy\nSWaS7/v14pVZHuZ5njwzc+W6r3sx1lpEREQ6tPYBiIhIZFBAEBERQAFBRET8FBBERARQQBARET8F\nBBERAcIUEIwxS4wxZcaYLfU8f64xxmGM2ej/d3849isiIuETE6bXeQF4Elh6jG3WWWtnhGl/IiIS\nZmHJEKy1HwB7w/FaIiLSOsKVITTEOcaYzUARcLu1NjvURsaYucBcgC5dupwxfPjwFjxEEZHIZrFU\nuatw1bjY49oDQM/4nvTp3AtzoJRtecWug26b0JjXbqmAsAFItdYeMMZMB14Dhoba0Fq7GFgMkJGR\nYdevX99ChygiEtk8Xg9PbXyK57c8Tzzx3DbqNkb1GM4Ep4vY7FdhWw4ZizvEN/b1WyQgWGsrA24v\nN8YsMsb0stZWtMT+RUSindPt5P5P7ufdvHcBuH7U9cwfcQ2xb/8Ctr4O1sKImeTt/2tOY/fRIgHB\nGNMPKLXWWmPMOHy1iz0tsW8RkWjm8Xp4v/B9lucsZ1X+KjJPymR66hRfVvDmLbDtdRgxE067HPf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O8wM6AjuBIUAcsAk4tbWPvYHn9yhwt//23cAj0X79\nGnI9gOnACsAAZwGftfZxh/HczgXeau1jbcI5/gg4HdhSz/NRee0aeG6NunYRkyFYa7dZa79u7eNo\nLg08v3HADmttjrXWDbwCzGz+owuLmcCL/tsvAhe34rGES0Oux0xgqfX5FOhujOnf0gfaCNH8XmsQ\n6xv8uvcYm0TrtWvIuTVKxASEE2CB1caYL/zTXLQlKUBBwP1C/2PRoK+1tth/uwRfd+NQoun6NeR6\nROs1a+hxn+NvTllhjBnZMofWYqL12jXUCV+7Fl0PoaWnwWhpYTq/iHWs8wu8Y621xpj6+jNH7PWT\no2wAUq21B4wx04HXgKGtfEzSMI26di0aEGwbnwYjDOdXBAwKuD/Q/1hEONb5GWNKjTH9rbXF/rS7\nrJ7XiNjrF0JDrkdEX7NjOO5xW2srA24vN8YsMsb0sic4jX0Ei9Zrd1yNvXZR1WTUDqbB+BwYaoxJ\nM8bEAVcCb7TyMTXUG8A1/tvXAEdlRFF4/RpyPd4A5vh7rJwFOAKaziLZcc/NGNPPGN/c9saYcfi+\nL/a0+JE2n2i9dsfV6GvX2tXygKr4Jfja8A4BpcBK/+MDgOX+20Pw9YbYBGTja4pp9WMP1/n5708H\nvsHXAySazq8nsAb4FlgNJLeF6xfqegBZQJb/tgGe8j//FcfoIRdp/xpwbjf5r9Mm4FPgnNY+5hM8\nv5eBYsDj/+z9tA1du+OdW6OunaauEBERIMqajEREpPkoIIiICKCAICIifgoIIiICKCCIiIifAoKI\niAAKCCIi4vf/AZbVqAHPA0OqAAAAAElFTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x83679b0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Now lets see the spread of points between -1.5 and 1.5\n",
"plt.scatter(x, y, s = 0.5)\n",
"plt.scatter(x, x, s = 0.5)\n",
"plt.scatter(x, z, s = 0.5)\n",
"plt.axis([-1.5,1.5, -1.5, 1.5])\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 191,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAD8CAYAAAB0IB+mAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFqVJREFUeJzt3X2MXXWdx/HPlzKLQLuUTctaOi0oKT4AMsBYiJOYCYUN\nYheyRLNkIyzETTPE1ZrFkGqiRnezsv5hLJA46YouRVnXrETZpsRtEYKQ0DpTptRSU2G1TEvjtNh2\nGAul0373j3vuzJkz9+Hcpzn3nt/7lUzmPpy585vDyYdfv7+HY+4uAED+nZF1AwAAc4PAB4BAEPgA\nEAgCHwACQeADQCAIfAAIROrAN7N5ZvaimW0q8Z6Z2QNm9oqZvWRmVze3mQCARtXSw18raU+Z9z4m\naUX0tUbSdxpsFwCgyVIFvpl1S/q4pO+WOeRWSRu94AVJC81sSZPaCABogjNTHvdtSfdJWlDm/aWS\nRmPP90evHYwfZGZrVPgXgM4999xr3v/+99fUWAAI3fDw8GF3X1zPz1YNfDNbLWnM3YfNrL+eX1Lk\n7hskbZCk3t5eHxoaauTjACA4Zrav3p9NU9Lpk3SLmf1e0o8kXW9mP0gcc0DSstjz7ug1AECbqBr4\n7v5Fd+9294sl3S7pF+7+qcRhT0i6M5qtc52kY+5+MPlZAIDspK3hz2JmA5Lk7oOSNku6WdIrko5L\nursprQMANE1Nge/uz0h6Jno8GHvdJX2mmQ0DADQXK20BIBAEPgAEgsAHgEAQ+AAQCAIfAAJB4ANA\nIAh8ALk1MjaigS0DGhkbybopbYHAB5BbgzsH9fzrz2tw52D1gwNQ90pbAGh3A1cOzPgeOgIfQG71\nXNCjwRvp3RdR0gGAQBD4ABAIAh8AAkHgA0AgCHwACASBDwCBIPABIBAEPgAEgsAHgEAQ+AAQCAIf\nAAJB4ANAIAh8AAgEgQ8AgSDwASAQBD4ABILAB4BAEPgA8mt0u/TobYXv4BaHAHLsmfulV58qPL7j\n8Wzb0gYI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3D/a6SHEupDCui29Luk/S6TLv13VNZB34\nOyQtd/cPSXpQ0k8zbk/Lmdl8ST+R9Hl3H8+6PVmqci6CuTbc/ZS790jqlrTSzGZtYRKKFOci99eF\nmRW3ox9u9mdnGvge2LYMZtalQsD90N0fL3HIAUnLYs+7o9dyp9q5CO3akCR3PyrpaUk3Jd4K5roo\nKncuArku+iTdYma/l/QjSdeb2Q8Sx9R1TWQa+CFtyxD9nQ9L2uPu3ypz2BOS7oxG4K+TdMzdD85Z\nI+dImnMRyrVhZovNbGH0+GxJN0r6TeKwUK6LqucihOvC3b/o7t3ufrGk2yX9wt0/lTisrmuipbc4\ntNZty9CJ+iTdIWlXVKOUpC9JWi5NnY/NKoy+vyLpuKS7M2jnXEhzLkK5NpZIesTM5qkQXj92901m\nNiAFd12kORehXBezNOOaYGsFAAhE1oO2AIA5QuADQCAIfAAIBIEPAIEg8AEgEAQ+AASCwAeAQPw/\nl91/hFUTe0cAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x8148e10>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# And finally lets see the spread of points between 1.5 and 4.0\n",
"plt.scatter(x, y, s = 2)\n",
"plt.scatter(x, x, s = 2)\n",
"plt.scatter(x, z, s = 2)\n",
"plt.axis([1.5,4.0, 1.5, 4.0])\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As demonstrated by the comparison plots, gaussian random variables generated by a random number functions can more effectively follow the probability distribution of a true gaussian random variable when you plot the median values of an ever-growing number of sets."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. \n",
"Implement the projection algorithm described in Chapter 6, Part 3, pp. 357-360 of the class notes.\n",
"Perform a QQ plot to show that the squared projection statistics obey a chi-squared distribution with 2\n",
"degrees of freedom when the 2 random variables, h1 and h2, follow a bivariate Gaussian distribution\n",
"with zero means, unit variances and a correlation 0.5 (see Question 1). To this end, draw 1000 samples\n",
"of size 999 data points of the projection statistics; then plot the sample medians and the interquartile\n",
"ranges on a 2-dimensional graph versus the 999 quantiles of the Gaussian distribution, N(0,1). The\n",
"interquartile ranges are displayed using vertical bars for each of the quantiles. Discuss the results."
]
},
{
"cell_type": "code",
"execution_count": 192,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[-0.10932706101267728, -0.001093767229951756]\n"
]
}
],
"source": [
"# Calculate M for h1 and h2\n",
"# We'll perform the projection on h1 and h2 from problem 1 to help build/verify our functions.\n",
"\n",
"# We calculate M. This will return a two element set.\n",
"def M(h1,h2):\n",
" m1 = np.median(h1)\n",
" m2 = np.median(h2)\n",
" return([m1, m2])\n",
"\n",
"print(M(h1,h2))"
]
},
{
"cell_type": "code",
"execution_count": 193,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Then we find the uj set for hj. This will be a set of two elements, n times.\n",
"def U(h1, h2):\n",
" M1 = M(h1,h2)\n",
" u1 = []\n",
" u2 = []\n",
" for i in range(0, len(h1)-1):\n",
" u1.append(h1[i] - M1[0])\n",
" u2.append(h2[i] - M1[1])\n",
" i = i+1\n",
" return([u1,u2])"
]
},
{
"cell_type": "code",
"execution_count": 194,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Then we can find the vectors of each element in U.\n",
"# Lets create a function to find magnitude of two elements.\n",
"def mag(h1, h2):\n",
" mg = np.sqrt(h1**2 + h2**2)\n",
" return mg\n",
"\n",
"# Then lets apply that function \n",
"def V(h1, h2):\n",
" U1 = U(h1,h2)\n",
" v1 = []\n",
" v2 = []\n",
" for i in range(0, len(h1)):\n",
" v1.append(h1[i]/mag(h1[i],h2[i]))\n",
" v2.append(h2[i]/mag(h1[i],h2[i]))\n",
" i = i + 1\n",
" return([v1,v2])"
]
},
{
"cell_type": "code",
"execution_count": 195,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# We can then find z values by applying a dot matrix multiplication to all h elements with v\n",
"# First reconstruct h as a set of two elements n times.\n",
"def recH(h1,h2):\n",
" h = []\n",
" for i in range(0,len(h1)-1):\n",
" h.append([h1[i],h2[i]])\n",
" return h\n",
"\n",
"# Then apply this function to retrieve a set of one z value for each set of h1,h2 values\n",
"def Z(h1,h2):\n",
" V1 = V(h1,h2)\n",
" h = recH(h1,h2)\n",
" Z1 = []\n",
" for i in range(0, len(h1)-1):\n",
" Z1.append(np.dot(h[i],(V1[0][i],V1[1][i])))\n",
" i = i + 1\n",
" return Z1"
]
},
{
"cell_type": "code",
"execution_count": 196,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Next, we find the median of our Z RV and find projection from the MAD\n",
"\n",
"def madZ(Z1, n, m):\n",
" c = 1 + 15/(m-n)\n",
" med = np.median(Z1)\n",
" temp = []\n",
" for i in range(0,len(Z1)-1):\n",
" temp.append(abs(Z1[i]-med))\n",
" tempMed = np.median(temp)\n",
" mad = 1.4825*c*tempMed\n",
" return (mad,med)\n",
"\n",
"def projP(Z1, n, m):\n",
" proj = []\n",
" temp = madZ(Z1, n, m)\n",
" mad = temp[0]\n",
" med = temp[1]\n",
" for i in range(0, len(Z1)-1):\n",
" proj.append((abs(Z1[i]-med)/mad))\n",
" i = i+1\n",
" return proj"
]
},
{
"cell_type": "code",
"execution_count": 197,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# Lets combine it all together\n",
"def buildPs(x1, m):\n",
" y1 = boxMully1(7**5, 2**31-1, 0, x1, m)\n",
" y2 = boxMully2(7**5, 2**31-1, 0, x1, m)\n",
" y = np.column_stack((y1,y2))\n",
" h = constructH(y)\n",
" h1 = []\n",
" h2 = []\n",
" for i in range(0, m-2):\n",
" h1.append(h[i][0])\n",
" i = i + 1\n",
" for i in range(0, m-2):\n",
" h2.append(h[i][1])\n",
" i = i + 1\n",
" \n",
" z = Z(h1,h2)\n",
" \n",
" proj = projP(z, 2, m)\n",
" \n",
" return proj"
]
},
{
"cell_type": "code",
"execution_count": 198,
"metadata": {
"collapsed": false
},
"outputs": [
{
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ZdHdko6nPYio0ppxXzyA2N3PSZo7gBjzuPu/Sfp52uPIKnd/091fmv3z26r8h8cJGvN4\nxf/N/rV39h8ubM1jZqsk3Srp8bTHElVa4a52ADH/wWHZzGxY0jpJh9IdSfbMLgMckXRG0kF35zta\n6FFJX5R0od4bs4KLkwiemX1A0tOS7nH3t9IeT9a4+4y7r1XlvNiPmdlH0x5TVpjZpySdcffDaY+l\nEWmFO9IBxEA9ZtarSrT3uvv+tMeTZe4+Jel5cd1kvg2SbjOzn6iyZPsJM3si3SHVl1a4Lx5AbGYr\nVDmA+JmUxoJAmZlJ+oqk4+6+J+3xZJGZDZhZ/+yfc5I2Sno13VFlh7vvcPdV7j6sSoe+6+7bUh5W\nXamE293PS5o7gPi4pKfiPoC4HZjZk5J+IGnEzE6Z2R+nPaaM2SDpC6rMko7M/nNL2oPKmF+R9LyZ\nHVVlwnTQ3YPY8obauHMSAALDxUkACAzhBoDAEG4ACAzhBoDAEG4ACAzhBoDAEG4ACAzhBoDA/D+M\nz92+mK0QcwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x835e1d0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Lets create 1 set of projections.\n",
"data2 = buildPs(1, 1000)\n",
"data2.sort()\n",
"\n",
"# Let's plot this data against a known set of chi-squared RVs with df=2 to check the fit.\n",
"r = stats.chi2.rvs(2, size=996)\n",
"r.sort()\n",
"r = r**0.5\n",
"plt.scatter(r, data2)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 199,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXIAAAD8CAYAAABq6S8VAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAE+tJREFUeJzt3XuMXOV5x/Hfs+t1WIzpgjAEfJEpQbbKzSYr7NRSRS05\nRkAJSUOA2KnUP2K1UisQ6aZ2sQKWiqBy69Cb1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jLSbXqzMlYLpN0hZm9oYlW73Iz21JxTezxbDbIo2zb\nf0TSX5TvwC6V9J67v9Pk72tWwzrN7PNmZuXPL9LEmPymzXU2koexbCgvY1mu4U5JL7v7phqXZT6m\nUerMekzNbJaZDZQ/79fEcwleqbgsD2PZsM6sx1KS3H2du89x9/mayKOfuvvqistij2dTpx96jW37\nZvZX5df/S9ITmrj7+pqkjyX9ZTO/qxUR6/y6pL82s0OSRiVd4+Vbx+1iZvdq4o76KWb2lqSbNHGz\nJjdjGbHOzMeybJmkb0kaLvdMJekfJM2bUmsexjRKnVmP6emSfmQTD5jpkXS/uz+Wt3/rEevMeixr\nanU82aIPAIHjZicABI4gB4DAEeQAEDiCHAACR5ADQOAIcgAIHEEOAIH7fz4FCF8h5ypFAAAAAElF\nTkSuQmCC\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x82feb38>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Lets try again but limit the range without obvious outliers.\n",
"plt.scatter(r, data2)\n",
"plt.axis([0,4.0, 0, 5.0])\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 200,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"# Now we're here to test out median-based smoothing, so lets perform a similar method to the previous question.\n",
"t = 1000\n",
"data3 = []\n",
"for i in range(1, t):\n",
" data3.append(buildPs(i,1000))\n",
" i = i + 1\n",
"for i in range(0, t-1):\n",
" data3[i].sort()\n",
" i = i + 1\n",
"data4 = np.transpose(data3)\n",
"data5 = []\n",
"for i in range(0,len(data3)-4):\n",
" data5.append([np.median(data4[i]), np.percentile(data4[i],25), np.percentile(data4[i],75)])\n",
" i = i+1\n",
"\n",
"med5 = retMed(data5)\n",
"q15 = retQ1(data5)\n",
"q35 = retQ3(data5)"
]
},
{
"cell_type": "code",
"execution_count": 201,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQ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/rRg9f2RpL8ws8OSpiXd6M1HxGkzs++o8ZR8sZm9KmmdGg9k\nch+7gNpyGzc17n4+K2mq2Q+VpC9JWjarvrzGLqS2vMbuDEnfNrNRNQLvAXd/pCj/vwbWl+f37jhJ\njR0rJwEgMjycBIDIENwAEBmCGwAiQ3ADQGQIbgCIDMENAJEhuAEgMgQ3AETm/wGJiNT0hIVb3gAA\nAABJRU5ErkJggg==\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x80f0ac8>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Let's plot this data against a known set of chi-squared RVs with df=2 to check the fit.\n",
"# The fit does seem better, but isn't quite there yet. It would likely become a better fit with even more data projections!\n",
"r2 = stats.chi2.rvs(2, size=995)\n",
"r2.sort()\n",
"r2 = r2**0.5\n",
"plt.scatter(r2, med5)\n",
"plt.show()"
]
},
{
"cell_type": "code",
"execution_count": 202,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAW4AAAD8CAYAAABXe05zAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGuZJREFUeJzt3Xt8lOWd9/HPL5OgUKyCROQoVTmIaEVTdBcFRel6QKWI\nq7jgAVxUtEVLPW3d7rPta7dafYr2UVRWPLSu2oMHrGIlci6iCIh44CAgREKERCQQE8gcruePmQk5\nQSbJTO65Z77v18sXEIfJ1al8/fm9r/u6zTmHiIj4R47XCxARkeZRcIuI+IyCW0TEZxTcIiI+o+AW\nEfEZBbeIiM8ouEVEfEbBLSLiMwpuERGfyU3Fm3bp0sX16dMnFW8tIpKRVq5cWeacy0/ktSkJ7j59\n+rBixYpUvLWISEYys62JvlZViYiIzyi4RUR8RsEtIuIzCm4REZ9RcIuI+IyCW0TEZxLaDmhmW4C9\nQBgIOecKUrkoERE5uObs4z7POVeWspWIiEhCVJWIiCRBMBxk4ZcLCYaDKf9eiQa3A94xs5VmNjmV\nCxIR8aOl25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865sHPuNKLPeR1iZoO8XlNbMrNRwE7n3Eqv\n15Ju0im4E3oosWQ+M8sjGtr/65x7xev1eM05txtYQPZd/xgKXGZmW4hWpyPM7Hlvl5Qe0im4ax5K\nbGbtiD6U+HWP1yRtzMwMmAWsdc791uv1eMXM8s3sqNjP2wMjgXXerqptOefudc71dM71IZoH851z\n4z1eVlpIm+B2zoWA+EOJ1wJ/yraHEpvZi8AyoL+ZbTOzSV6vyQNDgQlEp6vVsb8u9npRHugGLDCz\nNUSHmkLnnLbDCaA7J0VEfCdtJm4REUmMgltExGcU3CIiPqPgFhHxGQW3iIjPKLhFRHxGwS0i4jMK\nbhERn/n//bD8T3tp5SkAAAAASUVORK5CYII=\n",
"text/plain": [
"<matplotlib.figure.Figure at 0x82a4cc0>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# We can also plot the Q1 and Q3 against the median of the projections.\n",
"# For all plots, green is Q3, orange is the median, and blue is Q1\n",
"plt.scatter(med5, med5, s =0.5)\n",
"plt.scatter(med5, q15, s=0.5)\n",
"plt.scatter(med5, q35, s=0.5)\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As is demonstrated, as the projections are farther from 0, the quartile ranges are significantly farther from the median values. This would be a good indicator of outliers at these points."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 4. \n",
"Replace n data-points with outliers by increasing the magnitude of their h values and identify the\n",
"outliers using a statistical test applied to the projections statistics. Repeat this procedure for an\n",
"increasing number of outliers, n =1, 2, 3,…,v. Determine the maximum fraction of outliers that can be\n",
"identified by this method."
]
},
{
"cell_type": "code",
"execution_count": 203,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"# First step is to make a set of projection statistics.\n",
"# However, lets make it so that we can make a set # of h elements obvious additional obvious outliers.\n",
"def buildPsHout(x1, m, hOut):\n",
" y1 = boxMully1(7**5, 2**31-1, 0, x1, m)\n",
" y2 = boxMully2(7**5, 2**31-1, 0, x1, m)\n",
" y = np.column_stack((y1,y2))\n",
" h = constructH(y)\n",
" h1 = []\n",
" h2 = []\n",
" for i in range(0, m-2):\n",
" h1.append(h[i][0])\n",
" i = i + 1\n",
" \n",
" # In the h1 set, set some of the initial values to obvious outliers\n",
" for i in range(0, hOut-1):\n",
" h1[i] = 10000\n",
" i = i +1\n",
"\n",
" for i in range(0, m-2):\n",
" h2.append(h[i][1])\n",
" i = i + 1\n",
" z = Z(h1,h2)\n",
" proj = projP(z, 2, m)\n",
" return proj"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"For these tests, we are looking for outliers outside of what should be $PS_{i} > \\sqrt{X_{0.025}^{2}}$ for a chi-square distribution. From the following [table](http://sites.stat.psu.edu/~mga/401/tables/Chi-square-table.pdf) we've determined that value to be 7.378, which is actually a squared projection so we're only looking for projections above it's root which is ~2.7166."
]
},
{
"cell_type": "code",
"execution_count": 204,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"This test has retrieved 25 outliers. Success!\n"
]
}
],
"source": [
"# Like before, lets make these projections, but we're not so concerned with retrieving medians from large sets.\n",
"# Instead lets just create a set and apply a statistical test to see if the outlier is caught.\n",
"\n",
"# Lets make an initial test to see how many outliers are caught without changing anything in a projection\n",
"# Since we're starting with 1000, if it retrieves 25 outliers, it's a success!\n",
"test1 = buildPs(1, 1000)\n",
"testResult1 = []\n",
"for i in test1:\n",
" if (i > 2.7166): testResult1.append(i)\n",
"print(\"This test has retrieved \" +str(len(testResult1)) + \" outliers. Success!\")"
]
},
{
"cell_type": "code",
"execution_count": 205,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"With 0 elements changed, the number of outliers is 25\n",
"With 1 elements changed, the number of outliers is 25\n",
"With 2 elements changed, the number of outliers is 25\n",
"With 3 elements changed, the number of outliers is 25\n",
"With 4 elements changed, the number of outliers is 26\n",
"With 5 elements changed, the number of outliers is 26\n",
"With 6 elements changed, the number of outliers is 26\n",
"With 7 elements changed, the number of outliers is 27\n",
"With 8 elements changed, the number of outliers is 28\n",
"With 9 elements changed, the number of outliers is 29\n"
]
}
],
"source": [
"# Now lets make an iterative test function that uses our new buildPsHout function to change a growing number of h element to outliers.\n",
"def pStatTest(start, end):\n",
" for i in range(start ,end):\n",
" test2 = buildPsHout(1, 1000, i)\n",
" testResult2 = []\n",
" for x in test2:\n",
" if (x > 2.7166): testResult2.append(i)\n",
" print(\"With \" + str(i) + \" elements changed, the number of outliers is \" + str(len(testResult2)))\n",
"\n",
"# Just to prove it's working, lets run the function for a fairly small initial range.\n",
"pStatTest(0, 10)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"It seems to be working so far! Now, according to class discussion, we purposed that this estimation method should \"break\" if about half of the data is an outlier, which would make sense. Lets perform the same test around the a small range of the median number of points."
]
},
{
"cell_type": "code",
"execution_count": 206,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"With 495 elements changed, the number of outliers is 494\n",
"With 496 elements changed, the number of outliers is 495\n",
"With 497 elements changed, the number of outliers is 496\n",
"With 498 elements changed, the number of outliers is 497\n",
"With 499 elements changed, the number of outliers is 0\n",
"With 500 elements changed, the number of outliers is 497\n",
"With 501 elements changed, the number of outliers is 496\n",
"With 502 elements changed, the number of outliers is 495\n",
"With 503 elements changed, the number of outliers is 494\n",
"With 504 elements changed, the number of outliers is 493\n"
]
}
],
"source": [
"pStatTest(495, 505)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As expected, the estimator breaks and starts going backwards in terms of determining outliers once it passes the median mark of 498 (instructions were to make 999 data points but to the construction of the previous functions, it happend to fall on 996. I believe the point is till valid even with 3 less points)."
]
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [conda root]",
"language": "python",
"name": "conda-root-py"
},
"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.2"
}
},
"nbformat": 4,
"nbformat_minor": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment