├── chapters ├── __init__.py ├── chapter9.py ├── chapter7.py ├── chapter10.py └── chapter8.py ├── data ├── ch10q11.csv ├── lsat_efron.csv ├── ch09q03.csv ├── snodgrass.csv ├── cloud_seeding.csv ├── geysers.csv ├── nerve.csv └── fijiquakes.csv ├── README.md ├── .gitignore ├── solutions ├── ch07q03.ipynb ├── ch9q02.ipynb ├── ch07q10.ipynb ├── ch09q07.ipynb ├── ch07q08.ipynb ├── ch08q01.ipynb ├── ch08q03.ipynb ├── ch10q11.ipynb ├── ch09q03.ipynb ├── ch10q07.ipynb └── ch08q07.ipynb └── images └── ch09q09_boxplot.svg /chapters/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /data/ch10q11.csv: -------------------------------------------------------------------------------- 1 | drug,total,nausea 2 | placebo,80,45 3 | chlorpromazine,75,26 4 | dimenhydrinate,85,52 5 | pentobarbital100,67,35 6 | pentobarbital150,85,37 7 | -------------------------------------------------------------------------------- /data/lsat_efron.csv: -------------------------------------------------------------------------------- 1 | lsat,gpa 2 | 576,3.39 3 | 635,3.30 4 | 558,2.81 5 | 578,3.03 6 | 666,3.44 7 | 580,3.07 8 | 555,3.00 9 | 661,3.43 10 | 651,3.36 11 | 605,3.13 12 | 653,3.12 13 | 575,2.74 14 | 545,2.76 15 | 572,2.88 16 | 594,3.96 17 | -------------------------------------------------------------------------------- /data/ch09q03.csv: -------------------------------------------------------------------------------- 1 | value 2 | 3.23 3 | -2.5 4 | 1.88 5 | -0.68 6 | 4.43 7 | 0.17 8 | 1.03 9 | -0.07 10 | -0.01 11 | 0.76 12 | 1.76 13 | 3.18 14 | 0.33 15 | -0.31 16 | 0.30 17 | -0.61 18 | 1.52 19 | 5.43 20 | 1.54 21 | 2.28 22 | 0.42 23 | 2.33 24 | -1.03 25 | 4.00 26 | 0.39 27 | -------------------------------------------------------------------------------- /data/snodgrass.csv: -------------------------------------------------------------------------------- 1 | author,total 2 | twain,.225 3 | twain,.262 4 | twain,.217 5 | twain,.240 6 | twain,.230 7 | twain,.229 8 | twain,.235 9 | twain,.217 10 | snodgrass,.209 11 | snodgrass,.205 12 | snodgrass,.196 13 | snodgrass,.210 14 | snodgrass,.202 15 | snodgrass,.207 16 | snodgrass,.224 17 | snodgrass,.223 18 | snodgrass,.220 19 | snodgrass,.201 20 | -------------------------------------------------------------------------------- /data/cloud_seeding.csv: -------------------------------------------------------------------------------- 1 | Unseeded_Clouds,Seeded_Clouds 2 | 1202.6,2745.6 3 | 830.1,1697.8 4 | 372.4,1656.0 5 | 345.5,978.0 6 | 321.2,703.4 7 | 244.3,489.1 8 | 163.0,430.0 9 | 147.8,334.1 10 | 95.0,302.8 11 | 87.0,274.7 12 | 81.2,274.7 13 | 68.5,255.0 14 | 47.3,242.5 15 | 41.1,200.7 16 | 36.6,198.6 17 | 29.0,129.6 18 | 28.6,119.0 19 | 26.3,118.3 20 | 26.1,115.3 21 | 24.4,92.4 22 | 21.7,40.6 23 | 17.3,32.7 24 | 11.5,31.4 25 | 4.9,17.5 26 | 4.9,7.7 27 | 1.0,4.1 28 | -------------------------------------------------------------------------------- /chapters/chapter9.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from scipy.stats import norm 3 | from .chapter7 import CI 4 | 5 | 6 | def parametric_bootstrap(dist, n, statistic, iters, random_state=0): 7 | for i in range(iters): 8 | yield statistic(dist.rvs(n, random_state=random_state+i)) 9 | 10 | 11 | def parametric_bootstrap_variance(dist, n, statistic, iters, random_state=0): 12 | boots = list(parametric_bootstrap(dist, n, statistic, iters, random_state=random_state)) 13 | vboot = np.var(boots, axis=0) 14 | return vboot 15 | -------------------------------------------------------------------------------- /chapters/chapter7.py: -------------------------------------------------------------------------------- 1 | import math 2 | from collections import namedtuple 3 | 4 | 5 | CI = namedtuple('CI', ('lower', 'upper')) 6 | 7 | 8 | class ECDF(object): 9 | 10 | def __init__(self, obs): 11 | self.observations = obs 12 | 13 | def __call__(self, x): 14 | return sum(1 for ob in self.observations if ob <= x) / len(self.observations) 15 | 16 | def error(self, a): 17 | n = len(self.observations) 18 | return math.sqrt(math.log(2 / a) / (2*n)) 19 | 20 | def ci(self, x, a=0.05): 21 | e = self.error(a) 22 | y = self(x) 23 | l = max(y - e, 0) 24 | u = min(y + e, 1) 25 | return CI(l, u) 26 | -------------------------------------------------------------------------------- /chapters/chapter10.py: -------------------------------------------------------------------------------- 1 | def bonferroni(ps, alpha): 2 | """ 3 | Return a p-value for multiple tests using Bonferroni. 4 | 5 | See page 166. 6 | """ 7 | return alpha / len(ps) 8 | 9 | 10 | def benjamini_hochberg(ps, alpha, independent=True): 11 | """ 12 | Return a p-value for multiple tests using the Benjamini-Hochberg method. 13 | 14 | See page 167. 15 | """ 16 | 17 | m = len(ps) 18 | ps = sorted(ps) 19 | 20 | if independent: 21 | c = 1 22 | else: 23 | c = sum(1 / i for i in range(1, m + 1)) 24 | 25 | ls = [i * alpha / (c * m) for i in range(1, m + 1)] 26 | r = max(i for i in range(m) if ps[i] < ls[i]) 27 | 28 | return ps[r] 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # All of Statistics 2 | 3 | Solutions to [Wasserman's 'All Of Statistics'](https://link.springer.com/book/10.1007/978-0-387-21736-9), using the 2005 corrected second printing, ISBN 0-387-40272-1. 4 | 5 | ## Organisation 6 | 7 | Please follow these guidelines: 8 | 9 | * Solutions go in [solutions](/solutions) as markdown or notebook (ipynb). They should be labelled `chXXqYY` where `XX` is the (0 padded) chapter number and `YY` is the (0 padded) question number. For example, question 3 from chapter 7 should be labelled `ch07q03`. 10 | * Anything useful/reusable/more involved should go in [chapters](/chapters). 11 | * Datasets go in [data](/data). 12 | * Use python 3, not python 2. 13 | 14 | Some more mathematical solutions may be found [on the blog](https://stappit.github.io/categories/allofstatistics.html). 15 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /chapters/chapter8.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from scipy.stats import norm 3 | from .chapter7 import CI 4 | 5 | 6 | def bootstrap(observations, statistic, iters, random_state=0): 7 | """ 8 | Yield the statistic applied to bootstapped samples. 9 | 10 | :observations: DataFrame, 11 | cols are random variables 12 | rows are observations 13 | 14 | :statistic: the statistic to be calculated on each sample 15 | :iters: int, the number of iterations 16 | """ 17 | 18 | n = len(observations) 19 | for i in range(iters): 20 | yield statistic(observations.sample(n, replace=True, 21 | random_state=random_state+i)) 22 | 23 | 24 | def bootstrap_variance(observations, statistic, iters, random_state=0): 25 | boots = list(bootstrap(observations, statistic, iters, 26 | random_state=random_state)) 27 | vboot = np.var(boots, axis=0) 28 | return vboot 29 | 30 | 31 | def bootstrap_ci_normal(observations, statistic, iters, a, random_state=0): 32 | t = statistic(observations) 33 | vboot = bootstrap_variance(observations, statistic, iters, 34 | random_state=random_state) 35 | seboot = np.sqrt(vboot) 36 | z = np.abs(norm.ppf(a / 2)) 37 | return CI(t - z*seboot, t + z*seboot) 38 | 39 | 40 | def bootstrap_ci_pivot(observations, statistic, iters, a, random_state=0): 41 | theta = statistic(observations) 42 | boots = list(bootstrap(observations, statistic, iters, random_state=random_state)) 43 | theta_l = np.percentile(boots, 100 - 100*a / 2) 44 | theta_r = np.percentile(boots, 100*a / 2) 45 | return CI(2*theta - theta_l, 2*theta - theta_r) 46 | 47 | 48 | def bootstrap_ci_percentile(observations, statistic, iters, a, random_state=0): 49 | boots = list(bootstrap(observations, statistic, iters, random_state=random_state)) 50 | theta_l = np.percentile(boots, 100*a / 2, axis=0) 51 | theta_r = np.percentile(boots, 100 - 100*a / 2, axis=0) 52 | return CI(theta_l, theta_r) 53 | -------------------------------------------------------------------------------- /solutions/ch07q03.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 4, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "The autoreload extension is already loaded. To reload it, use:\n", 13 | " %reload_ext autoreload\n" 14 | ] 15 | } 16 | ], 17 | "source": [ 18 | "import sys\n", 19 | "sys.path.append('..')\n", 20 | "\n", 21 | "from scipy.stats import norm, cauchy\n", 22 | "\n", 23 | "%load_ext autoreload\n", 24 | "%autoreload 2\n", 25 | "\n", 26 | "from chapters.chapter7 import ECDF" 27 | ] 28 | }, 29 | { 30 | "cell_type": "code", 31 | "execution_count": 5, 32 | "metadata": {}, 33 | "outputs": [ 34 | { 35 | "data": { 36 | "text/plain": [ 37 | "0.959" 38 | ] 39 | }, 40 | "execution_count": 5, 41 | "metadata": {}, 42 | "output_type": "execute_result" 43 | } 44 | ], 45 | "source": [ 46 | "def experiment(dist, iters=1000, size=100):\n", 47 | " correct = 0\n", 48 | " for _ in range(iters):\n", 49 | " xs = dist.rvs(size=size)\n", 50 | " F = ECDF(xs)\n", 51 | " c = sum(1 for x in xs if F.ci(x).lower <= dist.cdf(x) <= F.ci(x).upper) == len(xs)\n", 52 | " correct += c\n", 53 | " \n", 54 | " return correct / iters\n", 55 | "\n", 56 | "experiment(norm)" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 6, 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "data": { 66 | "text/plain": [ 67 | "0.964" 68 | ] 69 | }, 70 | "execution_count": 6, 71 | "metadata": {}, 72 | "output_type": "execute_result" 73 | } 74 | ], 75 | "source": [ 76 | "experiment(cauchy)" 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": null, 82 | "metadata": { 83 | "collapsed": true 84 | }, 85 | "outputs": [], 86 | "source": [] 87 | } 88 | ], 89 | "metadata": { 90 | "kernelspec": { 91 | "display_name": "Python 3", 92 | "language": "python", 93 | "name": "python3" 94 | }, 95 | "language_info": { 96 | "codemirror_mode": { 97 | "name": "ipython", 98 | "version": 3 99 | }, 100 | "file_extension": ".py", 101 | "mimetype": "text/x-python", 102 | "name": "python", 103 | "nbconvert_exporter": "python", 104 | "pygments_lexer": "ipython3", 105 | "version": "3.4.3" 106 | } 107 | }, 108 | "nbformat": 4, 109 | "nbformat_minor": 2 110 | } 111 | -------------------------------------------------------------------------------- /solutions/ch9q02.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "import numpy as np" 12 | ] 13 | }, 14 | { 15 | "cell_type": "code", 16 | "execution_count": 2, 17 | "metadata": { 18 | "collapsed": true 19 | }, 20 | "outputs": [], 21 | "source": [ 22 | "a = 1\n", 23 | "b = 3\n", 24 | "n = 10" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": 3, 30 | "metadata": { 31 | "collapsed": true 32 | }, 33 | "outputs": [], 34 | "source": [ 35 | "a_n = []\n", 36 | "b_n = []\n", 37 | "\n", 38 | "for i in range(1000):\n", 39 | " sample = np.random.uniform(low=a, high=b, size=n)\n", 40 | " a_n.append(np.min(sample))\n", 41 | " b_n.append(np.max(sample))\n", 42 | " " 43 | ] 44 | }, 45 | { 46 | "cell_type": "code", 47 | "execution_count": 7, 48 | "metadata": { 49 | "collapsed": true 50 | }, 51 | "outputs": [], 52 | "source": [ 53 | "a_hat = np.mean(a_n)\n", 54 | "a_se = np.std(a_n)\n", 55 | "b_hat = np.mean(b_n)\n", 56 | "b_se = np.std(b_n)" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": 8, 62 | "metadata": {}, 63 | "outputs": [ 64 | { 65 | "data": { 66 | "text/plain": [ 67 | "(1.1941042516407383, 0.84548759286368136, 1.5427209104177952)" 68 | ] 69 | }, 70 | "execution_count": 8, 71 | "metadata": {}, 72 | "output_type": "execute_result" 73 | } 74 | ], 75 | "source": [ 76 | "a_hat, a_hat-1.96*a_se, a_hat+1.96*a_se" 77 | ] 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": 9, 82 | "metadata": {}, 83 | "outputs": [ 84 | { 85 | "data": { 86 | "text/plain": [ 87 | "(2.8130740778803318, 2.46884620062258, 3.1573019551380836)" 88 | ] 89 | }, 90 | "execution_count": 9, 91 | "metadata": {}, 92 | "output_type": "execute_result" 93 | } 94 | ], 95 | "source": [ 96 | "b_hat, b_hat-1.96*b_se, b_hat+1.96*b_se" 97 | ] 98 | }, 99 | { 100 | "cell_type": "markdown", 101 | "metadata": {}, 102 | "source": [ 103 | "Bootstrap method fails here ^^ " 104 | ] 105 | }, 106 | { 107 | "cell_type": "code", 108 | "execution_count": null, 109 | "metadata": { 110 | "collapsed": true 111 | }, 112 | "outputs": [], 113 | "source": [] 114 | } 115 | ], 116 | "metadata": { 117 | "kernelspec": { 118 | "display_name": "Python 3", 119 | "language": "python", 120 | "name": "python3" 121 | }, 122 | "language_info": { 123 | "codemirror_mode": { 124 | "name": "ipython", 125 | "version": 3 126 | }, 127 | "file_extension": ".py", 128 | "mimetype": "text/x-python", 129 | "name": "python", 130 | "nbconvert_exporter": "python", 131 | "pygments_lexer": "ipython3", 132 | "version": "3.5.1" 133 | } 134 | }, 135 | "nbformat": 4, 136 | "nbformat_minor": 2 137 | } 138 | -------------------------------------------------------------------------------- /data/geysers.csv: -------------------------------------------------------------------------------- 1 | index,eruptions,waiting 2 | 1, 3.600,79 3 | 2, 1.800,54 4 | 3, 3.333,74 5 | 4, 2.283,62 6 | 5, 4.533,85 7 | 6, 2.883,55 8 | 7, 4.700,88 9 | 8, 3.600,85 10 | 9, 1.950,51 11 | 10,4.350,85 12 | 11,1.833,54 13 | 12,3.917,84 14 | 13,4.200,78 15 | 14,1.750,47 16 | 15,4.700,83 17 | 16,2.167,52 18 | 17,1.750,62 19 | 18,4.800,84 20 | 19,1.600,52 21 | 20,4.250,79 22 | 21,1.800,51 23 | 22,1.750,47 24 | 23,3.450,78 25 | 24,3.067,69 26 | 25,4.533,74 27 | 26,3.600,83 28 | 27,1.967,55 29 | 28,4.083,76 30 | 29,3.850,78 31 | 30,4.433,79 32 | 31,4.300,73 33 | 32,4.467,77 34 | 33,3.367,66 35 | 34,4.033,80 36 | 35,3.833,74 37 | 36,2.017,52 38 | 37,1.867,48 39 | 38,4.833,80 40 | 39,1.833,59 41 | 40,4.783,90 42 | 41,4.350,80 43 | 42,1.883,58 44 | 43,4.567,84 45 | 44,1.750,58 46 | 45,4.533,73 47 | 46,3.317,83 48 | 47,3.833,64 49 | 48,2.100,53 50 | 49,4.633,82 51 | 50,2.000,59 52 | 51,4.800,75 53 | 52,4.716,90 54 | 53,1.833,54 55 | 54,4.833,80 56 | 55,1.733,54 57 | 56,4.883,83 58 | 57,3.717,71 59 | 58,1.667,64 60 | 59,4.567,77 61 | 60,4.317,81 62 | 61,2.233,59 63 | 62,4.500,84 64 | 63,1.750,48 65 | 64,4.800,82 66 | 65,1.817,60 67 | 66,4.400,92 68 | 67,4.167,78 69 | 68,4.700,78 70 | 69,2.067,65 71 | 70,4.700,73 72 | 71,4.033,82 73 | 72,1.967,56 74 | 73,4.500,79 75 | 74,4.000,71 76 | 75,1.983,62 77 | 76,5.067,76 78 | 77,2.017,60 79 | 78,4.567,78 80 | 79,3.883,76 81 | 80,3.600,83 82 | 81,4.133,75 83 | 82,4.333,82 84 | 83,4.100,70 85 | 84,2.633,65 86 | 85,4.067,73 87 | 86,4.933,88 88 | 87,3.950,76 89 | 88,4.517,80 90 | 89,2.167,48 91 | 90,4.000,86 92 | 91,2.200,60 93 | 92,4.333,90 94 | 93,1.867,50 95 | 94,4.817,78 96 | 95,1.833,63 97 | 96,4.300,72 98 | 97,4.667,84 99 | 98,3.750,75 100 | 99,1.867,51 101 | 100,4.900,82 102 | 101,2.483,62 103 | 102,4.367,88 104 | 103,2.100,49 105 | 104,4.500,83 106 | 105,4.050,81 107 | 106,1.867,47 108 | 107,4.700,84 109 | 108,1.783,52 110 | 109,4.850,86 111 | 110,3.683,81 112 | 111,4.733,75 113 | 112,2.300,59 114 | 113,4.900,89 115 | 114,4.417,79 116 | 115,1.700,59 117 | 116,4.633,81 118 | 117,2.317,50 119 | 118,4.600,85 120 | 119,1.817,59 121 | 120,4.417,87 122 | 121,2.617,53 123 | 122,4.067,69 124 | 123,4.250,77 125 | 124,1.967,56 126 | 125,4.600,88 127 | 126,3.767,81 128 | 127,1.917,45 129 | 128,4.500,82 130 | 129,2.267,55 131 | 130,4.650,90 132 | 131,1.867,45 133 | 132,4.167,83 134 | 133,2.800,56 135 | 134,4.333,89 136 | 135,1.833,46 137 | 136,4.383,82 138 | 137,1.883,51 139 | 138,4.933,86 140 | 139,2.033,53 141 | 140,3.733,79 142 | 141,4.233,81 143 | 142,2.233,60 144 | 143,4.533,82 145 | 144,4.817,77 146 | 145,4.333,76 147 | 146,1.983,59 148 | 147,4.633,80 149 | 148,2.017,49 150 | 149,5.100,96 151 | 150,1.800,53 152 | 151,5.033,77 153 | 152,4.000,77 154 | 153,2.400,65 155 | 154,4.600,81 156 | 155,3.567,71 157 | 156,4.000,70 158 | 157,4.500,81 159 | 158,4.083,93 160 | 159,1.800,53 161 | 160,3.967,89 162 | 161,2.200,45 163 | 162,4.150,86 164 | 163,2.000,58 165 | 164,3.833,78 166 | 165,3.500,66 167 | 166,4.583,76 168 | 167,2.367,63 169 | 168,5.000,88 170 | 169,1.933,52 171 | 170,4.617,93 172 | 171,1.917,49 173 | 172,2.083,57 174 | 173,4.583,77 175 | 174,3.333,68 176 | 175,4.167,81 177 | 176,4.333,81 178 | 177,4.500,73 179 | 178,2.417,50 180 | 179,4.000,85 181 | 180,4.167,74 182 | 181,1.883,55 183 | 182,4.583,77 184 | 183,4.250,83 185 | 184,3.767,83 186 | 185,2.033,51 187 | 186,4.433,78 188 | 187,4.083,84 189 | 188,1.833,46 190 | 189,4.417,83 191 | 190,2.183,55 192 | 191,4.800,81 193 | 192,1.833,57 194 | 193,4.800,76 195 | 194,4.100,84 196 | 195,3.966,77 197 | 196,4.233,81 198 | 197,3.500,87 199 | 198,4.366,77 200 | 199,2.250,51 201 | 200,4.667,78 202 | 201,2.100,60 203 | 202,4.350,82 204 | 203,4.133,91 205 | 204,1.867,53 206 | 205,4.600,78 207 | 206,1.783,46 208 | 207,4.367,77 209 | 208,3.850,84 210 | 209,1.933,49 211 | 210,4.500,83 212 | 211,2.383,71 213 | 212,4.700,80 214 | 213,1.867,49 215 | 214,3.833,75 216 | 215,3.417,64 217 | 216,4.233,76 218 | 217,2.400,53 219 | 218,4.800,94 220 | 219,2.000,55 221 | 220,4.150,76 222 | 221,1.867,50 223 | 222,4.267,82 224 | 223,1.750,54 225 | 224,4.483,75 226 | 225,4.000,78 227 | 226,4.117,79 228 | 227,4.083,78 229 | 228,4.267,78 230 | 229,3.917,70 231 | 230,4.550,79 232 | 231,4.083,70 233 | 232,2.417,54 234 | 233,4.183,86 235 | 234,2.217,50 236 | 235,4.450,90 237 | 236,1.883,54 238 | 237,1.850,54 239 | 238,4.283,77 240 | 239,3.950,79 241 | 240,2.333,64 242 | 241,4.150,75 243 | 242,2.350,47 244 | 243,4.933,86 245 | 244,2.900,63 246 | 245,4.583,85 247 | 246,3.833,82 248 | 247,2.083,57 249 | 248,4.367,82 250 | 249,2.133,67 251 | 250,4.350,74 252 | 251,2.200,54 253 | 252,4.450,83 254 | 253,3.567,73 255 | 254,4.500,73 256 | 255,4.150,88 257 | 256,3.817,80 258 | 257,3.917,71 259 | 258,4.450,83 260 | 259,2.000,56 261 | 260,4.283,79 262 | 261,4.767,78 263 | 262,4.533,84 264 | 263,1.850,58 265 | 264,4.250,83 266 | 265,1.983,43 267 | 266,2.250,60 268 | 267,4.750,75 269 | 268,4.117,81 270 | 269,2.150,46 271 | 270,4.417,90 272 | 271,1.817,46 273 | 272,4.467,74 274 | -------------------------------------------------------------------------------- /solutions/ch07q10.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "/Users/Steve/aos\n" 13 | ] 14 | } 15 | ], 16 | "source": [ 17 | "cd ../.." 18 | ] 19 | }, 20 | { 21 | "cell_type": "code", 22 | "execution_count": 2, 23 | "metadata": { 24 | "collapsed": true 25 | }, 26 | "outputs": [ 27 | { 28 | "name": "stderr", 29 | "output_type": "stream", 30 | "text": [ 31 | "/home/brian/.virtualenvs/this/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n", 32 | " return f(*args, **kwds)\n" 33 | ] 34 | } 35 | ], 36 | "source": [ 37 | "import pandas as pd\n", 38 | "import numpy as np" 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": 3, 44 | "metadata": { 45 | "collapsed": true 46 | }, 47 | "outputs": [], 48 | "source": [ 49 | "clouds = pd.read_csv('../data/cloud_seeding.csv')" 50 | ] 51 | }, 52 | { 53 | "cell_type": "code", 54 | "execution_count": 9, 55 | "metadata": { 56 | "collapsed": true 57 | }, 58 | "outputs": [], 59 | "source": [ 60 | "seeded = clouds['Seeded_Clouds']\n", 61 | "unseeded = clouds['Unseeded_Clouds']" 62 | ] 63 | }, 64 | { 65 | "cell_type": "markdown", 66 | "metadata": {}, 67 | "source": [ 68 | "We have the following parameter:\n", 69 | "\n", 70 | "$\\theta = T(F_2) - T(F_1)$\n", 71 | "\n", 72 | "With the following estimator:\n", 73 | "\n", 74 | "$\\hat{\\theta} = \\hat{\\mu_2} - \\hat{\\mu_1}$\n", 75 | "\n", 76 | "The variance is given by:\n", 77 | "\n", 78 | "$V(\\hat{\\theta}) = V(\\hat{\\mu_2} - \\hat{\\mu_1})$\n", 79 | "\n", 80 | "$ = V(\\hat{\\mu_2}) + V(\\hat{\\mu_1})$\n", 81 | "\n", 82 | "And the standard error is:\n", 83 | "\n", 84 | "$se(\\hat{\\theta}) = \\sqrt{V(\\hat{\\theta})}$" 85 | ] 86 | }, 87 | { 88 | "cell_type": "code", 89 | "execution_count": 10, 90 | "metadata": { 91 | "collapsed": true 92 | }, 93 | "outputs": [], 94 | "source": [ 95 | "# n obs\n", 96 | "n_s = len(seeded)\n", 97 | "n_u = len(unseeded)" 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": 11, 103 | "metadata": { 104 | "collapsed": true 105 | }, 106 | "outputs": [], 107 | "source": [ 108 | "mu_s = np.mean(seeded)\n", 109 | "mu_u = np.mean(unseeded)" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": 12, 115 | "metadata": { 116 | "collapsed": true 117 | }, 118 | "outputs": [], 119 | "source": [ 120 | "mu_theta = mu_s - mu_u" 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": 13, 126 | "metadata": { 127 | "collapsed": true 128 | }, 129 | "outputs": [], 130 | "source": [ 131 | "se_theta = np.sqrt(np.var(seeded) / n_s + np.var(unseeded) / n_u)" 132 | ] 133 | }, 134 | { 135 | "cell_type": "code", 136 | "execution_count": 14, 137 | "metadata": { 138 | "collapsed": true 139 | }, 140 | "outputs": [ 141 | { 142 | "data": { 143 | "text/plain": [ 144 | "136.124128223444" 145 | ] 146 | }, 147 | "execution_count": 14, 148 | "metadata": {}, 149 | "output_type": "execute_result" 150 | } 151 | ], 152 | "source": [ 153 | "se_theta" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 17, 159 | "metadata": { 160 | "collapsed": true 161 | }, 162 | "outputs": [], 163 | "source": [ 164 | "# confidence interval (.95)\n", 165 | "z = 1.96\n", 166 | "U = mu_theta + z*se_theta\n", 167 | "L = mu_theta - z*se_theta" 168 | ] 169 | }, 170 | { 171 | "cell_type": "code", 172 | "execution_count": 18, 173 | "metadata": {}, 174 | "outputs": [ 175 | { 176 | "data": { 177 | "text/plain": [ 178 | "(544.1994451641041, 10.592862528203682)" 179 | ] 180 | }, 181 | "execution_count": 18, 182 | "metadata": {}, 183 | "output_type": "execute_result" 184 | } 185 | ], 186 | "source": [ 187 | "# not significant @ .95\n", 188 | "U, L" 189 | ] 190 | }, 191 | { 192 | "cell_type": "code", 193 | "execution_count": null, 194 | "metadata": {}, 195 | "outputs": [], 196 | "source": [] 197 | } 198 | ], 199 | "metadata": { 200 | "kernelspec": { 201 | "display_name": "Python 3", 202 | "language": "python", 203 | "name": "python3" 204 | }, 205 | "language_info": { 206 | "codemirror_mode": { 207 | "name": "ipython", 208 | "version": 3 209 | }, 210 | "file_extension": ".py", 211 | "mimetype": "text/x-python", 212 | "name": "python", 213 | "nbconvert_exporter": "python", 214 | "pygments_lexer": "ipython3", 215 | "version": "3.5.2" 216 | } 217 | }, 218 | "nbformat": 4, 219 | "nbformat_minor": 2 220 | } 221 | -------------------------------------------------------------------------------- /solutions/ch09q07.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 17, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "The autoreload extension is already loaded. To reload it, use:\n", 13 | " %reload_ext autoreload\n" 14 | ] 15 | } 16 | ], 17 | "source": [ 18 | "import sys\n", 19 | "sys.path.append('..')\n", 20 | "\n", 21 | "from scipy.stats import binom, norm\n", 22 | "import pandas as pd\n", 23 | "import numpy as np\n", 24 | "import seaborn as sns\n", 25 | "import matplotlib.pyplot as plt\n", 26 | "\n", 27 | "from chapters.chapter7 import CI\n", 28 | "from chapters.chapter8 import bootstrap, bootstrap_variance\n", 29 | "from chapters.chapter9 import parametric_bootstrap, parametric_bootstrap_variance\n", 30 | "\n", 31 | "%load_ext autoreload\n", 32 | "%autoreload 2\n", 33 | "\n", 34 | "%matplotlib inline\n", 35 | "plt.style.use('ggplot')" 36 | ] 37 | }, 38 | { 39 | "cell_type": "markdown", 40 | "metadata": {}, 41 | "source": [ 42 | "## MLE" 43 | ] 44 | }, 45 | { 46 | "cell_type": "markdown", 47 | "metadata": {}, 48 | "source": [ 49 | "The MLE for $\\psi$ is $\\hat \\psi = \\hat p_1 - \\hat p_2$." 50 | ] 51 | }, 52 | { 53 | "cell_type": "markdown", 54 | "metadata": {}, 55 | "source": [ 56 | "The Fisher information matrix is\n", 57 | "$$\n", 58 | "\\begin{pmatrix}\n", 59 | " \\frac{n1}{p_1 (1-p_1)} & 0 \\\\\n", 60 | " 0 & \\frac{n1}{p_1 (1-p_1)}\n", 61 | "\\end{pmatrix}\n", 62 | "$$" 63 | ] 64 | }, 65 | { 66 | "cell_type": "markdown", 67 | "metadata": {}, 68 | "source": [ 69 | "The delta method standard error is $\\sqrt{\\frac{p_1 (1 - p_1)}{n_1} + \\frac{p_2 (1 - p_2)}{n_2}}$" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": 26, 75 | "metadata": {}, 76 | "outputs": [ 77 | { 78 | "data": { 79 | "text/plain": [ 80 | "0.06000000000000005" 81 | ] 82 | }, 83 | "execution_count": 26, 84 | "metadata": {}, 85 | "output_type": "execute_result" 86 | } 87 | ], 88 | "source": [ 89 | "n1 = 200\n", 90 | "n2 = n1\n", 91 | "x1 = 160\n", 92 | "x2 = 148\n", 93 | "p1_hat = x1 / n1\n", 94 | "p2_hat = x2 / n2\n", 95 | "\n", 96 | "psi_hat = p1_hat - p2_hat\n", 97 | "mle = psi_hat\n", 98 | "psi_hat" 99 | ] 100 | }, 101 | { 102 | "cell_type": "code", 103 | "execution_count": 29, 104 | "metadata": {}, 105 | "outputs": [ 106 | { 107 | "data": { 108 | "text/plain": [ 109 | "0.041976183723630711" 110 | ] 111 | }, 112 | "execution_count": 29, 113 | "metadata": {}, 114 | "output_type": "execute_result" 115 | } 116 | ], 117 | "source": [ 118 | "se_delta = np.sqrt((p1_hat * (1 - p1_hat)) / n1 + (p2_hat * (1 - p2_hat)) / n2)\n", 119 | "se_delta" 120 | ] 121 | }, 122 | { 123 | "cell_type": "code", 124 | "execution_count": 30, 125 | "metadata": {}, 126 | "outputs": [ 127 | { 128 | "data": { 129 | "text/plain": [ 130 | "1.6448536269514722" 131 | ] 132 | }, 133 | "execution_count": 30, 134 | "metadata": {}, 135 | "output_type": "execute_result" 136 | } 137 | ], 138 | "source": [ 139 | "alpha = 0.05\n", 140 | "z_alpha = norm.ppf(1 - alpha)\n", 141 | "z_alpha" 142 | ] 143 | }, 144 | { 145 | "cell_type": "code", 146 | "execution_count": 31, 147 | "metadata": {}, 148 | "outputs": [ 149 | { 150 | "data": { 151 | "text/plain": [ 152 | "CI(lower=-0.0090446780433952739, upper=0.12904467804339537)" 153 | ] 154 | }, 155 | "execution_count": 31, 156 | "metadata": {}, 157 | "output_type": "execute_result" 158 | } 159 | ], 160 | "source": [ 161 | "ci_delta = CI(mle - z_alpha * se_delta, mle + z_alpha * se_delta)\n", 162 | "ci_delta" 163 | ] 164 | }, 165 | { 166 | "cell_type": "markdown", 167 | "metadata": {}, 168 | "source": [ 169 | "## Parametric Bootstrap" 170 | ] 171 | }, 172 | { 173 | "cell_type": "code", 174 | "execution_count": 28, 175 | "metadata": {}, 176 | "outputs": [ 177 | { 178 | "data": { 179 | "text/plain": [ 180 | "0.0017500987677499999" 181 | ] 182 | }, 183 | "execution_count": 28, 184 | "metadata": {}, 185 | "output_type": "execute_result" 186 | } 187 | ], 188 | "source": [ 189 | "dist1 = binom(n1, p1_hat)\n", 190 | "dist2 = binom(n2, p2_hat)\n", 191 | "\n", 192 | "statistic = np.mean\n", 193 | "\n", 194 | "seed1 = 121111\n", 195 | "seed2 = 951\n", 196 | "\n", 197 | "iters = 10000\n", 198 | "\n", 199 | "boots1 = parametric_bootstrap(dist1, 1, statistic, iters, random_state=seed1)\n", 200 | "boots2 = parametric_bootstrap(dist2, 1, statistic, iters, random_state=seed2)\n", 201 | "\n", 202 | "boots = (xx1/n1 - xx2/n2 for xx1, xx2 in zip(boots1, boots2))\n", 203 | "se_boot = np.var(list(boots))\n", 204 | "se_boot" 205 | ] 206 | }, 207 | { 208 | "cell_type": "code", 209 | "execution_count": 32, 210 | "metadata": {}, 211 | "outputs": [ 212 | { 213 | "data": { 214 | "text/plain": [ 215 | "CI(lower=0.057121343694343164, upper=0.062878656305656949)" 216 | ] 217 | }, 218 | "execution_count": 32, 219 | "metadata": {}, 220 | "output_type": "execute_result" 221 | } 222 | ], 223 | "source": [ 224 | "ci_boot = CI(psi_hat - z_alpha * se_boot, psi_hat + z_alpha * se_boot)\n", 225 | "ci_boot" 226 | ] 227 | }, 228 | { 229 | "cell_type": "code", 230 | "execution_count": null, 231 | "metadata": { 232 | "collapsed": true 233 | }, 234 | "outputs": [], 235 | "source": [] 236 | } 237 | ], 238 | "metadata": { 239 | "kernelspec": { 240 | "display_name": "Python 3", 241 | "language": "python", 242 | "name": "python3" 243 | }, 244 | "language_info": { 245 | "codemirror_mode": { 246 | "name": "ipython", 247 | "version": 3 248 | }, 249 | "file_extension": ".py", 250 | "mimetype": "text/x-python", 251 | "name": "python", 252 | "nbconvert_exporter": "python", 253 | "pygments_lexer": "ipython3", 254 | "version": "3.5.2" 255 | } 256 | }, 257 | "nbformat": 4, 258 | "nbformat_minor": 2 259 | } 260 | -------------------------------------------------------------------------------- /solutions/ch07q08.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "/Users/Steve/aos\n" 13 | ] 14 | } 15 | ], 16 | "source": [ 17 | "cd ../.." 18 | ] 19 | }, 20 | { 21 | "cell_type": "code", 22 | "execution_count": 1, 23 | "metadata": { 24 | "collapsed": true 25 | }, 26 | "outputs": [ 27 | { 28 | "name": "stderr", 29 | "output_type": "stream", 30 | "text": [ 31 | "/home/brian/.virtualenvs/this/lib/python3.5/importlib/_bootstrap.py:222: RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility. Expected 96, got 88\n", 32 | " return f(*args, **kwds)\n" 33 | ] 34 | } 35 | ], 36 | "source": [ 37 | "import pandas as pd" 38 | ] 39 | }, 40 | { 41 | "cell_type": "code", 42 | "execution_count": 3, 43 | "metadata": { 44 | "collapsed": true 45 | }, 46 | "outputs": [], 47 | "source": [ 48 | "geysers = pd.read_csv('../data/geysers.csv')" 49 | ] 50 | }, 51 | { 52 | "cell_type": "code", 53 | "execution_count": 4, 54 | "metadata": {}, 55 | "outputs": [ 56 | { 57 | "data": { 58 | "text/plain": [ 59 | "(272, 3)" 60 | ] 61 | }, 62 | "execution_count": 4, 63 | "metadata": {}, 64 | "output_type": "execute_result" 65 | } 66 | ], 67 | "source": [ 68 | "geysers.shape" 69 | ] 70 | }, 71 | { 72 | "cell_type": "code", 73 | "execution_count": 5, 74 | "metadata": { 75 | "collapsed": true 76 | }, 77 | "outputs": [], 78 | "source": [ 79 | "import numpy as np" 80 | ] 81 | }, 82 | { 83 | "cell_type": "code", 84 | "execution_count": 6, 85 | "metadata": {}, 86 | "outputs": [ 87 | { 88 | "data": { 89 | "text/plain": [ 90 | "70.8970588235294" 91 | ] 92 | }, 93 | "execution_count": 6, 94 | "metadata": {}, 95 | "output_type": "execute_result" 96 | } 97 | ], 98 | "source": [ 99 | "np.mean(geysers['waiting'])" 100 | ] 101 | }, 102 | { 103 | "cell_type": "code", 104 | "execution_count": 7, 105 | "metadata": {}, 106 | "outputs": [ 107 | { 108 | "data": { 109 | "text/plain": [ 110 | "13.569960017586371" 111 | ] 112 | }, 113 | "execution_count": 7, 114 | "metadata": {}, 115 | "output_type": "execute_result" 116 | } 117 | ], 118 | "source": [ 119 | "np.std(geysers['waiting'])" 120 | ] 121 | }, 122 | { 123 | "cell_type": "code", 124 | "execution_count": 8, 125 | "metadata": {}, 126 | "outputs": [ 127 | { 128 | "data": { 129 | "text/plain": [ 130 | "76.0" 131 | ] 132 | }, 133 | "execution_count": 8, 134 | "metadata": {}, 135 | "output_type": "execute_result" 136 | } 137 | ], 138 | "source": [ 139 | "np.median(geysers['waiting'])" 140 | ] 141 | }, 142 | { 143 | "cell_type": "markdown", 144 | "metadata": {}, 145 | "source": [ 146 | "## Doing it manually" 147 | ] 148 | }, 149 | { 150 | "cell_type": "markdown", 151 | "metadata": {}, 152 | "source": [ 153 | "Plug-in estimators:\n", 154 | "\n", 155 | "Mean:\n", 156 | "$\\hat{\\mu} = \\frac{1}{n} \\sum_{i=1}^{n} X_i$\n", 157 | "\n", 158 | "Variance:\n", 159 | "$\\hat{\\sigma}^2 = \\frac{1}{n} \\sum_{i=1}^{n} (X_i - \\hat{\\mu})^2$\n", 160 | "\n", 161 | "Standard error:\n", 162 | "$\\hat{\\sigma} = \\sqrt{\\hat{\\sigma}^2}$ " 163 | ] 164 | }, 165 | { 166 | "cell_type": "code", 167 | "execution_count": 9, 168 | "metadata": { 169 | "collapsed": true 170 | }, 171 | "outputs": [], 172 | "source": [ 173 | "x = geysers['waiting']" 174 | ] 175 | }, 176 | { 177 | "cell_type": "code", 178 | "execution_count": 10, 179 | "metadata": {}, 180 | "outputs": [], 181 | "source": [ 182 | "n = len(x)" 183 | ] 184 | }, 185 | { 186 | "cell_type": "code", 187 | "execution_count": 11, 188 | "metadata": { 189 | "collapsed": true 190 | }, 191 | "outputs": [], 192 | "source": [ 193 | "mean = np.sum(x) / n" 194 | ] 195 | }, 196 | { 197 | "cell_type": "code", 198 | "execution_count": 12, 199 | "metadata": { 200 | "collapsed": true 201 | }, 202 | "outputs": [], 203 | "source": [ 204 | "var = np.sum((x - mean)**2) / n" 205 | ] 206 | }, 207 | { 208 | "cell_type": "code", 209 | "execution_count": 13, 210 | "metadata": {}, 211 | "outputs": [], 212 | "source": [ 213 | "std = np.sqrt(var)" 214 | ] 215 | }, 216 | { 217 | "cell_type": "code", 218 | "execution_count": 17, 219 | "metadata": {}, 220 | "outputs": [], 221 | "source": [ 222 | "se = std / np.sqrt(n)" 223 | ] 224 | }, 225 | { 226 | "cell_type": "code", 227 | "execution_count": 18, 228 | "metadata": {}, 229 | "outputs": [ 230 | { 231 | "data": { 232 | "text/plain": [ 233 | "(70.8970588235294, 0.8227996836458397)" 234 | ] 235 | }, 236 | "execution_count": 18, 237 | "metadata": {}, 238 | "output_type": "execute_result" 239 | } 240 | ], 241 | "source": [ 242 | "mean, se" 243 | ] 244 | }, 245 | { 246 | "cell_type": "code", 247 | "execution_count": 21, 248 | "metadata": { 249 | "collapsed": true 250 | }, 251 | "outputs": [], 252 | "source": [ 253 | "# confidence intervals\n", 254 | "z = 1.64 # critical value for \\alpha = .1\n", 255 | "U = mean + z*se\n", 256 | "L = mean - z*se" 257 | ] 258 | }, 259 | { 260 | "cell_type": "code", 261 | "execution_count": 23, 262 | "metadata": {}, 263 | "outputs": [ 264 | { 265 | "data": { 266 | "text/plain": [ 267 | "(93.15179325237105, 48.642324394687762)" 268 | ] 269 | }, 270 | "execution_count": 23, 271 | "metadata": {}, 272 | "output_type": "execute_result" 273 | } 274 | ], 275 | "source": [ 276 | "U, L" 277 | ] 278 | } 279 | ], 280 | "metadata": { 281 | "kernelspec": { 282 | "display_name": "Python 3", 283 | "language": "python", 284 | "name": "python3" 285 | }, 286 | "language_info": { 287 | "codemirror_mode": { 288 | "name": "ipython", 289 | "version": 3 290 | }, 291 | "file_extension": ".py", 292 | "mimetype": "text/x-python", 293 | "name": "python", 294 | "nbconvert_exporter": "python", 295 | "pygments_lexer": "ipython3", 296 | "version": "3.5.2" 297 | } 298 | }, 299 | "nbformat": 4, 300 | "nbformat_minor": 2 301 | } 302 | -------------------------------------------------------------------------------- /solutions/ch08q01.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 69, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "The autoreload extension is already loaded. To reload it, use:\n", 13 | " %reload_ext autoreload\n" 14 | ] 15 | } 16 | ], 17 | "source": [ 18 | "import sys\n", 19 | "sys.path.append('..')\n", 20 | "\n", 21 | "import pandas as pd\n", 22 | "import numpy as np\n", 23 | "import seaborn as sns\n", 24 | "import re\n", 25 | "import matplotlib as mpl\n", 26 | "import matplotlib.pyplot as plt\n", 27 | "%matplotlib inline\n", 28 | "%load_ext autoreload\n", 29 | "%autoreload 2\n", 30 | "\n", 31 | "from chapters.chapter8 import *" 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": 77, 37 | "metadata": { 38 | "collapsed": true 39 | }, 40 | "outputs": [], 41 | "source": [ 42 | "# numpy assumes columns are observations, so we have to transpose our data\n", 43 | "corr = lambda df: np.corrcoef(df.T)" 44 | ] 45 | }, 46 | { 47 | "cell_type": "code", 48 | "execution_count": 70, 49 | "metadata": {}, 50 | "outputs": [ 51 | { 52 | "data": { 53 | "text/html": [ 54 | "
\n", 55 | "\n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | "
lsatgpa
05763.39
16353.30
25582.81
35783.03
46663.44
\n", 91 | "
" 92 | ], 93 | "text/plain": [ 94 | " lsat gpa\n", 95 | "0 576 3.39\n", 96 | "1 635 3.30\n", 97 | "2 558 2.81\n", 98 | "3 578 3.03\n", 99 | "4 666 3.44" 100 | ] 101 | }, 102 | "execution_count": 70, 103 | "metadata": {}, 104 | "output_type": "execute_result" 105 | } 106 | ], 107 | "source": [ 108 | "df = pd.read_csv('../data/lsat_efron.csv')\n", 109 | "df.head()" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": 75, 115 | "metadata": {}, 116 | "outputs": [ 117 | { 118 | "data": { 119 | "text/plain": [ 120 | "array([[ 1. , 0.54591892],\n", 121 | " [ 0.54591892, 1. ]])" 122 | ] 123 | }, 124 | "execution_count": 75, 125 | "metadata": {}, 126 | "output_type": "execute_result" 127 | } 128 | ], 129 | "source": [ 130 | "c = corr(df)\n", 131 | "c" 132 | ] 133 | }, 134 | { 135 | "cell_type": "code", 136 | "execution_count": 76, 137 | "metadata": {}, 138 | "outputs": [ 139 | { 140 | "data": { 141 | "text/plain": [ 142 | "array([[ 9.41793757e-17, 1.96841299e-01],\n", 143 | " [ 1.96841299e-01, 8.26799418e-17]])" 144 | ] 145 | }, 146 | "execution_count": 76, 147 | "metadata": {}, 148 | "output_type": "execute_result" 149 | } 150 | ], 151 | "source": [ 152 | "se = np.sqrt(bootstrap_variance(df, corr, 10000))\n", 153 | "se" 154 | ] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": 72, 159 | "metadata": {}, 160 | "outputs": [ 161 | { 162 | "data": { 163 | "text/plain": [ 164 | "CI(lower=array([[ 1. , 0.16371497],\n", 165 | " [ 0.16371497, 1. ]]), upper=array([[ 1. , 0.92812286],\n", 166 | " [ 0.92812286, 1. ]]))" 167 | ] 168 | }, 169 | "execution_count": 72, 170 | "metadata": {}, 171 | "output_type": "execute_result" 172 | } 173 | ], 174 | "source": [ 175 | "bootstrap_ci_normal(df, corr, 10000, 0.05)" 176 | ] 177 | }, 178 | { 179 | "cell_type": "code", 180 | "execution_count": 74, 181 | "metadata": {}, 182 | "outputs": [ 183 | { 184 | "data": { 185 | "text/plain": [ 186 | "CI(lower=array([[ 1. , 0.09183783],\n", 187 | " [ 0.09183783, 1. ]]), upper=array([[ 1.72633836, 0.8181762 ],\n", 188 | " [ 0.8181762 , 1.72633836]]))" 189 | ] 190 | }, 191 | "execution_count": 74, 192 | "metadata": {}, 193 | "output_type": "execute_result" 194 | } 195 | ], 196 | "source": [ 197 | "bootstrap_ci_pivot(df, corr, 10000, 0.05)" 198 | ] 199 | }, 200 | { 201 | "cell_type": "code", 202 | "execution_count": 73, 203 | "metadata": {}, 204 | "outputs": [ 205 | { 206 | "data": { 207 | "text/plain": [ 208 | "CI(lower=array([[ 1. , 0.20647611],\n", 209 | " [ 0.20647611, 1. ]]), upper=array([[ 1. , 0.93652281],\n", 210 | " [ 0.93652281, 1. ]]))" 211 | ] 212 | }, 213 | "execution_count": 73, 214 | "metadata": {}, 215 | "output_type": "execute_result" 216 | } 217 | ], 218 | "source": [ 219 | "bootstrap_ci_percentile(df, corr, 10000, 0.05)" 220 | ] 221 | }, 222 | { 223 | "cell_type": "code", 224 | "execution_count": null, 225 | "metadata": { 226 | "collapsed": true 227 | }, 228 | "outputs": [], 229 | "source": [] 230 | } 231 | ], 232 | "metadata": { 233 | "kernelspec": { 234 | "display_name": "Python 3", 235 | "language": "python", 236 | "name": "python3" 237 | }, 238 | "language_info": { 239 | "codemirror_mode": { 240 | "name": "ipython", 241 | "version": 3 242 | }, 243 | "file_extension": ".py", 244 | "mimetype": "text/x-python", 245 | "name": "python", 246 | "nbconvert_exporter": "python", 247 | "pygments_lexer": "ipython3", 248 | "version": "3.5.2" 249 | } 250 | }, 251 | "nbformat": 4, 252 | "nbformat_minor": 2 253 | } 254 | -------------------------------------------------------------------------------- /data/nerve.csv: -------------------------------------------------------------------------------- 1 | duration 2 | 0.21 3 | 0.03 4 | 0.05 5 | 0.11 6 | 0.59 7 | 0.06 8 | 0.18 9 | 0.55 10 | 0.37 11 | 0.09 12 | 0.14 13 | 0.19 14 | 0.02 15 | 0.14 16 | 0.09 17 | 0.05 18 | 0.15 19 | 0.23 20 | 0.15 21 | 0.08 22 | 0.24 23 | 0.16 24 | 0.06 25 | 0.11 26 | 0.15 27 | 0.09 28 | 0.03 29 | 0.21 30 | 0.02 31 | 0.14 32 | 0.24 33 | 0.29 34 | 0.16 35 | 0.07 36 | 0.07 37 | 0.04 38 | 0.02 39 | 0.15 40 | 0.12 41 | 0.26 42 | 0.15 43 | 0.33 44 | 0.06 45 | 0.51 46 | 0.11 47 | 0.28 48 | 0.36 49 | 0.14 50 | 0.55 51 | 0.28 52 | 0.04 53 | 0.01 54 | 0.94 55 | 0.73 56 | 0.05 57 | 0.07 58 | 0.11 59 | 0.38 60 | 0.21 61 | 0.49 62 | 0.38 63 | 0.38 64 | 0.01 65 | 0.06 66 | 0.13 67 | 0.06 68 | 0.01 69 | 0.16 70 | 0.05 71 | 0.10 72 | 0.16 73 | 0.06 74 | 0.06 75 | 0.06 76 | 0.06 77 | 0.11 78 | 0.44 79 | 0.05 80 | 0.09 81 | 0.04 82 | 0.27 83 | 0.50 84 | 0.25 85 | 0.25 86 | 0.08 87 | 0.01 88 | 0.70 89 | 0.04 90 | 0.08 91 | 0.16 92 | 0.38 93 | 0.08 94 | 0.32 95 | 0.39 96 | 0.58 97 | 0.56 98 | 0.74 99 | 0.15 100 | 0.07 101 | 0.26 102 | 0.25 103 | 0.01 104 | 0.17 105 | 0.64 106 | 0.61 107 | 0.15 108 | 0.26 109 | 0.03 110 | 0.05 111 | 0.34 112 | 0.07 113 | 0.10 114 | 0.09 115 | 0.02 116 | 0.30 117 | 0.07 118 | 0.12 119 | 0.01 120 | 0.16 121 | 0.14 122 | 0.49 123 | 0.07 124 | 0.11 125 | 0.35 126 | 1.21 127 | 0.17 128 | 0.01 129 | 0.35 130 | 0.45 131 | 0.07 132 | 0.93 133 | 0.04 134 | 0.96 135 | 0.14 136 | 1.38 137 | 0.15 138 | 0.01 139 | 0.05 140 | 0.23 141 | 0.31 142 | 0.05 143 | 0.05 144 | 0.29 145 | 0.01 146 | 0.74 147 | 0.30 148 | 0.09 149 | 0.02 150 | 0.19 151 | 0.47 152 | 0.01 153 | 0.51 154 | 0.12 155 | 0.12 156 | 0.43 157 | 0.32 158 | 0.09 159 | 0.20 160 | 0.03 161 | 0.05 162 | 0.13 163 | 0.15 164 | 0.05 165 | 0.08 166 | 0.04 167 | 0.09 168 | 0.10 169 | 0.10 170 | 0.26 171 | 0.07 172 | 0.68 173 | 0.15 174 | 0.01 175 | 0.27 176 | 0.05 177 | 0.03 178 | 0.40 179 | 0.04 180 | 0.21 181 | 0.29 182 | 0.24 183 | 0.08 184 | 0.23 185 | 0.10 186 | 0.19 187 | 0.20 188 | 0.26 189 | 0.06 190 | 0.40 191 | 0.51 192 | 0.15 193 | 1.10 194 | 0.16 195 | 0.78 196 | 0.04 197 | 0.27 198 | 0.35 199 | 0.71 200 | 0.15 201 | 0.29 202 | 0.04 203 | 0.01 204 | 0.28 205 | 0.21 206 | 0.09 207 | 0.17 208 | 0.09 209 | 0.17 210 | 0.15 211 | 0.62 212 | 0.50 213 | 0.07 214 | 0.39 215 | 0.28 216 | 0.20 217 | 0.34 218 | 0.16 219 | 0.65 220 | 0.04 221 | 0.67 222 | 0.10 223 | 0.51 224 | 0.26 225 | 0.07 226 | 0.71 227 | 0.11 228 | 0.47 229 | 0.02 230 | 0.38 231 | 0.04 232 | 0.43 233 | 0.11 234 | 0.23 235 | 0.14 236 | 0.08 237 | 1.12 238 | 0.50 239 | 0.25 240 | 0.18 241 | 0.12 242 | 0.02 243 | 0.15 244 | 0.12 245 | 0.08 246 | 0.38 247 | 0.22 248 | 0.16 249 | 0.04 250 | 0.58 251 | 0.05 252 | 0.07 253 | 0.28 254 | 0.27 255 | 0.24 256 | 0.07 257 | 0.02 258 | 0.27 259 | 0.27 260 | 0.16 261 | 0.05 262 | 0.34 263 | 0.10 264 | 0.02 265 | 0.04 266 | 0.10 267 | 0.22 268 | 0.24 269 | 0.04 270 | 0.28 271 | 0.10 272 | 0.23 273 | 0.03 274 | 0.34 275 | 0.21 276 | 0.41 277 | 0.15 278 | 0.05 279 | 0.17 280 | 0.53 281 | 0.30 282 | 0.15 283 | 0.19 284 | 0.07 285 | 0.83 286 | 0.04 287 | 0.04 288 | 0.14 289 | 0.34 290 | 0.10 291 | 0.15 292 | 0.05 293 | 0.04 294 | 0.05 295 | 0.65 296 | 0.16 297 | 0.32 298 | 0.87 299 | 0.07 300 | 0.17 301 | 0.10 302 | 0.03 303 | 0.17 304 | 0.38 305 | 0.28 306 | 0.14 307 | 0.07 308 | 0.14 309 | 0.03 310 | 0.21 311 | 0.40 312 | 0.04 313 | 0.11 314 | 0.44 315 | 0.90 316 | 0.10 317 | 0.49 318 | 0.09 319 | 0.01 320 | 0.08 321 | 0.06 322 | 0.08 323 | 0.01 324 | 0.15 325 | 0.50 326 | 0.36 327 | 0.08 328 | 0.34 329 | 0.02 330 | 0.21 331 | 0.32 332 | 0.22 333 | 0.51 334 | 0.12 335 | 0.16 336 | 0.52 337 | 0.21 338 | 0.05 339 | 0.46 340 | 0.44 341 | 0.04 342 | 0.05 343 | 0.04 344 | 0.14 345 | 0.08 346 | 0.21 347 | 0.02 348 | 0.63 349 | 0.35 350 | 0.01 351 | 0.38 352 | 0.43 353 | 0.03 354 | 0.39 355 | 0.04 356 | 0.17 357 | 0.23 358 | 0.78 359 | 0.14 360 | 0.08 361 | 0.11 362 | 0.07 363 | 0.45 364 | 0.46 365 | 0.20 366 | 0.19 367 | 0.50 368 | 0.09 369 | 0.22 370 | 0.29 371 | 0.01 372 | 0.19 373 | 0.06 374 | 0.39 375 | 0.08 376 | 0.03 377 | 0.28 378 | 0.09 379 | 0.17 380 | 0.45 381 | 0.40 382 | 0.07 383 | 0.30 384 | 0.16 385 | 0.24 386 | 0.81 387 | 1.35 388 | 0.01 389 | 0.02 390 | 0.03 391 | 0.06 392 | 0.12 393 | 0.31 394 | 0.64 395 | 0.08 396 | 0.15 397 | 0.06 398 | 0.06 399 | 0.15 400 | 0.68 401 | 0.30 402 | 0.02 403 | 0.04 404 | 0.02 405 | 0.81 406 | 0.09 407 | 0.19 408 | 0.14 409 | 0.12 410 | 0.36 411 | 0.02 412 | 0.11 413 | 0.04 414 | 0.08 415 | 0.17 416 | 0.04 417 | 0.05 418 | 0.14 419 | 0.07 420 | 0.39 421 | 0.13 422 | 0.56 423 | 0.12 424 | 0.31 425 | 0.05 426 | 0.10 427 | 0.13 428 | 0.05 429 | 0.01 430 | 0.09 431 | 0.03 432 | 0.27 433 | 0.17 434 | 0.03 435 | 0.05 436 | 0.26 437 | 0.23 438 | 0.20 439 | 0.76 440 | 0.05 441 | 0.02 442 | 0.01 443 | 0.20 444 | 0.21 445 | 0.02 446 | 0.04 447 | 0.16 448 | 0.32 449 | 0.43 450 | 0.20 451 | 0.13 452 | 0.10 453 | 0.20 454 | 0.08 455 | 0.81 456 | 0.11 457 | 0.09 458 | 0.26 459 | 0.15 460 | 0.36 461 | 0.18 462 | 0.10 463 | 0.34 464 | 0.56 465 | 0.09 466 | 0.15 467 | 0.14 468 | 0.15 469 | 0.22 470 | 0.33 471 | 0.04 472 | 0.07 473 | 0.09 474 | 0.18 475 | 0.08 476 | 0.07 477 | 0.07 478 | 0.68 479 | 0.27 480 | 0.21 481 | 0.11 482 | 0.07 483 | 0.44 484 | 0.13 485 | 0.04 486 | 0.39 487 | 0.14 488 | 0.10 489 | 0.08 490 | 0.02 491 | 0.57 492 | 0.35 493 | 0.17 494 | 0.21 495 | 0.14 496 | 0.77 497 | 0.06 498 | 0.34 499 | 0.15 500 | 0.29 501 | 0.08 502 | 0.72 503 | 0.31 504 | 0.20 505 | 0.10 506 | 0.01 507 | 0.24 508 | 0.07 509 | 0.22 510 | 0.49 511 | 0.03 512 | 0.18 513 | 0.47 514 | 0.37 515 | 0.17 516 | 0.42 517 | 0.02 518 | 0.22 519 | 0.12 520 | 0.01 521 | 0.34 522 | 0.41 523 | 0.27 524 | 0.07 525 | 0.30 526 | 0.09 527 | 0.27 528 | 0.28 529 | 0.15 530 | 0.26 531 | 0.01 532 | 0.06 533 | 0.35 534 | 0.03 535 | 0.26 536 | 0.05 537 | 0.18 538 | 0.46 539 | 0.12 540 | 0.23 541 | 0.32 542 | 0.08 543 | 0.26 544 | 0.82 545 | 0.10 546 | 0.69 547 | 0.15 548 | 0.01 549 | 0.39 550 | 0.04 551 | 0.13 552 | 0.34 553 | 0.13 554 | 0.13 555 | 0.30 556 | 0.29 557 | 0.23 558 | 0.01 559 | 0.38 560 | 0.04 561 | 0.08 562 | 0.15 563 | 0.10 564 | 0.62 565 | 0.83 566 | 0.11 567 | 0.71 568 | 0.08 569 | 0.61 570 | 0.18 571 | 0.05 572 | 0.20 573 | 0.12 574 | 0.10 575 | 0.03 576 | 0.11 577 | 0.20 578 | 0.16 579 | 0.10 580 | 0.03 581 | 0.23 582 | 0.12 583 | 0.01 584 | 0.12 585 | 0.17 586 | 0.14 587 | 0.10 588 | 0.02 589 | 0.13 590 | 0.06 591 | 0.21 592 | 0.50 593 | 0.04 594 | 0.42 595 | 0.29 596 | 0.08 597 | 0.01 598 | 0.30 599 | 0.45 600 | 0.06 601 | 0.25 602 | 0.02 603 | 0.06 604 | 0.02 605 | 0.17 606 | 0.10 607 | 0.28 608 | 0.21 609 | 0.28 610 | 0.30 611 | 0.02 612 | 0.02 613 | 0.28 614 | 0.09 615 | 0.71 616 | 0.06 617 | 0.12 618 | 0.29 619 | 0.05 620 | 0.27 621 | 0.25 622 | 0.10 623 | 0.16 624 | 0.08 625 | 0.52 626 | 0.44 627 | 0.19 628 | 0.72 629 | 0.12 630 | 0.30 631 | 0.14 632 | 0.45 633 | 0.42 634 | 0.09 635 | 0.07 636 | 0.62 637 | 0.51 638 | 0.50 639 | 0.47 640 | 0.28 641 | 0.04 642 | 0.66 643 | 0.08 644 | 0.11 645 | 0.03 646 | 0.32 647 | 0.16 648 | 0.11 649 | 0.26 650 | 0.05 651 | 0.07 652 | 0.04 653 | 0.22 654 | 0.08 655 | 0.08 656 | 0.01 657 | 0.06 658 | 0.05 659 | 0.05 660 | 0.16 661 | 0.05 662 | 0.13 663 | 0.42 664 | 0.21 665 | 0.36 666 | 0.05 667 | 0.01 668 | 0.44 669 | 0.14 670 | 0.14 671 | 0.14 672 | 0.08 673 | 0.51 674 | 0.18 675 | 0.02 676 | 0.51 677 | 0.06 678 | 0.22 679 | 0.01 680 | 0.09 681 | 0.22 682 | 0.59 683 | 0.03 684 | 0.71 685 | 0.14 686 | 0.02 687 | 0.51 688 | 0.03 689 | 0.41 690 | 0.17 691 | 0.37 692 | 0.39 693 | 0.82 694 | 0.81 695 | 0.24 696 | 0.52 697 | 0.40 698 | 0.24 699 | 0.06 700 | 0.73 701 | 0.27 702 | 0.18 703 | 0.01 704 | 0.17 705 | 0.02 706 | 0.11 707 | 0.26 708 | 0.13 709 | 0.68 710 | 0.13 711 | 0.08 712 | 0.71 713 | 0.04 714 | 0.11 715 | 0.13 716 | 0.17 717 | 0.34 718 | 0.23 719 | 0.08 720 | 0.26 721 | 0.03 722 | 0.21 723 | 0.45 724 | 0.40 725 | 0.03 726 | 0.16 727 | 0.06 728 | 0.29 729 | 0.43 730 | 0.03 731 | 0.10 732 | 0.10 733 | 0.31 734 | 0.27 735 | 0.27 736 | 0.33 737 | 0.14 738 | 0.09 739 | 0.27 740 | 0.14 741 | 0.09 742 | 0.08 743 | 0.06 744 | 0.16 745 | 0.02 746 | 0.07 747 | 0.19 748 | 0.11 749 | 0.10 750 | 0.17 751 | 0.24 752 | 0.01 753 | 0.13 754 | 0.21 755 | 0.03 756 | 0.39 757 | 0.01 758 | 0.27 759 | 0.19 760 | 0.02 761 | 0.21 762 | 0.04 763 | 0.10 764 | 0.06 765 | 0.48 766 | 0.12 767 | 0.15 768 | 0.12 769 | 0.52 770 | 0.48 771 | 0.29 772 | 0.57 773 | 0.22 774 | 0.01 775 | 0.44 776 | 0.05 777 | 0.49 778 | 0.10 779 | 0.19 780 | 0.44 781 | 0.02 782 | 0.72 783 | 0.09 784 | 0.04 785 | 0.02 786 | 0.02 787 | 0.06 788 | 0.22 789 | 0.53 790 | 0.18 791 | 0.10 792 | 0.10 793 | 0.03 794 | 0.08 795 | 0.15 796 | 0.05 797 | 0.13 798 | 0.02 799 | 0.10 800 | 0.51 801 | -------------------------------------------------------------------------------- /solutions/ch08q03.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 2, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "name": "stdout", 10 | "output_type": "stream", 11 | "text": [ 12 | "The autoreload extension is already loaded. To reload it, use:\n", 13 | " %reload_ext autoreload\n" 14 | ] 15 | } 16 | ], 17 | "source": [ 18 | "import sys\n", 19 | "sys.path.append('..')\n", 20 | "\n", 21 | "import pandas as pd\n", 22 | "import numpy as np\n", 23 | "import seaborn as sns\n", 24 | "import re\n", 25 | "import matplotlib as mpl\n", 26 | "import matplotlib.pyplot as plt\n", 27 | "%matplotlib inline\n", 28 | "%load_ext autoreload\n", 29 | "%autoreload 2\n", 30 | "from scipy.stats import t\n", 31 | "\n", 32 | "from chapters.chapter8 import *" 33 | ] 34 | }, 35 | { 36 | "cell_type": "code", 37 | "execution_count": 8, 38 | "metadata": {}, 39 | "outputs": [ 40 | { 41 | "data": { 42 | "text/plain": [ 43 | "1.1416303404192403" 44 | ] 45 | }, 46 | "execution_count": 8, 47 | "metadata": {}, 48 | "output_type": "execute_result" 49 | } 50 | ], 51 | "source": [ 52 | "theta = (t.ppf(0.75, 3) - t.ppf(0.25, 3)) / 1.34\n", 53 | "theta" 54 | ] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": 4, 59 | "metadata": {}, 60 | "outputs": [ 61 | { 62 | "data": { 63 | "text/plain": [ 64 | "array([ 0.97442783, -0.37559688, 4.67457867, 0.93902427, -0.28586191,\n", 65 | " 0.02619128, -0.37147975, -1.0917111 , 1.48828415, 0.5258335 ,\n", 66 | " -0.40666186, -0.78900618, 0.02991144, -0.81607991, -0.38627618,\n", 67 | " -1.19756689, 0.73345944, 0.51085135, -4.08510571, -1.05274502,\n", 68 | " -0.2053558 , 3.8510504 , 2.1216446 , -0.26205937, 1.17686852])" 69 | ] 70 | }, 71 | "execution_count": 4, 72 | "metadata": {}, 73 | "output_type": "execute_result" 74 | } 75 | ], 76 | "source": [ 77 | "obs = t.rvs(3, size=25)\n", 78 | "obs" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": 5, 84 | "metadata": {}, 85 | "outputs": [ 86 | { 87 | "data": { 88 | "text/plain": [ 89 | "1.0042433830474906" 90 | ] 91 | }, 92 | "execution_count": 5, 93 | "metadata": {}, 94 | "output_type": "execute_result" 95 | } 96 | ], 97 | "source": [ 98 | "statistic = lambda obs: (np.percentile(obs, 75) - np.percentile(obs, 25)) / 1.34\n", 99 | "statistic(obs)" 100 | ] 101 | }, 102 | { 103 | "cell_type": "code", 104 | "execution_count": 11, 105 | "metadata": {}, 106 | "outputs": [ 107 | { 108 | "name": "stdout", 109 | "output_type": "stream", 110 | "text": [ 111 | "CI(lower=0.5156639919152145, upper=1.7167599516444088) CI(lower=0.50928145601241681, upper=1.6958873701224797) CI(lower=0.60911819752546137, upper=1.7146732401098512)\n", 112 | "CI(lower=0.45410857167372232, upper=1.6607720152176646) CI(lower=0.57279572848059956, upper=1.4535995749343953) CI(lower=0.54014743080611638, upper=1.7647738255667409)\n", 113 | "CI(lower=0.60385196439111488, upper=2.0267615846572715) CI(lower=0.44406337611351798, upper=1.8036941670598468) CI(lower=0.82691938198853987, upper=1.8807297349587597)\n", 114 | "CI(lower=0.31543281539107648, upper=1.4306422972329282) CI(lower=0.1446363178002632, upper=1.3344638907117967) CI(lower=0.43377991400451787, upper=1.7456737845072383)\n", 115 | "CI(lower=-0.25938356924185846, upper=1.6910671291441635) CI(lower=-1.0234556540551818, upper=0.99568040971998006) CI(lower=0.42373786678618308, upper=2.4053288178856)\n", 116 | "CI(lower=0.10557971324865545, upper=1.3203010453574411) CI(lower=-0.032268548076881842, upper=1.0878079996932903) CI(lower=0.22435652777561224, upper=1.2158881102202943)\n", 117 | "CI(lower=0.47411736314091735, upper=1.826586770390362) CI(lower=0.33436244724671127, upper=1.7140877732572941) CI(lower=0.58245133819019856, upper=1.9663416862845682)\n", 118 | "CI(lower=0.1836046052137208, upper=1.4113921561374028) CI(lower=0.28458763548838117, upper=1.312634799769854) CI(lower=0.28457029357400565, upper=1.515986612833125)\n", 119 | "CI(lower=0.16132369600150859, upper=0.86191509422873924) CI(lower=0.040998096999688594, upper=0.72749954271236239) CI(lower=0.23448210361764971, upper=0.99972066471347398)\n", 120 | "CI(lower=0.31210619888957303, upper=1.4773828596406258) CI(lower=0.13890777617025574, upper=1.3084174464066127) CI(lower=0.47375910748953726, upper=1.5802200336176546)\n" 121 | ] 122 | }, 123 | { 124 | "data": { 125 | "text/html": [ 126 | "
\n", 127 | "\n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | "
lowertypeupper
00.515664normal1.716760
10.509281pivot1.695887
20.609118percentile1.714673
30.783856normal1.865298
40.613448pivot1.934928
\n", 169 | "
" 170 | ], 171 | "text/plain": [ 172 | " lower type upper\n", 173 | "0 0.515664 normal 1.716760\n", 174 | "1 0.509281 pivot 1.695887\n", 175 | "2 0.609118 percentile 1.714673\n", 176 | "3 0.783856 normal 1.865298\n", 177 | "4 0.613448 pivot 1.934928" 178 | ] 179 | }, 180 | "execution_count": 11, 181 | "metadata": {}, 182 | "output_type": "execute_result" 183 | } 184 | ], 185 | "source": [ 186 | "data = {'lower': [], 'upper': [], 'type': []}\n", 187 | "\n", 188 | "for i in range(1000):\n", 189 | " \n", 190 | " obs = pd.Series(t.rvs(3, size=25))\n", 191 | " \n", 192 | " nci = bootstrap_ci_normal(obs, statistic, 100, 0.05) \n", 193 | " pivci = bootstrap_ci_pivot(obs, statistic, 100, 0.05) \n", 194 | " perci = bootstrap_ci_percentile(obs, statistic, 100, 0.05)\n", 195 | " \n", 196 | " if i % 100 == 0:\n", 197 | " print(nci, pivci, perci)\n", 198 | " \n", 199 | " data.get('lower').append(nci.lower) \n", 200 | " data.get('upper').append(nci.upper)\n", 201 | " data.get('type').append('normal')\n", 202 | " \n", 203 | " data.get('lower').append(pivci.lower) \n", 204 | " data.get('upper').append(pivci.upper)\n", 205 | " data.get('type').append('pivot')\n", 206 | " \n", 207 | " data.get('lower').append(perci.lower) \n", 208 | " data.get('upper').append(perci.upper)\n", 209 | " data.get('type').append('percentile')\n", 210 | " \n", 211 | "df = pd.DataFrame(data)\n", 212 | "df['contains_true'] = df.apply(lambda r: r.lower <= theta <= r.upper, axis=1)\n", 213 | "\n", 214 | "#df.to_csv('../data/ch08q03.csv', index=False)\n", 215 | "\n", 216 | "df.head()" 217 | ] 218 | }, 219 | { 220 | "cell_type": "code", 221 | "execution_count": 19, 222 | "metadata": {}, 223 | "outputs": [ 224 | { 225 | "data": { 226 | "text/plain": [ 227 | "type\n", 228 | "normal 0.947\n", 229 | "percentile 0.957\n", 230 | "pivot 0.814\n", 231 | "Name: contains_true, dtype: float64" 232 | ] 233 | }, 234 | "execution_count": 19, 235 | "metadata": {}, 236 | "output_type": "execute_result" 237 | } 238 | ], 239 | "source": [ 240 | "df.groupby('type').contains_true.mean()" 241 | ] 242 | }, 243 | { 244 | "cell_type": "code", 245 | "execution_count": null, 246 | "metadata": { 247 | "collapsed": true 248 | }, 249 | "outputs": [], 250 | "source": [] 251 | } 252 | ], 253 | "metadata": { 254 | "kernelspec": { 255 | "display_name": "Python 3", 256 | "language": "python", 257 | "name": "python3" 258 | }, 259 | "language_info": { 260 | "codemirror_mode": { 261 | "name": "ipython", 262 | "version": 3 263 | }, 264 | "file_extension": ".py", 265 | "mimetype": "text/x-python", 266 | "name": "python", 267 | "nbconvert_exporter": "python", 268 | "pygments_lexer": "ipython3", 269 | "version": "3.5.2" 270 | } 271 | }, 272 | "nbformat": 4, 273 | "nbformat_minor": 2 274 | } 275 | -------------------------------------------------------------------------------- /solutions/ch10q11.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "import sys\n", 12 | "sys.path.append('..')\n", 13 | "\n", 14 | "from scipy.stats import norm\n", 15 | "import pandas as pd\n", 16 | "import numpy as np\n", 17 | "import seaborn as sns\n", 18 | "import matplotlib.pyplot as plt\n", 19 | "\n", 20 | "from chapters.chapter10 import bonferroni, benjamini_hochberg\n", 21 | "\n", 22 | "%load_ext autoreload\n", 23 | "%autoreload 2\n", 24 | "\n", 25 | "%matplotlib inline\n", 26 | "plt.style.use('ggplot')" 27 | ] 28 | }, 29 | { 30 | "cell_type": "code", 31 | "execution_count": 4, 32 | "metadata": {}, 33 | "outputs": [ 34 | { 35 | "data": { 36 | "text/html": [ 37 | "
\n", 38 | "\n", 39 | " \n", 40 | " \n", 41 | " \n", 42 | " \n", 43 | " \n", 44 | " \n", 45 | " \n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | "
drugtotalnauseap
0placebo80450.562500
1chlorpromazine75260.346667
2dimenhydrinate85520.611765
3pentobarbital10067350.522388
4pentobarbital15085370.435294
\n", 86 | "
" 87 | ], 88 | "text/plain": [ 89 | " drug total nausea p\n", 90 | "0 placebo 80 45 0.562500\n", 91 | "1 chlorpromazine 75 26 0.346667\n", 92 | "2 dimenhydrinate 85 52 0.611765\n", 93 | "3 pentobarbital100 67 35 0.522388\n", 94 | "4 pentobarbital150 85 37 0.435294" 95 | ] 96 | }, 97 | "execution_count": 4, 98 | "metadata": {}, 99 | "output_type": "execute_result" 100 | } 101 | ], 102 | "source": [ 103 | "df = pd.read_csv('../data/chap10q11.csv')\n", 104 | "df['p'] = df.nausea / df.total\n", 105 | "df.head()" 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": 8, 111 | "metadata": {}, 112 | "outputs": [ 113 | { 114 | "data": { 115 | "text/plain": [ 116 | "0.5625" 117 | ] 118 | }, 119 | "execution_count": 8, 120 | "metadata": {}, 121 | "output_type": "execute_result" 122 | } 123 | ], 124 | "source": [ 125 | "placebo = df[df.drug == 'placebo']\n", 126 | "p_placebo = placebo.p.max()\n", 127 | "p_placebo" 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": 10, 133 | "metadata": {}, 134 | "outputs": [ 135 | { 136 | "data": { 137 | "text/plain": [ 138 | "80" 139 | ] 140 | }, 141 | "execution_count": 10, 142 | "metadata": {}, 143 | "output_type": "execute_result" 144 | } 145 | ], 146 | "source": [ 147 | "n_placebo = placebo.total.max()\n", 148 | "n_placebo" 149 | ] 150 | }, 151 | { 152 | "cell_type": "code", 153 | "execution_count": 23, 154 | "metadata": {}, 155 | "outputs": [ 156 | { 157 | "data": { 158 | "text/html": [ 159 | "
\n", 160 | "\n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | " \n", 166 | " \n", 167 | " \n", 168 | " \n", 169 | " \n", 170 | " \n", 171 | " \n", 172 | " \n", 173 | " \n", 174 | " \n", 175 | " \n", 176 | " \n", 177 | " \n", 178 | " \n", 179 | " \n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | " \n", 212 | " \n", 213 | " \n", 214 | " \n", 215 | " \n", 216 | " \n", 217 | " \n", 218 | " \n", 219 | " \n", 220 | " \n", 221 | " \n", 222 | " \n", 223 | " \n", 224 | " \n", 225 | " \n", 226 | " \n", 227 | " \n", 228 | " \n", 229 | " \n", 230 | " \n", 231 | " \n", 232 | " \n", 233 | " \n", 234 | " \n", 235 | " \n", 236 | " \n", 237 | "
drugtotalnauseapdiffseci_lowerci_uppersignificant
0placebo80450.5625000.0000000.078437-0.1290170.129017False
1chlorpromazine75260.346667-0.2158330.078077-0.344259-0.087408True
2dimenhydrinate85520.6117650.0492650.076618-0.0767610.175291False
3pentobarbital10067350.522388-0.0401120.082462-0.1757500.095527False
4pentobarbital15085370.435294-0.1272060.077253-0.254276-0.000135True
\n", 238 | "
" 239 | ], 240 | "text/plain": [ 241 | " drug total nausea p diff se ci_lower \\\n", 242 | "0 placebo 80 45 0.562500 0.000000 0.078437 -0.129017 \n", 243 | "1 chlorpromazine 75 26 0.346667 -0.215833 0.078077 -0.344259 \n", 244 | "2 dimenhydrinate 85 52 0.611765 0.049265 0.076618 -0.076761 \n", 245 | "3 pentobarbital100 67 35 0.522388 -0.040112 0.082462 -0.175750 \n", 246 | "4 pentobarbital150 85 37 0.435294 -0.127206 0.077253 -0.254276 \n", 247 | "\n", 248 | " ci_upper significant \n", 249 | "0 0.129017 False \n", 250 | "1 -0.087408 True \n", 251 | "2 0.175291 False \n", 252 | "3 0.095527 False \n", 253 | "4 -0.000135 True " 254 | ] 255 | }, 256 | "execution_count": 23, 257 | "metadata": {}, 258 | "output_type": "execute_result" 259 | } 260 | ], 261 | "source": [ 262 | "alpha = 0.05\n", 263 | "z_alpha = norm.ppf(1 - alpha)\n", 264 | "\n", 265 | "df['diff'] = df.p - p_placebo\n", 266 | "df['se'] = np.sqrt((df.p * (1 - df.p) / df.total) + (p_placebo * (1 - p_placebo) / n_placebo))\n", 267 | "df['ci_lower'] = df['diff'] - df.se * z_alpha\n", 268 | "df['ci_upper'] = df['diff'] + df.se * z_alpha\n", 269 | "df['significant'] = (0 < df.ci_lower) | (df.ci_upper < 0)\n", 270 | "\n", 271 | "df.head()" 272 | ] 273 | }, 274 | { 275 | "cell_type": "code", 276 | "execution_count": null, 277 | "metadata": { 278 | "collapsed": true 279 | }, 280 | "outputs": [], 281 | "source": [] 282 | } 283 | ], 284 | "metadata": { 285 | "kernelspec": { 286 | "display_name": "Python 3", 287 | "language": "python", 288 | "name": "python3" 289 | }, 290 | "language_info": { 291 | "codemirror_mode": { 292 | "name": "ipython", 293 | "version": 3 294 | }, 295 | "file_extension": ".py", 296 | "mimetype": "text/x-python", 297 | "name": "python", 298 | "nbconvert_exporter": "python", 299 | "pygments_lexer": "ipython3", 300 | "version": "3.5.2" 301 | } 302 | }, 303 | "nbformat": 4, 304 | "nbformat_minor": 2 305 | } 306 | -------------------------------------------------------------------------------- /solutions/ch09q03.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "import sys\n", 12 | "sys.path.append('..')\n", 13 | "\n", 14 | "import pandas as pd\n", 15 | "import numpy as np\n", 16 | "from scipy.stats import norm\n", 17 | "\n", 18 | "from chapters.chapter7 import CI\n", 19 | "from chapters.chapter8 import bootstrap_ci_percentile\n", 20 | "from chapters.chapter9 import parametric_bootstrap_variance" 21 | ] 22 | }, 23 | { 24 | "cell_type": "markdown", 25 | "metadata": {}, 26 | "source": [ 27 | "## Estimators" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": 2, 33 | "metadata": {}, 34 | "outputs": [ 35 | { 36 | "data": { 37 | "text/html": [ 38 | "
\n", 39 | "\n", 40 | " \n", 41 | " \n", 42 | " \n", 43 | " \n", 44 | " \n", 45 | " \n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | "
value
03.23
1-2.50
21.88
3-0.68
44.43
\n", 69 | "
" 70 | ], 71 | "text/plain": [ 72 | " value\n", 73 | "0 3.23\n", 74 | "1 -2.50\n", 75 | "2 1.88\n", 76 | "3 -0.68\n", 77 | "4 4.43" 78 | ] 79 | }, 80 | "execution_count": 2, 81 | "metadata": {}, 82 | "output_type": "execute_result" 83 | } 84 | ], 85 | "source": [ 86 | "df = pd.read_csv('../data/ch09q03.csv')\n", 87 | "n = len(df)\n", 88 | "df.head()" 89 | ] 90 | }, 91 | { 92 | "cell_type": "code", 93 | "execution_count": 3, 94 | "metadata": {}, 95 | "outputs": [ 96 | { 97 | "data": { 98 | "text/plain": [ 99 | "value 1.1908\n", 100 | "dtype: float64" 101 | ] 102 | }, 103 | "execution_count": 3, 104 | "metadata": {}, 105 | "output_type": "execute_result" 106 | } 107 | ], 108 | "source": [ 109 | "mu_hat = df.mean()\n", 110 | "mu_hat" 111 | ] 112 | }, 113 | { 114 | "cell_type": "code", 115 | "execution_count": 4, 116 | "metadata": {}, 117 | "outputs": [ 118 | { 119 | "data": { 120 | "text/plain": [ 121 | "value 3.303503\n", 122 | "dtype: float64" 123 | ] 124 | }, 125 | "execution_count": 4, 126 | "metadata": {}, 127 | "output_type": "execute_result" 128 | } 129 | ], 130 | "source": [ 131 | "v_hat = np.var(df)\n", 132 | "v_hat" 133 | ] 134 | }, 135 | { 136 | "cell_type": "code", 137 | "execution_count": 5, 138 | "metadata": {}, 139 | "outputs": [ 140 | { 141 | "data": { 142 | "text/plain": [ 143 | "value 1.817554\n", 144 | "dtype: float64" 145 | ] 146 | }, 147 | "execution_count": 5, 148 | "metadata": {}, 149 | "output_type": "execute_result" 150 | } 151 | ], 152 | "source": [ 153 | "sigma_hat = np.sqrt(v_hat)\n", 154 | "sigma_hat" 155 | ] 156 | }, 157 | { 158 | "cell_type": "code", 159 | "execution_count": 6, 160 | "metadata": {}, 161 | "outputs": [ 162 | { 163 | "data": { 164 | "text/plain": [ 165 | "1.6448536269514722" 166 | ] 167 | }, 168 | "execution_count": 6, 169 | "metadata": {}, 170 | "output_type": "execute_result" 171 | } 172 | ], 173 | "source": [ 174 | "alpha = 0.05\n", 175 | "z95 = norm.ppf(1 - alpha)\n", 176 | "z95" 177 | ] 178 | }, 179 | { 180 | "cell_type": "code", 181 | "execution_count": 7, 182 | "metadata": {}, 183 | "outputs": [ 184 | { 185 | "data": { 186 | "text/plain": [ 187 | "value 4.180411\n", 188 | "dtype: float64" 189 | ] 190 | }, 191 | "execution_count": 7, 192 | "metadata": {}, 193 | "output_type": "execute_result" 194 | } 195 | ], 196 | "source": [ 197 | "tau_hat = z95 * sigma_hat + mu_hat\n", 198 | "tau_hat" 199 | ] 200 | }, 201 | { 202 | "cell_type": "markdown", 203 | "metadata": {}, 204 | "source": [ 205 | "## Delta method confidence interval" 206 | ] 207 | }, 208 | { 209 | "cell_type": "code", 210 | "execution_count": 10, 211 | "metadata": {}, 212 | "outputs": [ 213 | { 214 | "data": { 215 | "text/plain": [ 216 | "value 0.310896\n", 217 | "dtype: float64" 218 | ] 219 | }, 220 | "execution_count": 10, 221 | "metadata": {}, 222 | "output_type": "execute_result" 223 | } 224 | ], 225 | "source": [ 226 | "se_delta = (v_hat + (v_hat * z95**2) / 2) / n\n", 227 | "se_delta" 228 | ] 229 | }, 230 | { 231 | "cell_type": "code", 232 | "execution_count": 11, 233 | "metadata": {}, 234 | "outputs": [ 235 | { 236 | "data": { 237 | "text/plain": [ 238 | "CI(lower=value 3.669033\n", 239 | "dtype: float64, upper=value 4.691788\n", 240 | "dtype: float64)" 241 | ] 242 | }, 243 | "execution_count": 11, 244 | "metadata": {}, 245 | "output_type": "execute_result" 246 | } 247 | ], 248 | "source": [ 249 | "alpha = 0.05\n", 250 | "z_alpha = norm.ppf(1 - alpha)\n", 251 | "\n", 252 | "ci_delta = CI(tau_hat - z_alpha * se_delta, tau_hat + z_alpha * se_delta)\n", 253 | "ci_delta" 254 | ] 255 | }, 256 | { 257 | "cell_type": "markdown", 258 | "metadata": {}, 259 | "source": [ 260 | "## Bootstrapped confidence interval" 261 | ] 262 | }, 263 | { 264 | "cell_type": "markdown", 265 | "metadata": {}, 266 | "source": [ 267 | "Since we are trying to estimate the 95th percentile, it could make sense to use the percentile function as our statistic. We will create a non-parametric bootstrapped confidence interval this way." 268 | ] 269 | }, 270 | { 271 | "cell_type": "code", 272 | "execution_count": 12, 273 | "metadata": {}, 274 | "outputs": [ 275 | { 276 | "data": { 277 | "text/plain": [ 278 | "4.3439999999999985" 279 | ] 280 | }, 281 | "execution_count": 12, 282 | "metadata": {}, 283 | "output_type": "execute_result" 284 | } 285 | ], 286 | "source": [ 287 | "statistic = lambda xs: np.percentile(xs, 95)\n", 288 | "statistic(df)" 289 | ] 290 | }, 291 | { 292 | "cell_type": "markdown", 293 | "metadata": {}, 294 | "source": [ 295 | "In the parametric case under consideration, we can write down the 95th percentile as a function of the mean and standard deviation." 296 | ] 297 | }, 298 | { 299 | "cell_type": "code", 300 | "execution_count": 13, 301 | "metadata": {}, 302 | "outputs": [ 303 | { 304 | "data": { 305 | "text/plain": [ 306 | "value 4.180411\n", 307 | "dtype: float64" 308 | ] 309 | }, 310 | "execution_count": 13, 311 | "metadata": {}, 312 | "output_type": "execute_result" 313 | } 314 | ], 315 | "source": [ 316 | "pstatistic = lambda xs: np.mean(xs) + z95 * np.std(xs)\n", 317 | "pstatistic(df)" 318 | ] 319 | }, 320 | { 321 | "cell_type": "code", 322 | "execution_count": 14, 323 | "metadata": {}, 324 | "outputs": [ 325 | { 326 | "data": { 327 | "text/plain": [ 328 | "1.0031753544847091" 329 | ] 330 | }, 331 | "execution_count": 14, 332 | "metadata": {}, 333 | "output_type": "execute_result" 334 | } 335 | ], 336 | "source": [ 337 | "v_pboot = parametric_bootstrap_variance(dist=norm(mu_hat, v_hat), n=n, statistic=pstatistic, iters=10000, random_state=484488)\n", 338 | "se_pboot = np.sqrt(v_pboot)\n", 339 | "se_pboot" 340 | ] 341 | }, 342 | { 343 | "cell_type": "code", 344 | "execution_count": 15, 345 | "metadata": {}, 346 | "outputs": [ 347 | { 348 | "data": { 349 | "text/plain": [ 350 | "CI(lower=value 2.530334\n", 351 | "dtype: float64, upper=value 5.830487\n", 352 | "dtype: float64)" 353 | ] 354 | }, 355 | "execution_count": 15, 356 | "metadata": {}, 357 | "output_type": "execute_result" 358 | } 359 | ], 360 | "source": [ 361 | "ci_pboot = CI(tau_hat - z_alpha * se_pboot, tau_hat + z_alpha * se_pboot)\n", 362 | "ci_pboot" 363 | ] 364 | }, 365 | { 366 | "cell_type": "code", 367 | "execution_count": 16, 368 | "metadata": {}, 369 | "outputs": [ 370 | { 371 | "data": { 372 | "text/plain": [ 373 | "CI(lower=2.3300000000000001, upper=5.4299999999999997)" 374 | ] 375 | }, 376 | "execution_count": 16, 377 | "metadata": {}, 378 | "output_type": "execute_result" 379 | } 380 | ], 381 | "source": [ 382 | "ci_boot = bootstrap_ci_percentile(df, statistic, 10000, a=alpha, random_state=46111110)\n", 383 | "ci_boot" 384 | ] 385 | }, 386 | { 387 | "cell_type": "markdown", 388 | "metadata": {}, 389 | "source": [ 390 | "## Comparison of confidence intervals\n", 391 | "\n", 392 | "In this case, the delta method yields a tighter confidence interval." 393 | ] 394 | }, 395 | { 396 | "cell_type": "code", 397 | "execution_count": null, 398 | "metadata": { 399 | "collapsed": true 400 | }, 401 | "outputs": [], 402 | "source": [] 403 | } 404 | ], 405 | "metadata": { 406 | "kernelspec": { 407 | "display_name": "Python 3", 408 | "language": "python", 409 | "name": "python3" 410 | }, 411 | "language_info": { 412 | "codemirror_mode": { 413 | "name": "ipython", 414 | "version": 3 415 | }, 416 | "file_extension": ".py", 417 | "mimetype": "text/x-python", 418 | "name": "python", 419 | "nbconvert_exporter": "python", 420 | "pygments_lexer": "ipython3", 421 | "version": "3.5.2" 422 | } 423 | }, 424 | "nbformat": 4, 425 | "nbformat_minor": 2 426 | } 427 | -------------------------------------------------------------------------------- /solutions/ch10q07.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 15, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "import pandas as pd" 12 | ] 13 | }, 14 | { 15 | "cell_type": "code", 16 | "execution_count": 16, 17 | "metadata": { 18 | "collapsed": true 19 | }, 20 | "outputs": [], 21 | "source": [ 22 | "data = pd.read_csv('../data/snodgrass.csv')" 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "execution_count": 17, 28 | "metadata": { 29 | "scrolled": true 30 | }, 31 | "outputs": [ 32 | { 33 | "data": { 34 | "text/html": [ 35 | "
\n", 36 | "\n", 37 | " \n", 38 | " \n", 39 | " \n", 40 | " \n", 41 | " \n", 42 | " \n", 43 | " \n", 44 | " \n", 45 | " \n", 46 | " \n", 47 | " \n", 48 | " \n", 49 | " \n", 50 | " \n", 51 | " \n", 52 | " \n", 53 | " \n", 54 | " \n", 55 | " \n", 56 | " \n", 57 | " \n", 58 | " \n", 59 | " \n", 60 | " \n", 61 | " \n", 62 | " \n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | " \n", 98 | " \n", 99 | " \n", 100 | " \n", 101 | " \n", 102 | " \n", 103 | " \n", 104 | " \n", 105 | " \n", 106 | " \n", 107 | " \n", 108 | " \n", 109 | " \n", 110 | " \n", 111 | " \n", 112 | " \n", 113 | " \n", 114 | " \n", 115 | " \n", 116 | " \n", 117 | " \n", 118 | " \n", 119 | " \n", 120 | " \n", 121 | " \n", 122 | " \n", 123 | " \n", 124 | " \n", 125 | " \n", 126 | " \n", 127 | " \n", 128 | " \n", 129 | " \n", 130 | " \n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | "
authortotal
0twain0.225
1twain0.262
2twain0.217
3twain0.240
4twain0.230
5twain0.229
6twain0.235
7twain0.217
8snodgrass0.209
9snodgrass0.205
10snodgrass0.196
11snodgrass0.210
12snodgrass0.202
13snodgrass0.207
14snodgrass0.224
15snodgrass0.223
16snodgrass0.220
17snodgrass0.201
\n", 137 | "
" 138 | ], 139 | "text/plain": [ 140 | " author total\n", 141 | "0 twain 0.225\n", 142 | "1 twain 0.262\n", 143 | "2 twain 0.217\n", 144 | "3 twain 0.240\n", 145 | "4 twain 0.230\n", 146 | "5 twain 0.229\n", 147 | "6 twain 0.235\n", 148 | "7 twain 0.217\n", 149 | "8 snodgrass 0.209\n", 150 | "9 snodgrass 0.205\n", 151 | "10 snodgrass 0.196\n", 152 | "11 snodgrass 0.210\n", 153 | "12 snodgrass 0.202\n", 154 | "13 snodgrass 0.207\n", 155 | "14 snodgrass 0.224\n", 156 | "15 snodgrass 0.223\n", 157 | "16 snodgrass 0.220\n", 158 | "17 snodgrass 0.201" 159 | ] 160 | }, 161 | "execution_count": 17, 162 | "metadata": {}, 163 | "output_type": "execute_result" 164 | } 165 | ], 166 | "source": [ 167 | "data" 168 | ] 169 | }, 170 | { 171 | "cell_type": "code", 172 | "execution_count": 18, 173 | "metadata": {}, 174 | "outputs": [ 175 | { 176 | "data": { 177 | "text/html": [ 178 | "
\n", 179 | "\n", 180 | " \n", 181 | " \n", 182 | " \n", 183 | " \n", 184 | " \n", 185 | " \n", 186 | " \n", 187 | " \n", 188 | " \n", 189 | " \n", 190 | " \n", 191 | " \n", 192 | " \n", 193 | " \n", 194 | " \n", 195 | " \n", 196 | " \n", 197 | " \n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | "
total
meancount
author
snodgrass0.20970010
twain0.2318758
\n", 209 | "
" 210 | ], 211 | "text/plain": [ 212 | " total \n", 213 | " mean count\n", 214 | "author \n", 215 | "snodgrass 0.209700 10\n", 216 | "twain 0.231875 8" 217 | ] 218 | }, 219 | "execution_count": 18, 220 | "metadata": {}, 221 | "output_type": "execute_result" 222 | } 223 | ], 224 | "source": [ 225 | "data.groupby('author').aggregate(['mean', 'count'])" 226 | ] 227 | }, 228 | { 229 | "cell_type": "markdown", 230 | "metadata": {}, 231 | "source": [ 232 | "$$t_{obs}$$ is \n", 233 | "\n", 234 | "$$|.2097 - .231875| = .022175$$" 235 | ] 236 | }, 237 | { 238 | "cell_type": "code", 239 | "execution_count": 24, 240 | "metadata": { 241 | "collapsed": true 242 | }, 243 | "outputs": [], 244 | "source": [ 245 | "t_obs = .022175" 246 | ] 247 | }, 248 | { 249 | "cell_type": "markdown", 250 | "metadata": {}, 251 | "source": [ 252 | "## Permutation test" 253 | ] 254 | }, 255 | { 256 | "cell_type": "markdown", 257 | "metadata": {}, 258 | "source": [ 259 | "The full set of observations in $$X_1,\\ldots,X_{10}, Y_1,\\ldots,Y_{8}$$\n", 260 | "\n", 261 | "For all 18! permutations of the data, compute\n", 262 | "\n", 263 | "$$|(\\bar{X}) - (\\bar{Y})|$$\n", 264 | "\n", 265 | "where $$(\\bar{X})$$ is the mean of the first 10 observations, and $$(\\bar{Y})$$ is the mean of the last 8." 266 | ] 267 | }, 268 | { 269 | "cell_type": "code", 270 | "execution_count": 19, 271 | "metadata": { 272 | "collapsed": true 273 | }, 274 | "outputs": [], 275 | "source": [ 276 | "from itertools import permutations" 277 | ] 278 | }, 279 | { 280 | "cell_type": "code", 281 | "execution_count": 22, 282 | "metadata": {}, 283 | "outputs": [], 284 | "source": [ 285 | "obs = list(data['total'])" 286 | ] 287 | }, 288 | { 289 | "cell_type": "code", 290 | "execution_count": 42, 291 | "metadata": { 292 | "collapsed": true 293 | }, 294 | "outputs": [], 295 | "source": [ 296 | "import numpy as np" 297 | ] 298 | }, 299 | { 300 | "cell_type": "code", 301 | "execution_count": 48, 302 | "metadata": {}, 303 | "outputs": [ 304 | { 305 | "name": "stdout", 306 | "output_type": "stream", 307 | "text": [ 308 | "-1.5\n", 309 | "0.0\n", 310 | "-1.5\n", 311 | "1.5\n", 312 | "0.0\n", 313 | "1.5\n" 314 | ] 315 | } 316 | ], 317 | "source": [ 318 | "perms = (p for p in permutations([1,2,3]))\n", 319 | "for p in perms:\n", 320 | " print(np.mean(p[:2]) - np.mean(p[2:]))" 321 | ] 322 | }, 323 | { 324 | "cell_type": "code", 325 | "execution_count": 103, 326 | "metadata": { 327 | "collapsed": true 328 | }, 329 | "outputs": [], 330 | "source": [ 331 | "# there are too many permutations to count all of them, so we set some limit N\n", 332 | "# on the total number of observed permutations\n", 333 | "\n", 334 | "\n", 335 | "def permutation_test(obs, m, c, N):\n", 336 | " i = 0 # counter for T>c\n", 337 | " \n", 338 | " # adjust m so there's at least one observation in each sample\n", 339 | " m = min(m, len(obs)-1)\n", 340 | "\n", 341 | " # evaluate permutations\n", 342 | " for j in range(N):\n", 343 | " p = np.random.permutation(obs)\n", 344 | " # calculate stat\n", 345 | " T = np.mean(p[:m]) - np.mean(p[m:])\n", 346 | " # count if > c\n", 347 | " if T > c:\n", 348 | " i += 1\n", 349 | " \n", 350 | " # i/N approximates the p-value as N -> N!\n", 351 | " return i/N\n" 352 | ] 353 | }, 354 | { 355 | "cell_type": "code", 356 | "execution_count": 104, 357 | "metadata": {}, 358 | "outputs": [ 359 | { 360 | "data": { 361 | "text/plain": [ 362 | "0.00023" 363 | ] 364 | }, 365 | "execution_count": 104, 366 | "metadata": {}, 367 | "output_type": "execute_result" 368 | } 369 | ], 370 | "source": [ 371 | "permutation_test(obs, 10, t_obs, N=100000)" 372 | ] 373 | }, 374 | { 375 | "cell_type": "markdown", 376 | "metadata": {}, 377 | "source": [ 378 | "## Wald test" 379 | ] 380 | }, 381 | { 382 | "cell_type": "markdown", 383 | "metadata": {}, 384 | "source": [ 385 | "The Wald test of two means can be constructed as (see example 10.7)\n", 386 | "\n", 387 | "$$ W = \\frac{\\bar{X}-\\bar{Y}}{\\sqrt{\\frac{s_x^2}{m}+\\frac{s_y^2}{n}}} $$" 388 | ] 389 | }, 390 | { 391 | "cell_type": "code", 392 | "execution_count": 107, 393 | "metadata": { 394 | "collapsed": true 395 | }, 396 | "outputs": [], 397 | "source": [ 398 | "X = data[data['author']=='snodgrass']['total']\n", 399 | "Y = data[data['author']=='twain']['total']\n", 400 | "\n", 401 | "x_bar = np.mean(X)\n", 402 | "m = len(X)\n", 403 | "s_x = np.std(X)\n", 404 | "\n", 405 | "y_bar = np.mean(Y)\n", 406 | "n = len(Y)\n", 407 | "s_y = np.std(Y)\n" 408 | ] 409 | }, 410 | { 411 | "cell_type": "code", 412 | "execution_count": 116, 413 | "metadata": {}, 414 | "outputs": [], 415 | "source": [ 416 | "W = (x_bar - y_bar)/np.sqrt(s_x**2/m + s_y**2/n)" 417 | ] 418 | }, 419 | { 420 | "cell_type": "markdown", 421 | "metadata": {}, 422 | "source": [ 423 | "Finally we just need to test that $$W > z_{\\alpha/2}$$\n" 424 | ] 425 | }, 426 | { 427 | "cell_type": "code", 428 | "execution_count": 119, 429 | "metadata": {}, 430 | "outputs": [ 431 | { 432 | "data": { 433 | "text/plain": [ 434 | "True" 435 | ] 436 | }, 437 | "execution_count": 119, 438 | "metadata": {}, 439 | "output_type": "execute_result" 440 | } 441 | ], 442 | "source": [ 443 | "np.abs(W) > 1.96" 444 | ] 445 | }, 446 | { 447 | "cell_type": "markdown", 448 | "metadata": {}, 449 | "source": [ 450 | "We can get the p-value:" 451 | ] 452 | }, 453 | { 454 | "cell_type": "code", 455 | "execution_count": 120, 456 | "metadata": { 457 | "collapsed": true 458 | }, 459 | "outputs": [], 460 | "source": [ 461 | "from scipy.stats import norm" 462 | ] 463 | }, 464 | { 465 | "cell_type": "code", 466 | "execution_count": 123, 467 | "metadata": {}, 468 | "outputs": [ 469 | { 470 | "data": { 471 | "text/plain": [ 472 | "3.9963324780729e-05" 473 | ] 474 | }, 475 | "execution_count": 123, 476 | "metadata": {}, 477 | "output_type": "execute_result" 478 | } 479 | ], 480 | "source": [ 481 | "norm.cdf(W)" 482 | ] 483 | }, 484 | { 485 | "cell_type": "markdown", 486 | "metadata": {}, 487 | "source": [ 488 | "To get the CI we need $$\\hat{\\theta}$$, which here is $$\\bar{X}-\\bar{Y}$$, and se_hat, which is $$\\sqrt{\\frac{s_x^2}{m}+\\frac{s_y^2}{n}}$$." 489 | ] 490 | }, 491 | { 492 | "cell_type": "code", 493 | "execution_count": 124, 494 | "metadata": { 495 | "collapsed": true 496 | }, 497 | "outputs": [], 498 | "source": [ 499 | "theta_hat = x_bar-y_bar\n", 500 | "se_hat = np.sqrt(s_x**2/m + s_y**2/n)" 501 | ] 502 | }, 503 | { 504 | "cell_type": "code", 505 | "execution_count": 125, 506 | "metadata": {}, 507 | "outputs": [ 508 | { 509 | "data": { 510 | "text/plain": [ 511 | "(-0.022175, -0.010931838189370394, -0.033418161810629607)" 512 | ] 513 | }, 514 | "execution_count": 125, 515 | "metadata": {}, 516 | "output_type": "execute_result" 517 | } 518 | ], 519 | "source": [ 520 | "(theta_hat, theta_hat+2*se_hat, theta_hat-2*se_hat)" 521 | ] 522 | }, 523 | { 524 | "cell_type": "markdown", 525 | "metadata": {}, 526 | "source": [ 527 | "## Conclusions\n", 528 | "\n", 529 | "Our p-value from both tests is very small, which is strong evidence for rejecting the null that the means of the two samples are the same.\n", 530 | "\n", 531 | "Additionally, the confidence intervals do not overlap, which again is evidence against $$H_0$$" 532 | ] 533 | } 534 | ], 535 | "metadata": { 536 | "kernelspec": { 537 | "display_name": "Python 3", 538 | "language": "python", 539 | "name": "python3" 540 | }, 541 | "language_info": { 542 | "codemirror_mode": { 543 | "name": "ipython", 544 | "version": 3 545 | }, 546 | "file_extension": ".py", 547 | "mimetype": "text/x-python", 548 | "name": "python", 549 | "nbconvert_exporter": "python", 550 | "pygments_lexer": "ipython3", 551 | "version": "3.5.1" 552 | } 553 | }, 554 | "nbformat": 4, 555 | "nbformat_minor": 2 556 | } 557 | -------------------------------------------------------------------------------- /solutions/ch08q07.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": { 7 | "collapsed": true 8 | }, 9 | "outputs": [], 10 | "source": [ 11 | "import sys\n", 12 | "sys.path.append('..')\n", 13 | "\n", 14 | "import pandas as pd\n", 15 | "import numpy as np\n", 16 | "import seaborn as sns\n", 17 | "import re\n", 18 | "import matplotlib as mpl\n", 19 | "import matplotlib.pyplot as plt\n", 20 | "plt.style.use('ggplot')\n", 21 | "%matplotlib inline\n", 22 | "%load_ext autoreload\n", 23 | "%autoreload 2\n", 24 | "from scipy.stats import uniform\n", 25 | "\n", 26 | "from chapters.chapter8 import *" 27 | ] 28 | }, 29 | { 30 | "cell_type": "code", 31 | "execution_count": 2, 32 | "metadata": {}, 33 | "outputs": [ 34 | { 35 | "data": { 36 | "text/plain": [ 37 | "0.96152258315923522" 38 | ] 39 | }, 40 | "execution_count": 2, 41 | "metadata": {}, 42 | "output_type": "execute_result" 43 | } 44 | ], 45 | "source": [ 46 | "n = 50\n", 47 | "theta = 1\n", 48 | "obs = uniform.rvs(0, theta, size=n)\n", 49 | "statistic = np.max\n", 50 | "statistic(obs)" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": 3, 56 | "metadata": {}, 57 | "outputs": [ 58 | { 59 | "data": { 60 | "text/html": [ 61 | "
\n", 62 | "\n", 63 | " \n", 64 | " \n", 65 | " \n", 66 | " \n", 67 | " \n", 68 | " \n", 69 | " \n", 70 | " \n", 71 | " \n", 72 | " \n", 73 | " \n", 74 | " \n", 75 | " \n", 76 | " \n", 77 | " \n", 78 | " \n", 79 | " \n", 80 | " \n", 81 | " \n", 82 | " \n", 83 | " \n", 84 | " \n", 85 | " \n", 86 | " \n", 87 | " \n", 88 | " \n", 89 | " \n", 90 | " \n", 91 | " \n", 92 | " \n", 93 | " \n", 94 | " \n", 95 | " \n", 96 | " \n", 97 | "
valueestimator
00.996009max
10.974337max
20.993295max
30.987775max
40.996820max
\n", 98 | "
" 99 | ], 100 | "text/plain": [ 101 | " value estimator\n", 102 | "0 0.996009 max\n", 103 | "1 0.974337 max\n", 104 | "2 0.993295 max\n", 105 | "3 0.987775 max\n", 106 | "4 0.996820 max" 107 | ] 108 | }, 109 | "execution_count": 3, 110 | "metadata": {}, 111 | "output_type": "execute_result" 112 | } 113 | ], 114 | "source": [ 115 | "iters = 10000\n", 116 | "df_true = pd.DataFrame({'value': [statistic(uniform.rvs(0, theta, size=n)) for _ in range(iters)]})\n", 117 | "df_true['estimator'] = 'max'\n", 118 | "df_true.head()" 119 | ] 120 | }, 121 | { 122 | "cell_type": "code", 123 | "execution_count": 4, 124 | "metadata": {}, 125 | "outputs": [ 126 | { 127 | "data": { 128 | "text/html": [ 129 | "
\n", 130 | "\n", 131 | " \n", 132 | " \n", 133 | " \n", 134 | " \n", 135 | " \n", 136 | " \n", 137 | " \n", 138 | " \n", 139 | " \n", 140 | " \n", 141 | " \n", 142 | " \n", 143 | " \n", 144 | " \n", 145 | " \n", 146 | " \n", 147 | " \n", 148 | " \n", 149 | " \n", 150 | " \n", 151 | " \n", 152 | " \n", 153 | " \n", 154 | " \n", 155 | " \n", 156 | " \n", 157 | " \n", 158 | " \n", 159 | " \n", 160 | " \n", 161 | " \n", 162 | " \n", 163 | " \n", 164 | " \n", 165 | "
valueestimator
00.961523max bootstrap
10.961523max bootstrap
20.876382max bootstrap
30.961523max bootstrap
40.876382max bootstrap
\n", 166 | "
" 167 | ], 168 | "text/plain": [ 169 | " value estimator\n", 170 | "0 0.961523 max bootstrap\n", 171 | "1 0.961523 max bootstrap\n", 172 | "2 0.876382 max bootstrap\n", 173 | "3 0.961523 max bootstrap\n", 174 | "4 0.876382 max bootstrap" 175 | ] 176 | }, 177 | "execution_count": 4, 178 | "metadata": {}, 179 | "output_type": "execute_result" 180 | } 181 | ], 182 | "source": [ 183 | "df_boot = pd.DataFrame({'value': list(bootstrap(pd.Series(obs), statistic, iters))})\n", 184 | "df_boot['estimator'] = 'max bootstrap'\n", 185 | "df_boot.head()" 186 | ] 187 | }, 188 | { 189 | "cell_type": "code", 190 | "execution_count": 5, 191 | "metadata": {}, 192 | "outputs": [ 193 | { 194 | "data": { 195 | "text/html": [ 196 | "
\n", 197 | "\n", 198 | " \n", 199 | " \n", 200 | " \n", 201 | " \n", 202 | " \n", 203 | " \n", 204 | " \n", 205 | " \n", 206 | " \n", 207 | " \n", 208 | " \n", 209 | " \n", 210 | " \n", 211 | " \n", 212 | " \n", 213 | " \n", 214 | " \n", 215 | " \n", 216 | " \n", 217 | " \n", 218 | " \n", 219 | " \n", 220 | " \n", 221 | " \n", 222 | " \n", 223 | " \n", 224 | " \n", 225 | " \n", 226 | " \n", 227 | " \n", 228 | " \n", 229 | " \n", 230 | " \n", 231 | " \n", 232 | "
valueestimator
00.996009max
10.974337max
20.993295max
30.987775max
40.996820max
\n", 233 | "
" 234 | ], 235 | "text/plain": [ 236 | " value estimator\n", 237 | "0 0.996009 max\n", 238 | "1 0.974337 max\n", 239 | "2 0.993295 max\n", 240 | "3 0.987775 max\n", 241 | "4 0.996820 max" 242 | ] 243 | }, 244 | "execution_count": 5, 245 | "metadata": {}, 246 | "output_type": "execute_result" 247 | } 248 | ], 249 | "source": [ 250 | "df = pd.concat((df_true, df_boot))\n", 251 | "df.head()" 252 | ] 253 | }, 254 | { 255 | "cell_type": "code", 256 | "execution_count": 6, 257 | "metadata": {}, 258 | "outputs": [ 259 | { 260 | "data": { 261 | "text/html": [ 262 | "
\n", 263 | "\n", 264 | " \n", 265 | " \n", 266 | " \n", 267 | " \n", 268 | " \n", 269 | " \n", 270 | " \n", 271 | " \n", 272 | " \n", 273 | " \n", 274 | " \n", 275 | " \n", 276 | " \n", 277 | " \n", 278 | " \n", 279 | " \n", 280 | " \n", 281 | " \n", 282 | " \n", 283 | " \n", 284 | "
value
estimator
max10000
max bootstrap10000
\n", 285 | "
" 286 | ], 287 | "text/plain": [ 288 | " value\n", 289 | "estimator \n", 290 | "max 10000\n", 291 | "max bootstrap 10000" 292 | ] 293 | }, 294 | "execution_count": 6, 295 | "metadata": {}, 296 | "output_type": "execute_result" 297 | } 298 | ], 299 | "source": [ 300 | "df.groupby('estimator').count()" 301 | ] 302 | }, 303 | { 304 | "cell_type": "code", 305 | "execution_count": 7, 306 | "metadata": {}, 307 | "outputs": [ 308 | { 309 | "data": { 310 | "image/png": "iVBORw0KGgoAAAANSUhEUgAAAc4AAAFxCAYAAAD6ekgQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xu8pWP9//HXbhBGY4zT2IjUdDl1QJIYRogSknyEHEY6\nCEXfUiQ5JJ2Qwk+O45DyMSUURiMKOfYth3A5+8oeZqLZOYwZM3v//riuzZo1+7CuPWutfXo/H4/9\n2Gvdx+taa+/1Xtd9X/d1t3R2diIiIiK1ectAF0BERGQoUXCKiIgUUHCKiIgUUHCKiIgUUHCKiIgU\nUHCKiIgUUHAOUyGEc0MIvx2gfd8QQjgtPz4uhPBAHbe9bwjh3/XaXj/2byGE50MI/6xx+c4Qwica\nXa7+CiGsFUJ4LYSw8UCXRWSoWGKgCyBlQghPAasDC/Kk/wC3Az+PMd7UtVyM8fMF2/wk8EiM8cEa\nll0b+HCM8bKelokxfrTWfdewv7cAR8YYf5C3fQlwSb223w9HAVcBX+xuZslr2R/dvP+VLowxHlzD\nNg4AbogxtsUYnwaWrmcZq/b1fqA1xnhto/Yh0mxqcQ5NR8UYlwZGA1uSgvMPIYQj+rm9E4H1a1x2\nd2Dvfu6nPzYCjmni/voyl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ZbOVptpFc/5Fcd1i4/svP6ixeZygbLvWQhTUjOB8lhaUD6wA3Ve23pYf1\nSqcvpK2trdbyNVxra+ugKk+zjeT6j+S6w6L1b5/dXtN6bW01/ZsPav197xW2g1/Dg9PdnwUuz08f\nN7PngE3NbJl8SHZ1oC3/jK9YdXXgjorp9+aOQi19tTZFREQapRm9avcBVnP3n5jZeGBV4EJgd+DS\n/Pt64E7gPDMbC8wnncs8HBgD7AFMA3YmtVhFREQGRDM6B10NbG1mtwBXAQcD3wb2z9PGARfl1ue3\nSAE5HTje3dtJrdVRZnYrcAhwVBPKLCIi0q2Wzs7aTtYPMZ2D6bySznON3PqP5LrDovWf9ujsmtbb\nYcLYRhWpaRbjHOfQP8E7zGnkIBERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThER\nkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIK\nThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThER\nkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIKThERkQIK\nThERkQJLNGMnZrYM8ABwInAjcAkwCpgB7Ovuc81sH+BwoAM4x93PN7MlgSnAWsACYLK7P9GMMouI\niHSnWS3OY4AX8+MTgDPdfSLwGHCgmY0GjgW2AyYBR5jZOGBvYLa7bwmcBJzcpPKKiIh0q+HBaWbr\nAusDf8iTJgFX58fXkMJyM+Bud2939znAbcAWwLbAlXnZ6XmaiIjIgGnGodpTgEOB/fPz0e4+Nz+e\nCawGjAdmVayzyHR37zCzTjNbyt3n9bXT1tbWOhW/PgZbeZptJNd/JNcdFq7/8rM6i9cZyoZLPWRh\nDQ1OM9sPuN3dnzSz7hZp6WHV0umLaGtrq3XRhmttbR1U5Wm2kVz/kVx3WLT+7bPba1qvra3mf/VB\nq7/vvcJ28Gv0odqdgF3N7A7gIOA7wMu5sxDA6kBb/hlfsd4i03NHoZZaW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ehfJeSzp2enQO2p7uPPE/6\n0tFlxTxNRPqgQ7VSb1NIAbkrC/emXYV0T8Z/m9mKgAHLdbP+DOB9APmw5tJ5+jRgYj7XiZl90MxO\n72b9P5Japl2Hgb8E3ODu87tZttLrpNZkX67K28TMljCz0/ItompmZkua2c1mtlqe9Le8/46CcvRk\nFeBvOTT3J7X6u17nym3/HvicmY3Kt/7al3Q+WET6oOCUusrnFtuA5yrOMwL8CljRzB7Lj48B1jSz\nU6o2cSLwNTN7gHQz7AfzdmeQesdeaWYPkToaXV61Lvkc6kHAVfmw7lbAF2so+pXAD83s1D6W+w6w\nvJlF0rnGUfR8CUt35zgfdvfXSedebzSzB4E/A4e5+6uk85ZfMrO+Dtv2Vr4rzew+UmD+AjjXzN5J\n6kT0azP7Gqln8DO5DveQgrSnQ84iUkG3FRMRESmgFqeIiEgBBaeIiEgBBaeIiEgBBaeIiEgBBaeI\niEgBBaeIiEgBBaeIiEgBBaeIiEiB/w8isMMBnRHKcgAAAABJRU5ErkJggg==\n", 311 | "text/plain": [ 312 | "" 313 | ] 314 | }, 315 | "metadata": {}, 316 | "output_type": "display_data" 317 | } 318 | ], 319 | "source": [ 320 | "g = sns.FacetGrid(df, hue='estimator', size=5)\n", 321 | "g.map(sns.distplot, 'value', kde=False).add_legend()\n", 322 | "g.set(xlabel='Value of the Estimator', ylabel='Frequency', title='Diststribution of the Estimators')\n", 323 | "g.savefig('../images/ch08q07_histogram_true_vs_bootstrap.svg')\n", 324 | "g.savefig('../images/ch08q07_histogram_true_vs_bootstrap_bbox.svg', bbox_inches='tight')\n", 325 | "g.savefig('../images/ch08q07_histogram_true_vs_bootstrap.png', dpi=600)" 326 | ] 327 | }, 328 | { 329 | "cell_type": "code", 330 | "execution_count": null, 331 | "metadata": { 332 | "collapsed": true 333 | }, 334 | "outputs": [], 335 | "source": [] 336 | } 337 | ], 338 | "metadata": { 339 | "kernelspec": { 340 | "display_name": "Python 3", 341 | "language": "python", 342 | "name": "python3" 343 | }, 344 | "language_info": { 345 | "codemirror_mode": { 346 | "name": "ipython", 347 | "version": 3 348 | }, 349 | "file_extension": ".py", 350 | "mimetype": "text/x-python", 351 | "name": "python", 352 | "nbconvert_exporter": "python", 353 | "pygments_lexer": "ipython3", 354 | "version": "3.5.2" 355 | } 356 | }, 357 | "nbformat": 4, 358 | "nbformat_minor": 2 359 | } 360 | -------------------------------------------------------------------------------- /data/fijiquakes.csv: -------------------------------------------------------------------------------- 1 | obs lat long depth mag stations 2 | 1 -20.42 181.62 562 4.8 41 3 | 2 -20.62 181.03 650 4.2 15 4 | 3 -26.00 184.10 42 5.4 43 5 | 4 -17.97 181.66 626 4.1 19 6 | 5 -20.42 181.96 649 4.0 11 7 | 6 -19.68 184.31 195 4.0 12 8 | 7 -11.70 166.10 82 4.8 43 9 | 8 -28.11 181.93 194 4.4 15 10 | 9 -28.74 181.74 211 4.7 35 11 | 10 -17.47 179.59 622 4.3 19 12 | 11 -21.44 180.69 583 4.4 13 13 | 12 -12.26 167.00 249 4.6 16 14 | 13 -18.54 182.11 554 4.4 19 15 | 14 -21.00 181.66 600 4.4 10 16 | 15 -20.70 169.92 139 6.1 94 17 | 16 -15.94 184.95 306 4.3 11 18 | 17 -13.64 165.96 50 6.0 83 19 | 18 -17.83 181.50 590 4.5 21 20 | 19 -23.50 179.78 570 4.4 13 21 | 20 -22.63 180.31 598 4.4 18 22 | 21 -20.84 181.16 576 4.5 17 23 | 22 -10.98 166.32 211 4.2 12 24 | 23 -23.30 180.16 512 4.4 18 25 | 24 -30.20 182.00 125 4.7 22 26 | 25 -19.66 180.28 431 5.4 57 27 | 26 -17.94 181.49 537 4.0 15 28 | 27 -14.72 167.51 155 4.6 18 29 | 28 -16.46 180.79 498 5.2 79 30 | 29 -20.97 181.47 582 4.5 25 31 | 30 -19.84 182.37 328 4.4 17 32 | 31 -22.58 179.24 553 4.6 21 33 | 32 -16.32 166.74 50 4.7 30 34 | 33 -15.55 185.05 292 4.8 42 35 | 34 -23.55 180.80 349 4.0 10 36 | 35 -16.30 186.00 48 4.5 10 37 | 36 -25.82 179.33 600 4.3 13 38 | 37 -18.73 169.23 206 4.5 17 39 | 38 -17.64 181.28 574 4.6 17 40 | 39 -17.66 181.40 585 4.1 17 41 | 40 -18.82 169.33 230 4.4 11 42 | 41 -37.37 176.78 263 4.7 34 43 | 42 -15.31 186.10 96 4.6 32 44 | 43 -24.97 179.82 511 4.4 23 45 | 44 -15.49 186.04 94 4.3 26 46 | 45 -19.23 169.41 246 4.6 27 47 | 46 -30.10 182.30 56 4.9 34 48 | 47 -26.40 181.70 329 4.5 24 49 | 48 -11.77 166.32 70 4.4 18 50 | 49 -24.12 180.08 493 4.3 21 51 | 50 -18.97 185.25 129 5.1 73 52 | 51 -18.75 182.35 554 4.2 13 53 | 52 -19.26 184.42 223 4.0 15 54 | 53 -22.75 173.20 46 4.6 26 55 | 54 -21.37 180.67 593 4.3 13 56 | 55 -20.10 182.16 489 4.2 16 57 | 56 -19.85 182.13 562 4.4 31 58 | 57 -22.70 181.00 445 4.5 17 59 | 58 -22.06 180.60 584 4.0 11 60 | 59 -17.80 181.35 535 4.4 23 61 | 60 -24.20 179.20 530 4.3 12 62 | 61 -20.69 181.55 582 4.7 35 63 | 62 -21.16 182.40 260 4.1 12 64 | 63 -13.82 172.38 613 5.0 61 65 | 64 -11.49 166.22 84 4.6 32 66 | 65 -20.68 181.41 593 4.9 40 67 | 66 -17.10 184.93 286 4.7 25 68 | 67 -20.14 181.60 587 4.1 13 69 | 68 -21.96 179.62 627 5.0 45 70 | 69 -20.42 181.86 530 4.5 27 71 | 70 -15.46 187.81 40 5.5 91 72 | 71 -15.31 185.80 152 4.0 11 73 | 72 -19.86 184.35 201 4.5 30 74 | 73 -11.55 166.20 96 4.3 14 75 | 74 -23.74 179.99 506 5.2 75 76 | 75 -17.70 181.23 546 4.4 35 77 | 76 -23.54 180.04 564 4.3 15 78 | 77 -19.21 184.70 197 4.1 11 79 | 78 -12.11 167.06 265 4.5 23 80 | 79 -21.81 181.71 323 4.2 15 81 | 80 -28.98 181.11 304 5.3 60 82 | 81 -34.02 180.21 75 5.2 65 83 | 82 -23.84 180.99 367 4.5 27 84 | 83 -19.57 182.38 579 4.6 38 85 | 84 -20.12 183.40 284 4.3 15 86 | 85 -17.70 181.70 450 4.0 11 87 | 86 -19.66 184.31 170 4.3 15 88 | 87 -21.50 170.50 117 4.7 32 89 | 88 -23.64 179.96 538 4.5 26 90 | 89 -15.43 186.30 123 4.2 16 91 | 90 -15.41 186.44 69 4.3 42 92 | 91 -15.48 167.53 128 5.1 61 93 | 92 -13.36 167.06 236 4.7 22 94 | 93 -20.64 182.02 497 5.2 64 95 | 94 -19.72 169.71 271 4.2 14 96 | 95 -15.44 185.26 224 4.2 21 97 | 96 -19.73 182.40 375 4.0 18 98 | 97 -27.24 181.11 365 4.5 21 99 | 98 -18.16 183.41 306 5.2 54 100 | 99 -13.66 166.54 50 5.1 45 101 | 100 -24.57 179.92 484 4.7 33 102 | 101 -16.98 185.61 108 4.1 12 103 | 102 -26.20 178.41 583 4.6 25 104 | 103 -21.88 180.39 608 4.7 30 105 | 104 -33.00 181.60 72 4.7 22 106 | 105 -21.33 180.69 636 4.6 29 107 | 106 -19.44 183.50 293 4.2 15 108 | 107 -34.89 180.60 42 4.4 25 109 | 108 -20.24 169.49 100 4.6 22 110 | 109 -22.55 185.90 42 5.7 76 111 | 110 -36.95 177.81 146 5.0 35 112 | 111 -15.75 185.23 280 4.5 28 113 | 112 -16.85 182.31 388 4.2 14 114 | 113 -19.06 182.45 477 4.0 16 115 | 114 -26.11 178.30 617 4.8 39 116 | 115 -26.20 178.35 606 4.4 21 117 | 116 -26.13 178.31 609 4.2 25 118 | 117 -13.66 172.23 46 5.3 67 119 | 118 -13.47 172.29 64 4.7 14 120 | 119 -14.60 167.40 178 4.8 52 121 | 120 -18.96 169.48 248 4.2 13 122 | 121 -14.65 166.97 82 4.8 28 123 | 122 -19.90 178.90 81 4.3 11 124 | 123 -22.05 180.40 606 4.7 27 125 | 124 -19.22 182.43 571 4.5 23 126 | 125 -31.24 180.60 328 4.4 18 127 | 126 -17.93 167.89 49 5.1 43 128 | 127 -19.30 183.84 517 4.2 21 129 | 128 -26.53 178.57 600 5.0 69 130 | 129 -27.72 181.70 94 4.8 59 131 | 130 -19.19 183.51 307 4.3 19 132 | 131 -17.43 185.43 189 4.5 22 133 | 132 -17.05 181.22 527 4.2 24 134 | 133 -19.52 168.98 63 4.5 21 135 | 134 -23.71 180.30 510 4.6 30 136 | 135 -21.30 180.82 624 4.3 14 137 | 136 -16.24 168.02 53 4.7 12 138 | 137 -16.14 187.32 42 5.1 68 139 | 138 -23.95 182.80 199 4.6 14 140 | 139 -25.20 182.60 149 4.9 31 141 | 140 -18.84 184.16 210 4.2 17 142 | 141 -12.66 169.46 658 4.6 43 143 | 142 -20.65 181.40 582 4.0 14 144 | 143 -13.23 167.10 220 5.0 46 145 | 144 -29.91 181.43 205 4.4 34 146 | 145 -14.31 173.50 614 4.2 23 147 | 146 -20.10 184.40 186 4.2 10 148 | 147 -17.80 185.17 97 4.4 22 149 | 148 -21.27 173.49 48 4.9 42 150 | 149 -23.58 180.17 462 5.3 63 151 | 150 -17.90 181.50 573 4.0 19 152 | 151 -23.34 184.50 56 5.7 106 153 | 152 -15.56 167.62 127 6.4 122 154 | 153 -23.83 182.56 229 4.3 24 155 | 154 -11.80 165.80 112 4.2 20 156 | 155 -15.54 167.68 140 4.7 16 157 | 156 -20.65 181.32 597 4.7 39 158 | 157 -11.75 166.07 69 4.2 14 159 | 158 -24.81 180.00 452 4.3 19 160 | 159 -20.90 169.84 93 4.9 31 161 | 160 -11.34 166.24 103 4.6 30 162 | 161 -17.98 180.50 626 4.1 19 163 | 162 -24.34 179.52 504 4.8 34 164 | 163 -13.86 167.16 202 4.6 30 165 | 164 -35.56 180.20 42 4.6 32 166 | 165 -35.48 179.90 59 4.8 35 167 | 166 -34.20 179.43 40 5.0 37 168 | 167 -26.00 182.12 205 5.6 98 169 | 168 -19.89 183.84 244 5.3 73 170 | 169 -23.43 180.00 553 4.7 41 171 | 170 -18.89 169.42 239 4.5 27 172 | 171 -17.82 181.83 640 4.3 24 173 | 172 -25.68 180.34 434 4.6 41 174 | 173 -20.20 180.90 627 4.1 11 175 | 174 -15.20 184.68 99 4.1 14 176 | 175 -15.03 182.29 399 4.1 10 177 | 176 -32.22 180.20 216 5.7 90 178 | 177 -22.64 180.64 544 5.0 50 179 | 178 -17.42 185.16 206 4.5 22 180 | 179 -17.84 181.48 542 4.1 20 181 | 180 -15.02 184.24 339 4.6 27 182 | 181 -18.04 181.75 640 4.5 47 183 | 182 -24.60 183.50 67 4.3 25 184 | 183 -19.88 184.30 161 4.4 17 185 | 184 -20.30 183.00 375 4.2 15 186 | 185 -20.45 181.85 534 4.1 14 187 | 186 -17.67 187.09 45 4.9 62 188 | 187 -22.30 181.90 309 4.3 11 189 | 188 -19.85 181.85 576 4.9 54 190 | 189 -24.27 179.88 523 4.6 24 191 | 190 -15.85 185.13 290 4.6 29 192 | 191 -20.02 184.09 234 5.3 71 193 | 192 -18.56 169.31 223 4.7 35 194 | 193 -17.87 182.00 569 4.6 12 195 | 194 -24.08 179.50 605 4.1 21 196 | 195 -32.20 179.61 422 4.6 41 197 | 196 -20.36 181.19 637 4.2 23 198 | 197 -23.85 182.53 204 4.6 27 199 | 198 -24.00 182.75 175 4.5 14 200 | 199 -20.41 181.74 538 4.3 31 201 | 200 -17.72 180.30 595 5.2 74 202 | 201 -19.67 182.18 360 4.3 23 203 | 202 -17.70 182.20 445 4.0 12 204 | 203 -16.23 183.59 367 4.7 35 205 | 204 -26.72 183.35 190 4.5 36 206 | 205 -12.95 169.09 629 4.5 19 207 | 206 -21.97 182.32 261 4.3 13 208 | 207 -21.96 180.54 603 5.2 66 209 | 208 -20.32 181.69 508 4.5 14 210 | 209 -30.28 180.62 350 4.7 32 211 | 210 -20.20 182.30 533 4.2 11 212 | 211 -30.66 180.13 411 4.7 42 213 | 212 -16.17 184.10 338 4.3 13 214 | 213 -28.25 181.71 226 4.1 19 215 | 214 -20.47 185.68 93 5.4 85 216 | 215 -23.55 180.27 535 4.3 22 217 | 216 -20.94 181.58 573 4.3 21 218 | 217 -26.67 182.40 186 4.2 17 219 | 218 -18.13 181.52 618 4.6 41 220 | 219 -20.21 183.83 242 4.4 29 221 | 220 -18.31 182.39 342 4.2 14 222 | 221 -16.52 185.70 90 4.7 30 223 | 222 -22.36 171.65 130 4.6 39 224 | 223 -22.43 184.48 65 4.9 48 225 | 224 -20.37 182.10 397 4.2 22 226 | 225 -23.77 180.16 505 4.5 26 227 | 226 -13.65 166.66 71 4.9 52 228 | 227 -21.55 182.90 207 4.2 18 229 | 228 -16.24 185.75 154 4.5 22 230 | 229 -23.73 182.53 232 5.0 55 231 | 230 -22.34 171.52 106 5.0 43 232 | 231 -19.40 180.94 664 4.7 34 233 | 232 -24.64 180.81 397 4.3 24 234 | 233 -16.00 182.82 431 4.4 16 235 | 234 -19.62 185.35 57 4.9 31 236 | 235 -23.84 180.13 525 4.5 15 237 | 236 -23.54 179.93 574 4.0 12 238 | 237 -28.23 182.68 74 4.4 20 239 | 238 -21.68 180.63 617 5.0 63 240 | 239 -13.44 166.53 44 4.7 27 241 | 240 -24.96 180.22 470 4.8 41 242 | 241 -20.08 182.74 298 4.5 33 243 | 242 -24.36 182.84 148 4.1 16 244 | 243 -14.70 166.00 48 5.3 16 245 | 244 -18.20 183.68 107 4.8 52 246 | 245 -16.65 185.51 218 5.0 52 247 | 246 -18.11 181.67 597 4.6 28 248 | 247 -17.95 181.65 619 4.3 26 249 | 248 -15.50 186.90 46 4.7 18 250 | 249 -23.36 180.01 553 5.3 61 251 | 250 -19.15 169.50 150 4.2 12 252 | 251 -10.97 166.26 180 4.7 26 253 | 252 -14.85 167.24 97 4.5 26 254 | 253 -17.80 181.38 587 5.1 47 255 | 254 -22.50 170.40 106 4.9 38 256 | 255 -29.10 182.10 179 4.4 19 257 | 256 -20.32 180.88 680 4.2 22 258 | 257 -16.09 184.89 304 4.6 34 259 | 258 -19.18 169.33 254 4.7 35 260 | 259 -23.81 179.36 521 4.2 23 261 | 260 -23.79 179.89 526 4.9 43 262 | 261 -19.02 184.23 270 5.1 72 263 | 262 -20.90 181.51 548 4.7 32 264 | 263 -19.06 169.01 158 4.4 10 265 | 264 -17.88 181.47 562 4.4 27 266 | 265 -19.41 183.05 300 4.2 16 267 | 266 -26.17 184.20 65 4.9 37 268 | 267 -14.95 167.24 130 4.6 16 269 | 268 -18.73 168.80 82 4.4 14 270 | 269 -20.21 182.37 482 4.6 37 271 | 270 -21.29 180.85 607 4.5 23 272 | 271 -19.76 181.41 105 4.4 15 273 | 272 -22.09 180.38 590 4.9 35 274 | 273 -23.80 179.90 498 4.1 12 275 | 274 -20.16 181.99 504 4.2 11 276 | 275 -22.13 180.38 577 5.7 104 277 | 276 -17.44 181.40 529 4.6 25 278 | 277 -23.33 180.18 528 5.0 59 279 | 278 -24.78 179.22 492 4.3 16 280 | 279 -22.00 180.52 561 4.5 19 281 | 280 -19.13 182.51 579 5.2 56 282 | 281 -30.72 180.10 413 4.4 22 283 | 282 -22.32 180.54 565 4.2 12 284 | 283 -16.45 177.77 138 4.6 17 285 | 284 -17.70 185.00 383 4.0 10 286 | 285 -17.95 184.68 260 4.4 21 287 | 286 -24.40 179.85 522 4.7 29 288 | 287 -19.30 180.60 671 4.2 16 289 | 288 -21.13 185.32 123 4.7 36 290 | 289 -18.07 181.57 572 4.5 26 291 | 290 -20.60 182.28 529 5.0 50 292 | 291 -18.48 181.49 641 5.0 49 293 | 292 -13.34 166.20 67 4.8 18 294 | 293 -20.92 181.50 546 4.6 31 295 | 294 -25.31 179.69 507 4.6 35 296 | 295 -15.24 186.21 158 5.0 57 297 | 296 -16.40 185.86 148 5.0 47 298 | 297 -24.57 178.40 562 5.6 80 299 | 298 -17.94 181.51 601 4.0 16 300 | 299 -30.64 181.20 175 4.0 16 301 | 300 -18.64 169.32 260 4.6 23 302 | 301 -13.09 169.28 654 4.4 22 303 | 302 -19.68 184.14 242 4.8 40 304 | 303 -16.44 185.74 126 4.7 30 305 | 304 -21.09 181.38 555 4.6 15 306 | 305 -14.99 171.39 637 4.3 21 307 | 306 -23.30 179.70 500 4.7 29 308 | 307 -17.68 181.36 515 4.1 19 309 | 308 -22.00 180.53 583 4.9 20 310 | 309 -21.38 181.39 501 4.6 36 311 | 310 -32.62 181.50 55 4.8 26 312 | 311 -13.05 169.58 644 4.9 68 313 | 312 -12.93 169.63 641 5.1 57 314 | 313 -18.60 181.91 442 5.4 82 315 | 314 -21.34 181.41 464 4.5 21 316 | 315 -21.48 183.78 200 4.9 54 317 | 316 -17.40 181.02 479 4.4 14 318 | 317 -17.32 181.03 497 4.1 13 319 | 318 -18.77 169.24 218 5.3 53 320 | 319 -26.16 179.50 492 4.5 25 321 | 320 -12.59 167.10 325 4.9 26 322 | 321 -14.82 167.32 123 4.8 28 323 | 322 -21.79 183.48 210 5.2 69 324 | 323 -19.83 182.04 575 4.4 23 325 | 324 -29.50 182.31 129 4.4 14 326 | 325 -12.49 166.36 74 4.9 55 327 | 326 -26.10 182.30 49 4.4 11 328 | 327 -21.04 181.20 483 4.2 10 329 | 328 -10.78 165.77 93 4.6 20 330 | 329 -20.76 185.77 118 4.6 15 331 | 330 -11.41 166.24 83 5.3 55 332 | 331 -19.10 183.87 61 5.3 42 333 | 332 -23.91 180.00 534 4.5 11 334 | 333 -27.33 182.60 42 4.4 11 335 | 334 -12.25 166.60 219 5.0 28 336 | 335 -23.49 179.07 544 5.1 58 337 | 336 -27.18 182.18 56 4.5 14 338 | 337 -25.80 182.10 68 4.5 26 339 | 338 -27.19 182.18 69 5.4 68 340 | 339 -27.27 182.38 45 4.5 16 341 | 340 -27.10 182.18 43 4.7 17 342 | 341 -27.22 182.28 65 4.2 14 343 | 342 -27.38 181.70 80 4.8 13 344 | 343 -27.27 182.50 51 4.5 13 345 | 344 -27.54 182.50 68 4.3 12 346 | 345 -27.20 182.39 69 4.3 14 347 | 346 -27.71 182.47 103 4.3 11 348 | 347 -27.60 182.40 61 4.6 11 349 | 348 -27.38 182.39 69 4.5 12 350 | 349 -21.54 185.48 51 5.0 29 351 | 350 -27.21 182.43 55 4.6 10 352 | 351 -28.96 182.61 54 4.6 15 353 | 352 -12.01 166.29 59 4.9 27 354 | 353 -17.46 181.32 573 4.1 17 355 | 354 -30.17 182.02 56 5.5 68 356 | 355 -27.27 182.36 65 4.7 21 357 | 356 -17.79 181.32 587 5.0 49 358 | 357 -22.19 171.40 150 5.1 49 359 | 358 -17.10 182.68 403 5.5 82 360 | 359 -27.18 182.53 60 4.6 21 361 | 360 -11.64 166.47 130 4.7 19 362 | 361 -17.98 181.58 590 4.2 14 363 | 362 -16.90 185.72 135 4.0 22 364 | 363 -21.98 179.60 583 5.4 67 365 | 364 -32.14 179.90 406 4.3 19 366 | 365 -18.80 169.21 221 4.4 16 367 | 366 -26.78 183.61 40 4.6 22 368 | 367 -20.43 182.37 502 5.1 48 369 | 368 -18.30 183.20 103 4.5 14 370 | 369 -15.83 182.51 423 4.2 21 371 | 370 -23.44 182.93 158 4.1 20 372 | 371 -23.73 179.99 527 5.1 49 373 | 372 -19.89 184.08 219 5.4 105 374 | 373 -17.59 181.09 536 5.1 61 375 | 374 -19.77 181.40 630 5.1 54 376 | 375 -20.31 184.06 249 4.4 21 377 | 376 -15.33 186.75 48 5.7 123 378 | 377 -18.20 181.60 553 4.4 14 379 | 378 -15.36 186.66 112 5.1 57 380 | 379 -15.29 186.42 153 4.6 31 381 | 380 -15.36 186.71 130 5.5 95 382 | 381 -16.24 167.95 188 5.1 68 383 | 382 -13.47 167.14 226 4.4 26 384 | 383 -25.50 182.82 124 5.0 25 385 | 384 -14.32 167.33 204 5.0 49 386 | 385 -20.04 182.01 605 5.1 49 387 | 386 -28.83 181.66 221 5.1 63 388 | 387 -17.82 181.49 573 4.2 14 389 | 388 -27.23 180.98 401 4.5 39 390 | 389 -10.72 165.99 195 4.0 14 391 | 390 -27.00 183.88 56 4.9 36 392 | 391 -20.36 186.16 102 4.3 21 393 | 392 -27.17 183.68 44 4.8 27 394 | 393 -20.94 181.26 556 4.4 21 395 | 394 -17.46 181.90 417 4.2 14 396 | 395 -21.04 181.20 591 4.9 45 397 | 396 -23.70 179.60 646 4.2 21 398 | 397 -17.72 181.42 565 5.3 89 399 | 398 -15.87 188.13 52 5.0 30 400 | 399 -17.84 181.30 535 5.7 112 401 | 400 -13.45 170.30 641 5.3 93 402 | 401 -30.80 182.16 41 4.7 24 403 | 402 -11.63 166.14 109 4.6 36 404 | 403 -30.40 181.40 40 4.3 17 405 | 404 -26.18 178.59 548 5.4 65 406 | 405 -15.70 184.50 118 4.4 30 407 | 406 -17.95 181.50 593 4.3 16 408 | 407 -20.51 182.30 492 4.3 23 409 | 408 -15.36 167.51 123 4.7 28 410 | 409 -23.61 180.23 475 4.4 26 411 | 410 -33.20 181.60 153 4.2 21 412 | 411 -17.68 186.80 112 4.5 35 413 | 412 -22.24 184.56 99 4.8 57 414 | 413 -20.07 169.14 66 4.8 37 415 | 414 -25.04 180.10 481 4.3 15 416 | 415 -21.50 185.20 139 4.4 15 417 | 416 -14.28 167.26 211 5.1 51 418 | 417 -14.43 167.26 151 4.4 17 419 | 418 -32.70 181.70 211 4.4 40 420 | 419 -34.10 181.80 246 4.3 23 421 | 420 -19.70 186.20 47 4.8 19 422 | 421 -24.19 180.38 484 4.3 27 423 | 422 -26.60 182.77 119 4.5 29 424 | 423 -17.04 186.80 70 4.1 22 425 | 424 -22.10 179.71 579 5.1 58 426 | 425 -32.60 180.90 57 4.7 44 427 | 426 -33.00 182.40 176 4.6 28 428 | 427 -20.58 181.24 602 4.7 44 429 | 428 -20.61 182.60 488 4.6 12 430 | 429 -19.47 169.15 149 4.4 15 431 | 430 -17.47 180.96 546 4.2 23 432 | 431 -18.40 183.40 343 4.1 10 433 | 432 -23.33 180.26 530 4.7 22 434 | 433 -18.55 182.23 563 4.0 17 435 | 434 -26.16 178.47 537 4.8 33 436 | 435 -21.80 183.20 325 4.4 19 437 | 436 -27.63 182.93 80 4.3 14 438 | 437 -18.89 169.48 259 4.4 21 439 | 438 -20.30 182.30 476 4.5 10 440 | 439 -20.56 182.04 499 4.5 29 441 | 440 -16.10 185.32 257 4.7 30 442 | 441 -12.66 166.37 165 4.3 18 443 | 442 -21.05 184.68 136 4.7 29 444 | 443 -17.97 168.52 146 4.8 33 445 | 444 -19.83 182.54 524 4.6 14 446 | 445 -22.55 183.81 82 5.1 68 447 | 446 -22.28 183.52 90 4.7 19 448 | 447 -15.72 185.64 138 4.3 21 449 | 448 -20.85 181.59 499 5.1 91 450 | 449 -21.11 181.50 538 5.5 104 451 | 450 -25.31 180.15 467 4.5 25 452 | 451 -26.46 182.50 184 4.3 11 453 | 452 -24.09 179.68 538 4.3 21 454 | 453 -16.96 167.70 45 4.7 23 455 | 454 -23.19 182.80 237 4.3 18 456 | 455 -20.81 184.70 162 4.3 20 457 | 456 -15.03 167.32 136 4.6 20 458 | 457 -18.06 181.59 604 4.5 23 459 | 458 -19.00 185.60 107 4.5 15 460 | 459 -23.53 179.99 538 5.4 87 461 | 460 -18.18 180.63 639 4.6 39 462 | 461 -15.66 186.80 45 4.4 11 463 | 462 -18.00 180.62 636 5.0 100 464 | 463 -18.08 180.70 628 5.2 72 465 | 464 -18.05 180.86 632 4.4 15 466 | 465 -29.90 181.16 215 5.1 51 467 | 466 -20.90 181.90 556 4.4 17 468 | 467 -15.61 167.50 135 4.4 21 469 | 468 -16.03 185.43 297 4.8 25 470 | 469 -17.68 181.11 568 4.4 22 471 | 470 -31.94 180.57 168 4.7 39 472 | 471 -19.14 184.36 269 4.7 31 473 | 472 -18.00 185.48 143 4.4 29 474 | 473 -16.95 185.94 95 4.3 12 475 | 474 -10.79 166.06 142 5.0 40 476 | 475 -20.83 185.90 104 4.5 19 477 | 476 -32.90 181.60 169 4.6 27 478 | 477 -37.93 177.47 65 5.4 65 479 | 478 -29.09 183.20 54 4.6 23 480 | 479 -23.56 180.23 474 4.5 13 481 | 480 -19.60 185.20 125 4.4 13 482 | 481 -21.39 180.68 617 4.5 18 483 | 482 -14.85 184.87 294 4.1 10 484 | 483 -22.70 183.30 180 4.0 13 485 | 484 -32.42 181.21 47 4.9 39 486 | 485 -17.90 181.30 593 4.1 13 487 | 486 -23.58 183.40 94 5.2 79 488 | 487 -34.40 180.50 201 4.4 41 489 | 488 -17.61 181.20 537 4.1 11 490 | 489 -21.07 181.13 594 4.9 43 491 | 490 -13.84 170.62 638 4.6 20 492 | 491 -30.24 181.63 80 4.5 17 493 | 492 -18.49 169.04 211 4.8 30 494 | 493 -23.45 180.23 520 4.2 19 495 | 494 -16.04 183.54 384 4.2 23 496 | 495 -17.14 185.31 223 4.1 15 497 | 496 -22.54 172.91 54 5.5 71 498 | 497 -15.90 185.30 57 4.4 19 499 | 498 -30.04 181.20 49 4.8 20 500 | 499 -24.03 180.22 508 4.2 23 501 | 500 -18.89 184.46 242 4.8 36 502 | 501 -16.51 187.10 62 4.9 46 503 | 502 -20.10 186.30 63 4.6 19 504 | 503 -21.06 183.81 203 4.5 34 505 | 504 -13.07 166.87 132 4.4 24 506 | 505 -23.46 180.09 543 4.6 28 507 | 506 -19.41 182.30 589 4.2 19 508 | 507 -11.81 165.98 51 4.7 28 509 | 508 -11.76 165.96 45 4.4 51 510 | 509 -12.08 165.76 63 4.5 51 511 | 510 -25.59 180.02 485 4.9 48 512 | 511 -26.54 183.63 66 4.7 34 513 | 512 -20.90 184.28 58 5.5 92 514 | 513 -16.99 187.00 70 4.7 30 515 | 514 -23.46 180.17 541 4.6 32 516 | 515 -17.81 181.82 598 4.1 14 517 | 516 -15.17 187.20 50 4.7 28 518 | 517 -11.67 166.02 102 4.6 21 519 | 518 -20.75 184.52 144 4.3 25 520 | 519 -19.50 186.90 58 4.4 20 521 | 520 -26.18 179.79 460 4.7 44 522 | 521 -20.66 185.77 69 4.3 25 523 | 522 -19.22 182.54 570 4.1 22 524 | 523 -24.68 183.33 70 4.7 30 525 | 524 -15.43 167.38 137 4.5 16 526 | 525 -32.45 181.15 41 5.5 81 527 | 526 -21.31 180.84 586 4.5 17 528 | 527 -15.44 167.18 140 4.6 44 529 | 528 -13.26 167.01 213 5.1 70 530 | 529 -15.26 183.13 393 4.4 28 531 | 530 -33.57 180.80 51 4.7 35 532 | 531 -15.77 167.01 64 5.5 73 533 | 532 -15.79 166.83 45 4.6 39 534 | 533 -21.00 183.20 296 4.0 16 535 | 534 -16.28 166.94 50 4.6 24 536 | 535 -23.28 184.60 44 4.8 34 537 | 536 -16.10 167.25 68 4.7 36 538 | 537 -17.70 181.31 549 4.7 33 539 | 538 -15.96 166.69 150 4.2 20 540 | 539 -15.95 167.34 47 5.4 87 541 | 540 -17.56 181.59 543 4.6 34 542 | 541 -15.90 167.42 40 5.5 86 543 | 542 -15.29 166.90 100 4.2 15 544 | 543 -15.86 166.85 85 4.5 22 545 | 544 -16.20 166.80 98 4.5 21 546 | 545 -15.71 166.91 58 4.8 20 547 | 546 -16.45 167.54 125 4.6 18 548 | 547 -11.54 166.18 89 5.4 80 549 | 548 -19.61 181.91 590 4.6 34 550 | 549 -15.61 187.15 49 5.0 30 551 | 550 -21.16 181.41 543 4.3 17 552 | 551 -20.65 182.22 506 4.3 24 553 | 552 -20.33 168.71 40 4.8 38 554 | 553 -15.08 166.62 42 4.7 23 555 | 554 -23.28 184.61 76 4.7 36 556 | 555 -23.44 184.60 63 4.8 27 557 | 556 -23.12 184.42 104 4.2 17 558 | 557 -23.65 184.46 93 4.2 16 559 | 558 -22.91 183.95 64 5.9 118 560 | 559 -22.06 180.47 587 4.6 28 561 | 560 -13.56 166.49 83 4.5 25 562 | 561 -17.99 181.57 579 4.9 49 563 | 562 -23.92 184.47 40 4.7 17 564 | 563 -30.69 182.10 62 4.9 25 565 | 564 -21.92 182.80 273 5.3 78 566 | 565 -25.04 180.97 393 4.2 21 567 | 566 -19.92 183.91 264 4.2 23 568 | 567 -27.75 182.26 174 4.5 18 569 | 568 -17.71 181.18 574 5.2 67 570 | 569 -19.60 183.84 309 4.5 23 571 | 570 -34.68 179.82 75 5.6 79 572 | 571 -14.46 167.26 195 5.2 87 573 | 572 -18.85 187.55 44 4.8 35 574 | 573 -17.02 182.41 420 4.5 29 575 | 574 -20.41 186.51 63 5.0 28 576 | 575 -18.18 182.04 609 4.4 26 577 | 576 -16.49 187.80 40 4.5 18 578 | 577 -17.74 181.31 575 4.6 42 579 | 578 -20.49 181.69 559 4.5 24 580 | 579 -18.51 182.64 405 5.2 74 581 | 580 -27.28 183.40 70 5.1 54 582 | 581 -15.90 167.16 41 4.8 42 583 | 582 -20.57 181.33 605 4.3 18 584 | 583 -11.25 166.36 130 5.1 55 585 | 584 -20.04 181.87 577 4.7 19 586 | 585 -20.89 181.25 599 4.6 20 587 | 586 -16.62 186.74 82 4.8 51 588 | 587 -20.09 168.75 50 4.6 23 589 | 588 -24.96 179.87 480 4.4 25 590 | 589 -20.95 181.42 559 4.6 27 591 | 590 -23.31 179.27 566 5.1 49 592 | 591 -20.95 181.06 611 4.3 20 593 | 592 -21.58 181.90 409 4.4 19 594 | 593 -13.62 167.15 209 4.7 30 595 | 594 -12.72 166.28 70 4.8 47 596 | 595 -21.79 185.00 74 4.1 15 597 | 596 -20.48 169.76 134 4.6 33 598 | 597 -12.84 166.78 150 4.9 35 599 | 598 -17.02 182.93 406 4.0 17 600 | 599 -23.89 182.39 243 4.7 32 601 | 600 -23.07 184.03 89 4.7 32 602 | 601 -27.98 181.96 53 5.2 89 603 | 602 -28.10 182.25 68 4.6 18 604 | 603 -21.24 180.81 605 4.6 34 605 | 604 -21.24 180.86 615 4.9 23 606 | 605 -19.89 174.46 546 5.7 99 607 | 606 -32.82 179.80 176 4.7 26 608 | 607 -22.00 185.50 52 4.4 18 609 | 608 -21.57 185.62 66 4.9 38 610 | 609 -24.50 180.92 377 4.8 43 611 | 610 -33.03 180.20 186 4.6 27 612 | 611 -30.09 182.40 51 4.4 18 613 | 612 -22.75 170.99 67 4.8 35 614 | 613 -17.99 168.98 234 4.7 28 615 | 614 -19.60 181.87 597 4.2 18 616 | 615 -15.65 186.26 64 5.1 54 617 | 616 -17.78 181.53 511 4.8 56 618 | 617 -22.04 184.91 47 4.9 47 619 | 618 -20.06 168.69 49 5.1 49 620 | 619 -18.07 181.54 546 4.3 28 621 | 620 -12.85 165.67 75 4.4 30 622 | 621 -33.29 181.30 60 4.7 33 623 | 622 -34.63 179.10 278 4.7 24 624 | 623 -24.18 179.02 550 5.3 86 625 | 624 -23.78 180.31 518 5.1 71 626 | 625 -22.37 171.50 116 4.9 38 627 | 626 -23.97 179.91 518 4.5 23 628 | 627 -34.12 181.75 75 4.7 41 629 | 628 -25.25 179.86 491 4.2 23 630 | 629 -22.87 172.65 56 5.1 50 631 | 630 -18.48 182.37 376 4.8 57 632 | 631 -21.46 181.02 584 4.2 18 633 | 632 -28.56 183.47 48 4.8 56 634 | 633 -28.56 183.59 53 4.4 20 635 | 634 -21.30 180.92 617 4.5 26 636 | 635 -20.08 183.22 294 4.3 18 637 | 636 -18.82 182.21 417 5.6 129 638 | 637 -19.51 183.97 280 4.0 16 639 | 638 -12.05 167.39 332 5.0 36 640 | 639 -17.40 186.54 85 4.2 28 641 | 640 -23.93 180.18 525 4.6 31 642 | 641 -21.23 181.09 613 4.6 18 643 | 642 -16.23 167.91 182 4.5 28 644 | 643 -28.15 183.40 57 5.0 32 645 | 644 -20.81 185.01 79 4.7 42 646 | 645 -20.72 181.41 595 4.6 36 647 | 646 -23.29 184.00 164 4.8 50 648 | 647 -38.46 176.03 148 4.6 44 649 | 648 -15.48 186.73 82 4.4 17 650 | 649 -37.03 177.52 153 5.6 87 651 | 650 -20.48 181.38 556 4.2 13 652 | 651 -18.12 181.88 649 5.4 88 653 | 652 -18.17 181.98 651 4.8 43 654 | 653 -11.40 166.07 93 5.6 94 655 | 654 -23.10 180.12 533 4.4 27 656 | 655 -14.28 170.34 642 4.7 29 657 | 656 -22.87 171.72 47 4.6 27 658 | 657 -17.59 180.98 548 5.1 79 659 | 658 -27.60 182.10 154 4.6 22 660 | 659 -17.94 180.60 627 4.5 29 661 | 660 -17.88 180.58 622 4.2 23 662 | 661 -30.01 180.80 286 4.8 43 663 | 662 -19.19 182.30 390 4.9 48 664 | 663 -18.14 180.87 624 5.5 105 665 | 664 -23.46 180.11 539 5.0 41 666 | 665 -18.44 181.04 624 4.2 21 667 | 666 -18.21 180.87 631 5.2 69 668 | 667 -18.26 180.98 631 4.8 36 669 | 668 -15.85 184.83 299 4.4 30 670 | 669 -23.82 180.09 498 4.8 40 671 | 670 -18.60 184.28 255 4.4 31 672 | 671 -17.80 181.32 539 4.1 12 673 | 672 -10.78 166.10 195 4.9 45 674 | 673 -18.12 181.71 594 4.6 24 675 | 674 -19.34 182.62 573 4.5 32 676 | 675 -15.34 167.10 128 5.3 18 677 | 676 -24.97 182.85 137 4.8 40 678 | 677 -15.97 186.08 143 4.6 41 679 | 678 -23.47 180.24 511 4.8 37 680 | 679 -23.11 179.15 564 4.7 17 681 | 680 -20.54 181.66 559 4.9 50 682 | 681 -18.92 169.37 248 5.3 60 683 | 682 -20.16 184.27 210 4.4 27 684 | 683 -25.48 180.94 390 4.6 33 685 | 684 -18.19 181.74 616 4.3 17 686 | 685 -15.35 186.40 98 4.4 17 687 | 686 -18.69 169.10 218 4.2 27 688 | 687 -18.89 181.24 655 4.1 14 689 | 688 -17.61 183.32 356 4.2 15 690 | 689 -20.93 181.54 564 5.0 64 691 | 690 -17.60 181.50 548 4.1 10 692 | 691 -17.96 181.40 655 4.3 20 693 | 692 -18.80 182.41 385 5.2 67 694 | 693 -20.61 182.44 518 4.2 10 695 | 694 -20.74 181.53 598 4.5 36 696 | 695 -25.23 179.86 476 4.4 29 697 | 696 -23.90 179.90 579 4.4 16 698 | 697 -18.07 181.58 603 5.0 65 699 | 698 -15.43 185.19 249 4.0 11 700 | 699 -14.30 167.32 208 4.8 25 701 | 700 -18.04 181.57 587 5.0 51 702 | 701 -13.90 167.18 221 4.2 21 703 | 702 -17.64 177.01 545 5.2 91 704 | 703 -17.98 181.51 586 5.2 68 705 | 704 -25.00 180.00 488 4.5 10 706 | 705 -19.45 184.48 246 4.3 15 707 | 706 -16.11 187.48 61 4.5 19 708 | 707 -23.73 179.98 524 4.6 11 709 | 708 -17.74 186.78 104 5.1 71 710 | 709 -21.56 183.23 271 4.4 36 711 | 710 -20.97 181.72 487 4.3 16 712 | 711 -15.45 186.73 83 4.7 37 713 | 712 -15.93 167.91 183 5.6 109 714 | 713 -21.47 185.86 55 4.9 46 715 | 714 -21.44 170.45 166 5.1 22 716 | 715 -22.16 180.49 586 4.6 13 717 | 716 -13.36 172.76 618 4.4 18 718 | 717 -21.22 181.51 524 4.8 49 719 | 718 -26.10 182.50 133 4.2 17 720 | 719 -18.35 185.27 201 4.7 57 721 | 720 -17.20 182.90 383 4.1 11 722 | 721 -22.42 171.40 86 4.7 33 723 | 722 -17.91 181.48 555 4.0 17 724 | 723 -26.53 178.30 605 4.9 43 725 | 724 -26.50 178.29 609 5.0 50 726 | 725 -16.31 168.08 204 4.5 16 727 | 726 -18.76 169.71 287 4.4 23 728 | 727 -17.10 182.80 390 4.0 14 729 | 728 -19.28 182.78 348 4.5 30 730 | 729 -23.50 180.00 550 4.7 23 731 | 730 -21.26 181.69 487 4.4 20 732 | 731 -17.97 181.48 578 4.7 43 733 | 732 -26.02 181.20 361 4.7 32 734 | 733 -30.30 180.80 275 4.0 14 735 | 734 -24.89 179.67 498 4.2 14 736 | 735 -14.57 167.24 162 4.5 18 737 | 736 -15.40 186.87 78 4.7 44 738 | 737 -22.06 183.95 134 4.5 17 739 | 738 -25.14 178.42 554 4.1 15 740 | 739 -20.30 181.40 608 4.6 13 741 | 740 -25.28 181.17 367 4.3 25 742 | 741 -20.63 181.61 599 4.6 30 743 | 742 -19.02 186.83 45 5.2 65 744 | 743 -22.10 185.30 50 4.6 22 745 | 744 -38.59 175.70 162 4.7 36 746 | 745 -19.30 183.00 302 5.0 65 747 | 746 -31.03 181.59 57 5.2 49 748 | 747 -30.51 181.30 203 4.4 20 749 | 748 -22.55 183.34 66 4.6 18 750 | 749 -22.14 180.64 591 4.5 18 751 | 750 -25.60 180.30 440 4.0 12 752 | 751 -18.04 181.84 611 4.2 20 753 | 752 -21.29 185.77 57 5.3 69 754 | 753 -21.08 180.85 627 5.9 119 755 | 754 -20.64 169.66 89 4.9 42 756 | 755 -24.41 180.03 500 4.5 34 757 | 756 -12.16 167.03 264 4.4 14 758 | 757 -17.10 185.90 127 5.4 75 759 | 758 -21.13 185.60 85 5.3 86 760 | 759 -12.34 167.43 50 5.1 47 761 | 760 -16.43 186.73 75 4.1 20 762 | 761 -20.70 184.30 182 4.3 17 763 | 762 -21.18 180.92 619 4.5 18 764 | 763 -17.78 185.33 223 4.1 10 765 | 764 -21.57 183.86 156 5.1 70 766 | 765 -13.70 166.75 46 5.3 71 767 | 766 -12.27 167.41 50 4.5 29 768 | 767 -19.10 184.52 230 4.1 16 769 | 768 -19.85 184.51 184 4.4 26 770 | 769 -11.37 166.55 188 4.7 24 771 | 770 -20.70 186.30 80 4.0 10 772 | 771 -20.24 185.10 86 5.1 61 773 | 772 -16.40 182.73 391 4.0 16 774 | 773 -19.60 184.53 199 4.3 21 775 | 774 -21.63 180.77 592 4.3 21 776 | 775 -21.60 180.50 595 4.0 22 777 | 776 -21.77 181.00 618 4.1 10 778 | 777 -21.80 183.60 213 4.4 17 779 | 778 -21.05 180.90 616 4.3 10 780 | 779 -10.80 165.80 175 4.2 12 781 | 780 -17.90 181.50 589 4.0 12 782 | 781 -22.26 171.44 83 4.5 25 783 | 782 -22.33 171.46 119 4.7 32 784 | 783 -24.04 184.85 70 5.0 48 785 | 784 -20.40 186.10 74 4.3 22 786 | 785 -15.00 184.62 40 5.1 54 787 | 786 -27.87 183.40 87 4.7 34 788 | 787 -14.12 166.64 63 5.3 69 789 | 788 -23.61 180.27 537 5.0 63 790 | 789 -21.56 185.50 47 4.5 29 791 | 790 -21.19 181.58 490 5.0 77 792 | 791 -18.07 181.65 593 4.1 16 793 | 792 -26.00 178.43 644 4.9 27 794 | 793 -20.21 181.90 576 4.1 16 795 | 794 -28.00 182.00 199 4.0 16 796 | 795 -20.74 180.70 589 4.4 27 797 | 796 -31.80 180.60 178 4.5 19 798 | 797 -18.91 169.46 248 4.4 33 799 | 798 -20.45 182.10 500 4.5 37 800 | 799 -22.90 183.80 71 4.3 19 801 | 800 -18.11 181.63 568 4.3 36 802 | 801 -23.80 184.70 42 5.0 36 803 | 802 -23.42 180.21 510 4.5 37 804 | 803 -23.20 184.80 97 4.5 13 805 | 804 -12.93 169.52 663 4.4 30 806 | 805 -21.14 181.06 625 4.5 35 807 | 806 -19.13 184.97 210 4.1 22 808 | 807 -21.08 181.30 557 4.9 78 809 | 808 -20.07 181.75 582 4.7 27 810 | 809 -20.90 182.02 402 4.3 18 811 | 810 -25.04 179.84 474 4.6 32 812 | 811 -21.85 180.89 577 4.6 43 813 | 812 -19.34 186.59 56 5.2 49 814 | 813 -15.83 167.10 43 4.5 19 815 | 814 -23.73 183.00 118 4.3 11 816 | 815 -18.10 181.72 544 4.6 52 817 | 816 -22.12 180.49 532 4.0 14 818 | 817 -15.39 185.10 237 4.5 39 819 | 818 -16.21 186.52 111 4.8 30 820 | 819 -21.75 180.67 595 4.6 30 821 | 820 -22.10 180.40 603 4.1 11 822 | 821 -24.97 179.54 505 4.9 50 823 | 822 -19.36 186.36 100 4.7 40 824 | 823 -22.14 179.62 587 4.1 23 825 | 824 -21.48 182.44 364 4.3 20 826 | 825 -18.54 168.93 100 4.4 17 827 | 826 -21.62 182.40 350 4.0 12 828 | 827 -13.40 166.90 228 4.8 15 829 | 828 -15.50 185.30 93 4.4 25 830 | 829 -15.67 185.23 66 4.4 34 831 | 830 -21.78 183.11 225 4.6 21 832 | 831 -30.63 180.90 334 4.2 28 833 | 832 -15.70 185.10 70 4.1 15 834 | 833 -19.20 184.37 220 4.2 18 835 | 834 -19.70 182.44 397 4.0 12 836 | 835 -19.40 182.29 326 4.1 15 837 | 836 -15.85 185.90 121 4.1 17 838 | 837 -17.38 168.63 209 4.7 29 839 | 838 -24.33 179.97 510 4.8 44 840 | 839 -20.89 185.26 54 5.1 44 841 | 840 -18.97 169.44 242 5.0 41 842 | 841 -17.99 181.62 574 4.8 38 843 | 842 -15.80 185.25 82 4.4 39 844 | 843 -25.42 182.65 102 5.0 36 845 | 844 -21.60 169.90 43 5.2 56 846 | 845 -26.06 180.05 432 4.2 19 847 | 846 -17.56 181.23 580 4.1 16 848 | 847 -25.63 180.26 464 4.8 60 849 | 848 -25.46 179.98 479 4.5 27 850 | 849 -22.23 180.48 581 5.0 54 851 | 850 -21.55 181.39 513 5.1 81 852 | 851 -15.18 185.93 77 4.1 16 853 | 852 -13.79 166.56 68 4.7 41 854 | 853 -15.18 167.23 71 5.2 59 855 | 854 -18.78 186.72 68 4.8 48 856 | 855 -17.90 181.41 586 4.5 33 857 | 856 -18.50 185.40 243 4.0 11 858 | 857 -14.82 171.17 658 4.7 49 859 | 858 -15.65 185.17 315 4.1 15 860 | 859 -30.01 181.15 210 4.3 17 861 | 860 -13.16 167.24 278 4.3 17 862 | 861 -21.03 180.78 638 4.0 14 863 | 862 -21.40 180.78 615 4.7 51 864 | 863 -17.93 181.89 567 4.1 27 865 | 864 -20.87 181.70 560 4.2 13 866 | 865 -12.01 166.66 99 4.8 36 867 | 866 -19.10 169.63 266 4.8 31 868 | 867 -22.85 181.37 397 4.2 15 869 | 868 -17.08 185.96 180 4.2 29 870 | 869 -21.14 174.21 40 5.7 78 871 | 870 -12.23 167.02 242 6.0 132 872 | 871 -20.91 181.57 530 4.2 20 873 | 872 -11.38 167.05 133 4.5 32 874 | 873 -11.02 167.01 62 4.9 36 875 | 874 -22.09 180.58 580 4.4 22 876 | 875 -17.80 181.20 530 4.0 15 877 | 876 -18.94 182.43 566 4.3 20 878 | 877 -18.85 182.20 501 4.2 23 879 | 878 -21.91 181.28 548 4.5 30 880 | 879 -22.03 179.77 587 4.8 31 881 | 880 -18.10 181.63 592 4.4 28 882 | 881 -18.40 184.84 221 4.2 18 883 | 882 -21.20 181.40 560 4.2 12 884 | 883 -12.00 166.20 94 5.0 31 885 | 884 -11.70 166.30 139 4.2 15 886 | 885 -26.72 182.69 162 5.2 64 887 | 886 -24.39 178.98 562 4.5 30 888 | 887 -19.64 169.50 204 4.6 35 889 | 888 -21.35 170.04 56 5.0 22 890 | 889 -22.82 184.52 49 5.0 52 891 | 890 -38.28 177.10 100 5.4 71 892 | 891 -12.57 167.11 231 4.8 28 893 | 892 -22.24 180.28 601 4.2 21 894 | 893 -13.80 166.53 42 5.5 70 895 | 894 -21.07 183.78 180 4.3 25 896 | 895 -17.74 181.25 559 4.1 16 897 | 896 -23.87 180.15 524 4.4 22 898 | 897 -21.29 185.80 69 4.9 74 899 | 898 -22.20 180.58 594 4.5 45 900 | 899 -15.24 185.11 262 4.9 56 901 | 900 -17.82 181.27 538 4.0 33 902 | 901 -32.14 180.00 331 4.5 27 903 | 902 -19.30 185.86 48 5.0 40 904 | 903 -33.09 180.94 47 4.9 47 905 | 904 -20.18 181.62 558 4.5 31 906 | 905 -17.46 181.42 524 4.2 16 907 | 906 -17.44 181.33 545 4.2 37 908 | 907 -24.71 179.85 477 4.2 34 909 | 908 -21.53 170.52 129 5.2 30 910 | 909 -19.17 169.53 268 4.3 21 911 | 910 -28.05 182.39 117 5.1 43 912 | 911 -23.39 179.97 541 4.6 50 913 | 912 -22.33 171.51 112 4.6 14 914 | 913 -15.28 185.98 162 4.4 36 915 | 914 -20.27 181.51 609 4.4 32 916 | 915 -10.96 165.97 76 4.9 64 917 | 916 -21.52 169.75 61 5.1 40 918 | 917 -19.57 184.47 202 4.2 28 919 | 918 -23.08 183.45 90 4.7 30 920 | 919 -25.06 182.80 133 4.0 14 921 | 920 -17.85 181.44 589 5.6 115 922 | 921 -15.99 167.95 190 5.3 81 923 | 922 -20.56 184.41 138 5.0 82 924 | 923 -17.98 181.61 598 4.3 27 925 | 924 -18.40 181.77 600 4.1 11 926 | 925 -27.64 182.22 162 5.1 67 927 | 926 -20.99 181.02 626 4.5 36 928 | 927 -14.86 167.32 137 4.9 22 929 | 928 -29.33 182.72 57 5.4 61 930 | 929 -25.81 182.54 201 4.7 40 931 | 930 -14.10 166.01 69 4.8 29 932 | 931 -17.63 185.13 219 4.5 28 933 | 932 -23.47 180.21 553 4.2 23 934 | 933 -23.92 180.21 524 4.6 50 935 | 934 -20.88 185.18 51 4.6 28 936 | 935 -20.25 184.75 107 5.6 121 937 | 936 -19.33 186.16 44 5.4 110 938 | 937 -18.14 181.71 574 4.0 20 939 | 938 -22.41 183.99 128 5.2 72 940 | 939 -20.77 181.16 568 4.2 12 941 | 940 -17.95 181.73 583 4.7 57 942 | 941 -20.83 181.01 622 4.3 15 943 | 942 -27.84 182.10 193 4.8 27 944 | 943 -19.94 182.39 544 4.6 30 945 | 944 -23.60 183.99 118 5.4 88 946 | 945 -23.70 184.13 51 4.8 27 947 | 946 -30.39 182.40 63 4.6 22 948 | 947 -18.98 182.32 442 4.2 22 949 | 948 -27.89 182.92 87 5.5 67 950 | 949 -23.50 184.90 61 4.7 16 951 | 950 -23.73 184.49 60 4.7 35 952 | 951 -17.93 181.62 561 4.5 32 953 | 952 -35.94 178.52 138 5.5 78 954 | 953 -18.68 184.50 174 4.5 34 955 | 954 -23.47 179.95 543 4.1 21 956 | 955 -23.49 180.06 530 4.0 23 957 | 956 -23.85 180.26 497 4.3 32 958 | 957 -27.08 183.44 63 4.7 27 959 | 958 -20.88 184.95 82 4.9 50 960 | 959 -20.97 181.20 605 4.5 31 961 | 960 -21.71 183.58 234 4.7 55 962 | 961 -23.90 184.60 41 4.5 22 963 | 962 -15.78 167.44 40 4.8 42 964 | 963 -12.57 166.72 137 4.3 20 965 | 964 -19.69 184.23 223 4.1 23 966 | 965 -22.04 183.95 109 5.4 61 967 | 966 -17.99 181.59 595 4.1 26 968 | 967 -23.50 180.13 512 4.8 40 969 | 968 -21.40 180.74 613 4.2 20 970 | 969 -15.86 166.98 60 4.8 25 971 | 970 -23.95 184.64 43 5.4 45 972 | 971 -25.79 182.38 172 4.4 14 973 | 972 -23.75 184.50 54 5.2 74 974 | 973 -24.10 184.50 68 4.7 23 975 | 974 -18.56 169.05 217 4.9 35 976 | 975 -23.30 184.68 102 4.9 27 977 | 976 -17.03 185.74 178 4.2 32 978 | 977 -20.77 183.71 251 4.4 47 979 | 978 -28.10 183.50 42 4.4 17 980 | 979 -18.83 182.26 575 4.3 11 981 | 980 -23.00 170.70 43 4.9 20 982 | 981 -20.82 181.67 577 5.0 67 983 | 982 -22.95 170.56 42 4.7 21 984 | 983 -28.22 183.60 75 4.9 49 985 | 984 -27.99 183.50 71 4.3 22 986 | 985 -15.54 187.15 60 4.5 17 987 | 986 -12.37 166.93 291 4.2 16 988 | 987 -22.33 171.66 125 5.2 51 989 | 988 -22.70 170.30 69 4.8 27 990 | 989 -17.86 181.30 614 4.0 12 991 | 990 -16.00 184.53 108 4.7 33 992 | 991 -20.73 181.42 575 4.3 18 993 | 992 -15.45 181.42 409 4.3 27 994 | 993 -20.05 183.86 243 4.9 65 995 | 994 -17.95 181.37 642 4.0 17 996 | 995 -17.70 188.10 45 4.2 10 997 | 996 -25.93 179.54 470 4.4 22 998 | 997 -12.28 167.06 248 4.7 35 999 | 998 -20.13 184.20 244 4.5 34 1000 | 999 -17.40 187.80 40 4.5 14 1001 | 1000 -21.59 170.56 165 6.0 119 1002 | -------------------------------------------------------------------------------- /images/ch09q09_boxplot.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 57 | 72 | 93 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 154 | 174 | 209 | 249 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 324 | 335 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 412 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 465 | 466 | 467 | 468 | 469 | 470 | 476 | 500 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 567 | 568 | 569 | 570 | 571 | 572 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 602 | 603 | 604 | 605 | 606 | 607 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 651 | 652 | 653 | 654 | 655 | 656 | 693 | 694 | 695 | 696 | 697 | 698 | 699 | 700 | 701 | 702 | 703 | 706 | 707 | 708 | 709 | 710 | 711 | 722 | 723 | 724 | 725 | 726 | 727 | 728 | 729 | 730 | 731 | 732 | 733 | 736 | 737 | 738 | 739 | 740 | 741 | 742 | 743 | 744 | 745 | 746 | 747 | 748 | 749 | 750 | 751 | 762 | 763 | 764 | 765 | 766 | 767 | 768 | 769 | 770 | 771 | 772 | 773 | 780 | 781 | 782 | 789 | 790 | 791 | 798 | 799 | 800 | 807 | 808 | 809 | 812 | 813 | 814 | 817 | 818 | 819 | 822 | 823 | 824 | 827 | 828 | 829 | 830 | 833 | 834 | 835 | 838 | 839 | 840 | 843 | 844 | 845 | 848 | 849 | 850 | 851 | 854 | 855 | 856 | 859 | 860 | 861 | 864 | 865 | 866 | 869 | 870 | 871 | 872 | 875 | 876 | 877 | 880 | 881 | 882 | 885 | 886 | 887 | 890 | 891 | 892 | 893 | 896 | 897 | 898 | 901 | 902 | 903 | 906 | 907 | 908 | 911 | 912 | 913 | 916 | 917 | 918 | 921 | 922 | 923 | 926 | 927 | 928 | 931 | 932 | 933 | 934 | 935 | 972 | 989 | 1010 | 1011 | 1012 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1034 | 1035 | 1036 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | --------------------------------------------------------------------------------