Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.uconn.edu/jet08013/BDA

  • Loading branch information...
jeremyteitelbaum
jeremyteitelbaum committed May 2, 2018
2 parents 06b9847 + 025db3a commit c9da2ea66d3a2ea51a3f2e49ef42e397e4d6dad0
Showing with 543 additions and 48 deletions.
  1. +166 −0 BDA 4.7.5.ipynb
  2. +48 −48 BDA 5.9.3.ipynb
  3. +185 −0 BDA 5.9.8.ipynb
  4. +144 −0 Useful Formulae.ipynb
@@ -0,0 +1,166 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Problem 4.7.5.\n",
"\n",
"Approximate mean and variance.\n",
"1. Suppose x and y are independent normally distributed random variables, where x~N(4,1) and y~N(3,2). What are the mean and standard deviations of y/x? Compute this using simulation.\n",
"\n",
"2. Do the same computation without simulation.\n",
"\n",
"3. What assumptions do you need for part (2)?"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"from scipy.stats import norm"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"mean: 0.8079667283774233 sd: 0.6574088802979349\n"
]
}
],
"source": [
"x=norm(4.0,1.0)\n",
"y=norm(3.0,2.0)\n",
"\n",
"samples_x=x.rvs(10000)\n",
"samples_y=y.rvs(10000)\n",
"z=samples_y/samples_x\n",
"print('mean:',np.mean(z),'sd:',np.sqrt(np.var(z)))"
]
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3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AYdJ+q2khZIm51j2LOCjktaR9IS5pEJl96avx8FgjuXitIlrTtWaFHZV9GsuFcAvJN2fXkFdlAMiYgNA+nf/ahSSqctmFQxkaIc8yk42lD4KtAKnV7tcSU0kI5SeX4GyMpeb2o2kieedJL9qfi3p6Ih4IYeypwPfjoh/k3QqyfUeR0dExwDLrkRsfX9S6Q7gLV2sujwibsszliwxAd8g+XUZ6d9/Ay6oVNk9hdXFsqK6Ep4WEesl7Q8skPRYWhMflIpK+gMZ2iGPspF0JsmH4vSI2JZDuXsDRwP3pK1YbwHmSZoSEQM5uZT1f70wIl4DnlQyPsw4kqtOByJL2ReSDLtNRNwraXeS8Ucq1cQ0kNj6LCLOrJVYOmWNSdK3gEr+yuxJVV9zX0TE+vTvRkm3kDQ9FZH0n5V0YERsSJsaq/IZKKp5ZyBDO1S97LSZ5RpgSgXbt3ssNyK2RMTIiGiJiBaScwkDTfi9lpu6leTkNZJGkjT3rB5guVnLXguckZZ9JLA7sKkCZfdmHvCxtBfPKcCWzp/WBShsuJKy8xjvB/Ia7LAmhrGQNFzS3p33gbPJ739QrjTnnQd098twYPI8Y1129vpc4HGSM/iXp8uuIEl0kHz4f0ByUus+4NAcy74DeBZYkt7m5VFu2bb3UIHeOxlfr4D/QzJcxlJgWo7/6/HAb0l6bywBzq5QuTcCG4DXSGqVFwJ/CfxlyWu+Oo1raaX+173E9P40lm3p8XV7ybrL01hWAOdUO5aScv8rff0PkySdA3Mse5djI+8bSe+hh9Lbsrzi6Ob4fDNwJ7Ay/btfNcr2FblmZg3EV+SamTUQJ30zswbipG9m1kCc9M3MGoiTvplZA3HSNzNrIE76ZmYNxEnfzKyB/H/GxpPhCZ8T7QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 4 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"h=norm(.807,.657)\n",
"fig,ax=plt.subplots(2,2)\n",
"ax[0,0].set_xlim(-5,5)\n",
"j=ax[0,0].hist(z,bins=100,density=True)\n",
"j=ax[0,1].hist(samples_x,bins=50,density=True)\n",
"j=ax[1,1].hist(samples_y,bins=50,density=True)\n",
"ax[0,0].plot(np.linspace(-5,5,100),h.pdf(np.linspace(-5,5,100)))\n",
"\n",
"b=plt.hist(z,bins=100)"
]
},
{
"cell_type": "code",
"execution_count": 58,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(array([1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 1.000e+00, 1.000e+00, 6.000e+00, 7.000e+00, 1.800e+01,\n",
" 5.800e+01, 1.330e+02, 3.230e+02, 6.530e+02, 1.059e+03, 1.401e+03,\n",
" 1.615e+03, 1.410e+03, 1.124e+03, 7.740e+02, 5.150e+02, 3.100e+02,\n",
" 2.150e+02, 1.320e+02, 7.000e+01, 5.800e+01, 2.700e+01, 2.600e+01,\n",
" 2.200e+01, 7.000e+00, 5.000e+00, 7.000e+00, 4.000e+00, 2.000e+00,\n",
" 3.000e+00, 2.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 1.000e+00,\n",
" 0.000e+00, 0.000e+00, 2.000e+00, 0.000e+00, 0.000e+00, 1.000e+00,\n",
" 0.000e+00, 1.000e+00, 1.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 1.000e+00, 0.000e+00, 1.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00, 0.000e+00,\n",
" 0.000e+00, 0.000e+00, 0.000e+00, 1.000e+00]),\n",
" array([-9.34383882, -9.13726736, -8.9306959 , -8.72412443, -8.51755297,\n",
" -8.31098151, -8.10441005, -7.89783858, -7.69126712, -7.48469566,\n",
" -7.2781242 , -7.07155274, -6.86498127, -6.65840981, -6.45183835,\n",
" -6.24526689, -6.03869543, -5.83212396, -5.6255525 , -5.41898104,\n",
" -5.21240958, -5.00583812, -4.79926665, -4.59269519, -4.38612373,\n",
" -4.17955227, -3.97298081, -3.76640934, -3.55983788, -3.35326642,\n",
" -3.14669496, -2.9401235 , -2.73355203, -2.52698057, -2.32040911,\n",
" -2.11383765, -1.90726619, -1.70069472, -1.49412326, -1.2875518 ,\n",
" -1.08098034, -0.87440888, -0.66783741, -0.46126595, -0.25469449,\n",
" -0.04812303, 0.15844844, 0.3650199 , 0.57159136, 0.77816282,\n",
" 0.98473428, 1.19130575, 1.39787721, 1.60444867, 1.81102013,\n",
" 2.01759159, 2.22416306, 2.43073452, 2.63730598, 2.84387744,\n",
" 3.0504489 , 3.25702037, 3.46359183, 3.67016329, 3.87673475,\n",
" 4.08330621, 4.28987768, 4.49644914, 4.7030206 , 4.90959206,\n",
" 5.11616352, 5.32273499, 5.52930645, 5.73587791, 5.94244937,\n",
" 6.14902083, 6.3555923 , 6.56216376, 6.76873522, 6.97530668,\n",
" 7.18187815, 7.38844961, 7.59502107, 7.80159253, 8.00816399,\n",
" 8.21473546, 8.42130692, 8.62787838, 8.83444984, 9.0410213 ,\n",
" 9.24759277, 9.45416423, 9.66073569, 9.86730715, 10.07387861,\n",
" 10.28045008, 10.48702154, 10.693593 , 10.90016446, 11.10673592,\n",
" 11.31330739]),\n",
" <a list of 100 Patch objects>)"
]
},
"execution_count": 58,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"b\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Oops, something went wrong.

0 comments on commit c9da2ea

Please sign in to comment.
You can’t perform that action at this time.