02-histogramme_densite.ipynb 108 KB
Newer Older
vincentvigon's avatar
vincentvigon committed
1
2
3
4
{
 "cells": [
  {
   "cell_type": "markdown",
vincentvigon's avatar
vincentvigon committed
5
   "metadata": {},
vincentvigon's avatar
vincentvigon committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
   "source": [
    "#  histogrammes et densités "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
vincentvigon's avatar
vincentvigon committed
25
    "## Graphiques en batons"
vincentvigon's avatar
vincentvigon committed
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAD+lJREFUeJzt3X+IH3edx/Hny3S1Qj0LZqEhyXaFlgMVbesSK4WjKIXYK80fVohw1YoS8CxWEE7rHxH7X//RQyuWYIupJ1qpnsSSIgUr6h+NbmNa20aPnNBLQqTbRlODWk3vfX/sKHvf7uY7u/vd/TafPB8wdH68d+Y9nexrZ2dn5puqQpLUlleNuwFJ0ugZ7pLUIMNdkhpkuEtSgwx3SWqQ4S5JDTLcJalBhrskNchwl6QGXTCuDW/cuLGmp6fHtXlJOic99thjz1XV5LC6sYX79PQ0s7Oz49q8JJ2TkjzTp87LMpLUIMNdkhpkuEtSgwx3SWqQ4S5JDeod7kk2JPlFk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bIfW7f+ba/0Pg+D/2DqiTp3OPrBySpQYb7IpLcm+TZ7hbPxZYnyRe71y08keSq9e5x1Hrs87VJTiU51A27F6s7VyTZmuSRJE8neSrJbYvUNHWce+5za8f5wiQ/S/J4t8+fW6SmzdenVJXDwAD8E3AV8OQSy68HHgICXA0cGHfP67DP1wIPjrvPEe7vJuCqbvx1wH8Bb2r5OPfc59aOc4CLuvEJ4ABw9UDNvwJ3d+M7gfvH3fcoBs/cF1FVP2b+rp+l7ADuq3mPAhcn2bQ+3a2NHvvclKo6UVUHu/E/AId5+ZPXTR3nnvvclO7Yne4mJ7ph8A+NTb4+xXBfmT6vZGjRO7tfbx9K8uZxNzMq3a/hVzJ/VrdQs8f5LPsMjR3nJBuSHAKeBR6uqiWPczX0+hTDXX0dZP6x57cBXwK+N+Z+RiLJRcB3gE9U1Qvj7mc9DNnn5o5zVb1UVVcw/3T9tiRvGXdP68FwX5k+r2RoSlW98Ldfb2v+uYeJJBvH3NaqJJlgPuS+UVXfXaSkueM8bJ9bPM5/U1W/Bx4Btg8s+vtxPtvrU841hvvK7AM+0N1NcTVwqqpOjLuptZTkkr9dh0yyjfl/O+fsN0C3L/cAh6vq80uUNXWc++xzg8d5MsnF3fhrgeuAXw2UNfn6lF5PqJ5vknyT+bsGNiY5BnyW+T/EUFV3M/+07vXAEeCPwIfG0+no9Njnm4CPJjkD/AnYeY5/A1wD3Az8srseC/AZYAqaPc599rm147wJ2Jv5Dx16FfDtqnrwfHh9ik+oSlKDvCwjSQ0y3CWpQYa7JDXIcJekBhnuktQgw12SGmS4S1KDDHdJatD/AXcdlQSX+NDFAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "x= [1,1.5,2,2.5,3]\n",
    "y= [1,4,3,4,1]\n",
    "\n",
    "\"\"\" Par défaut  width=0.8, ce qui ne ferait pas joli ici\"\"\"\n",
    "plt.bar(x,y,edgecolor=\"k\",width=0.5); # \"k\" c'est black\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
vincentvigon's avatar
vincentvigon committed
59
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZUAAAD8CAYAAAC/1zkdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAG6xJREFUeJzt3XuQVOWd//H3VwaZJEtAEC/LwM4QUUFRxAlgudkguFyUOLmZaKwVFyNFSRRYcwETf8FdiFI/oitZxFiRcFGDLGYjpcS7VmnqJzoIQRANE4IylAnKzS0UFfn+/jjPQDv2XJh5TndP9+dV1TXdT5/u7zmne863v8/z9Glzd0RERGI4Jt8rICIixUNJRUREolFSERGRaJRUREQkGiUVERGJRklFRESiUVIREZFolFRERCQaJRUREYmmLN8rkGvHH3+8V1ZWtvnxDWcgMLNIa6S4ipvf2IqruK2xdu3ad9y9V0vLlVxSqayspLa2ts2PP3jwIABlZbnddYpb3HHzGVtxFbc1zOyN1iyn7i8REYlGSUVERKJRUhERkWhKbkxFRErDRx99RH19PQcOHPhEe0cfME87bnl5ORUVFXTu3LlN8ZRURKQo1dfX07VrVyorKz9xQO0oB/d8xHV3du3aRX19PVVVVW2Kp+4vESlKBw4coGfPnnmZHt5RmRk9e/b8VHV3NJRURKRoKaEcvfbuMyUVERGJRmMqIpFUznjk8PVtt16cxzWRbDJfnxha8xpv27aN8ePHs3HjxqixC5mSikgKlGCkVKn7S6QdKmc8cvgiks3HH3/MNddcw5lnnsmYMWN4//33Wb9+PcOHD+ess87ia1/7Gnv27AFgxIgRTJ8+nerqagYMGMBLL73E17/+dfr3789PfvITIKl+Tj/9dK666ipOPfVUrrjiCp588knOP/98+vfvz4svvgjA/v37mThxIsOGDWPIkCE89NB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W5CJ26IJaD+wEngD+DOx194NhkbT2+X+S/MMfCrd75iiuA4+b2VozmxTa0t7PVcDbwK9Dd9+vzOxzOYib6TLgN+F6qnHdfQcwD3gTeAvYB6wl/dd3I/AlM+tpZp8FLgL6kNv93FSsVI9lSiodlCcfMVKbumdmfwc8CExz93dzEdvdP/ake6SCpNvg9NgxGjOz8cBOd1+bdqws/tHdh5B0R0wxs3/KvDOl/VwGDAEWuvs5wH4adcGk+d4KYxeXAP/d+L404oZxhBqSZPr3wOf4dDdRdO6+maSL7XHgUWA98HGjZVL9H85XLCWV1ttB8kmjQUVoy6W/mdnJAOHvzjSCmFlnkoRyn7v/NpexAdx9L/AMSbdEdzMrC3elsc/PBy4xs23AcpIusDtyELfhUzTuvpNkfGEo6e/neqDe3deE2ytJkkyuXt9xwMvu/rdwO+24FwJ/cfe33f0j4Lckr3kuXt973P1cd/8nknGbP5HD/6NmYqV6LFNSab2XgP5h1sixJCX8qhyvwypgQrg+gWS8IyozM+AeYLO735ar2GbWy8y6h+ufIRnH2UySXL6ZVlx3n+nuFe5eSfKaPu3uV6Qd18w+Z2ZdG66TjDNsJOX97O5/Bbab2WmhaRTwatpxM1zOka4vchD3TWC4mX02vLcbtjfV1xfAzE4If/sCXwfuJ3f7mWZirQKuDLPAhgP7MrrJ2i/m4FSxX0j6Rf9E0tf/45Rj/YakD/gjkk+XV5P09T8FbAGeBHqkEPcfScrkDSQl+/qw3anGBs4C1oW4G4H/E9r7AS8CdSRdJl1S3OcjgIdzETc8/x/DZVPD+ylHr/FgoDbs698Bx+Uo7ueAXUC3jLZcxL0ZeC28r5YBXXLxvgKeI0lgfwRGpbm9R3O8IJmIsiAcx14hmRkXbbv1jXoREYlG3V8iIhKNkoqIiESjpCIiItEoqYiISDRKKiIiEo2SioiIRKOkIiIi0SipiIhINP8f1Dv5FZYNCIsAAAAASUVORK5CYII=\n",
vincentvigon's avatar
vincentvigon committed
60
      "text/plain": [
vincentvigon's avatar
vincentvigon committed
61
       "<Figure size 432x288 with 1 Axes>"
vincentvigon's avatar
vincentvigon committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\"\"\" Population totale par sexe et âge au 1er janvier 2018, France. source:\n",
    "https://www.insee.fr/fr/statistiques/fichier/1892086/pop-totale-france.xls \"\"\"\n",
    "nb_hommes=[370264,380786,390091,398757,409096,419458,422341,433633,433293,435936,432382,439050,429300,427923,426042,428943,436599,442760,420335,411745,397771,394287,384071,365958,361467,378875,380348,386998,386152,391032,392666,397890,400708,396839,392953,417916,422120,429147,406565,399665,406674,394569,405691,428904,452528,462957,459928,451838,443890,438042,436591,445267,446241,448156,443106,425952,424946,421198,414831,404537,400466,395119,387700,385660,374649,378923,368702,381299,370877,367734,357172,334517,249885,240416,230819,211303,184231,186016,189134,179799,169183,162468,149256,142187,126683,119777,106150,94411,76897,65760,54174,43318,35138,26429,19424,14138,10396,7400,2994,1612,2929,]\n",
    "nb_femmes=[354226,363749,373574,386477,389867,398597,405611,415679,412153,415631,413237,420649,411513,409866,407270,408649,416111,421402,398604,394150,380429,381718,374299,363324,360271,378034,385787,396563,401533,408101,410675,420196,419362,418329,413567,437539,440858,446720,423369,413791,414315,405569,414926,435625,461600,470512,467329,459041,453968,453315,449798,459334,459223,465447,461150,445813,446626,446154,444025,434265,433063,429825,425865,424456,416053,420938,410389,425522,417056,411404,404106,382498,289497,281703,273366,251816,224905,234778,243629,239419,233198,231156,222866,220997,205946,204422,188772,178310,153484,139112,120327,105685,90293,73890,60007,48181,36624,27518,11907,7042,13945,]\n",
    "nb_femmes=-np.array(nb_femmes)\n",
    "\n",
    "ages=range(0,len(nb_hommes))\n",
    "\n",
    "\n",
    "plt.bar(ages,nb_hommes,width=1,label=\"hommes\")\n",
    "plt.bar(ages,nb_femmes,width=1,label=\"femmes\")\n",
    "xticks=np.arange(0,101,10)\n",
    "plt.xticks(xticks)\n",
    "for x in xticks: plt.axvline(x,color=\"0.9\",linewidth=0.3)\n",
    "plt.legend();\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Exo: changez les abscisses pour faire apparaitre les années de naissances. Essayez de justifier les trous et les bonnes dans la pyramide d'âge. \n",
    "\n",
    "Exo: Comment expliquez-vous le grand nombre de centenaire comparez aux personnes de 98 ou 99 ans ?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Histogrammes\n",
    "\n",
    "Considérons maintenant un échantillon c.à.d un ensemble de nombre réels. Dans la plupart des cas les échantillons sont construit:\n",
    "* soit à partir de simulation successive de v.a (ex: v.a gaussienne)\n",
    "* soit à partir d'observations (ex: tailles des gens dans la rue)\n",
    "\n",
    "Dresser l'histogramme d'un échantillon consiste à découper les réel en sous-interavalles, puis d'afficher des batons qui ont pour base ces sous-intervallse, et comme hauteur le nombre d'élément de l'échantillon contenu dans chaque sous-intervalles. \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
vincentvigon's avatar
vincentvigon committed
117
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAFHNJREFUeJzt3X+sX3d93/Hnq05tJqBd2lz1tv6Ra1ozYboq2b6YP7qm00jArJOdaaA6WqWgRbIyxYKJVSOMqtGMkPghsU2TK2KNSG0Fc1PYpiutyE1L6MYfAX8NKamdetwYgm3Ri5ukMAR1cPLeH/cEvrnc8D33+tz7/drn+ZC+8vd8zud8/P5e3fu6554fn5OqQpL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yNV1a0tu36MpXsT7lvHclobV3eStwH/DHhDTdGJmlV8vaddqylF1I3mmPgngY9V1X+fdD2rVVV/k+RhlqaUn6qT6L3b0/9RkuwaWdwP/OWkalmNJHuBfwfsq6rvTLqea1Sb6UjUgeaE6EeBx6vqw5Oup60kMy9cOZfk77B00n/qMsSrd0Yk+STw91i6ouRJ4O6qmvq9uWb6iy0sTXIH8MhVctXRPwf+CzAD/A3waFVN7dPVkvxT4D/xg+lIpv5O8yT/DfjHLM36uAjcV1UfnWhRYyT5R8D/AR5j6WcR4N83MwNMrSS/xNJzRTaxtEP9YFUdnmxVP8zQl6Qe8fCOJPWIoS9JPWLoS1KPGPqS1COGviT1iKEvST1i6EtSjxj6ktQj/x/Fi0DnSdxt6QAAAABJRU5ErkJggg==\n",
vincentvigon's avatar
vincentvigon committed
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\"\"\"l'échantillon à observer\"\"\"\n",
    "X=np.random.normal(0,1,size=1000)\n",
    "plt.hist(X,bins=15,color='blue',density=True,edgecolor=\"k\");"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Explication des options de plt.hist :\n",
    "\n",
    "* bins=10 : on découpe l'intervalle [min(X),max(X)] en dix sous-intervalles.\n",
    "* normed=True: la hauteur des batons est normalisée pour que cela ressemble à une densité\n",
    "* rwidth=0.9: la largeur de chaque baton occupe 90% de chaque sous-intervalle.\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Mais parfois il est préférable de préciser nous même les sous-intervalles (=la base des batons)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEjFJREFUeJzt3X+MXWd95/H3Zx0cVtB202Z2i2xPbFp3VQPdRJ2aVrS0hSSYEtnsiqjOilXQRrLYjSVWtCpBoKC6QmpAavePdUWsxSrqj3VTWLqj1KybbdLtom7AE2KS2sFl4pJ4RqCkcdpsBU3i5Lt/zEl1GY19z9h3fGf8vF/S1ZzznOc593ut0eeeec4Pp6qQJLXhn4y7AEnSpWPoS1JDDH1JaoihL0kNMfQlqSGGviQ1pFfoJ9mR5GSS2SR3LLH9/UkeTXIsyReTbOvaNyf5Ttd+LMmnRv0BJEn9Zdh1+knWAX8F3ADMAUeBW6rqxECf762q57rlncB/rKodSTYD91bVG1emfEnScvQ50t8OzFbVqap6ATgE7Brs8Ergd14DeMeXJK1CV/ToswE4PbA+B7x5cacktwMfBNYDbxvYtCXJw8BzwEer6v+c782uvvrq2rx5c4+yJEmveOihh/6mqiaG9esT+r1U1X5gf5J/C3wUuBX4JjBZVc8k+XHgj5K8YdFfBiTZA+wBmJycZGZmZlRlSVITkjzRp1+f6Z15YNPA+sau7VwOAe8GqKrnq+qZbvkh4HHgRxYPqKoDVTVVVVMTE0O/qCRJF6hP6B8FtibZkmQ9sBuYHuyQZOvA6ruAr3ftE92JYJK8HtgKnBpF4ZKk5Rs6vVNVZ5PsBY4A64CDVXU8yT5gpqqmgb1Jrgd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zSfKvk8wBPwX8cZIj465pUHdS/JXHcDwG3FNVx8db1bkl+W/A/wX+ZZK5JLeNu6bzeAvw74C3db+rx7oj09XqdcADSR5h4WDgvqpa9ZdCrhH/Avhikq+y8HyyP66q/7kSb+QduZLUkMvxSF+SdA6GviQ1xNCXpIYY+pLUEENfkhpi6EtSQwx9SWqIoS9JDfn/IL1K6nbbQxcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "X=np.random.normal(0,1,size=1000)\n",
    "plt.hist(X, bins=[-2,0.5,1,5],  density=True,edgecolor=\"k\"); #un choix particulièrement idiot de bins"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Histogramme de loi discrète"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Attention, pour les lois discrètes il faut obligatoirement préciser le découpage.\n",
    "Pour voir une catastrophe, remplacez  bins par 11 dans plt.hist(). Expliquez le phénomène."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAEgxJREFUeJzt3X+MnVd95/H3p3FSICCcH1PLtU2dCotuVInEtbKmdFEXLxVJKxxVbRS023gjr9w/shUslVq3/1SV9g+oVqWNtIpkYbrOLoS6gSgWiihek261fyTt5AchiWEzpHFtrx1PIQmFqEtDv/vHPS43wWbu9dxnBo7fL+nqnuc8597veZKZzzxz5nmuU1VIkvr1I6s9AUnSsAx6SeqcQS9JnTPoJalzBr0kdc6gl6TOGfSS1DmDXpI6Z9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4HLk/y7IWtW1VHgI8Dngc8BjwPfGbLmeeZRDPyb7/n0HPQTfRRDD5JcyijkP1FVn1nJ2m1p4UHgvQOWeSfwviTPMVqCe3eS/zFgPeCfzz6pqjPAfYyWA4d0Ajgx9tvRvYyCfyXcCDxaVc8PXOffAH9TVYtV9Y/AZ4CfHbgmVbW/qn6mqt4FvMDob1kr4fkk6wHa85kVqvsqPQf9RfFRDEnCaE33aFX94QrVnEuytrVfD7wH+PJQ9arqd6pqY1VtZvT/8QtVNehZYJLLk7zpbBv4BUZLAIOpqtPA8SRva107gKeHrDnm/Qy8bNP8LbA9yRva1+4ORn9XGlSSH2vPb2G0Pv/JoWs2h4Bdrb0LuH+F6r7Kqn165dBqlT6KIck9wM8DVyc5AfxeVe0fsOQ7gV8DvtTWzAF+t0Z3Jw9lPXCg/SMzPwIcrKoVueRxBa0D7htlEWuAT1bV51ag7m8An2gnJ88Ctw9dsP0gew/w60PXqqqHk9wLPAq8AjzGytw9+ukkVwH/CNwxxB+5z/W9D3wYOJhkN3AMuGXWdSeaW7vsR5LUqZ6XbiRJGPSS1D2DXpI6Z9BLUucMeknqnEEvSZ0z6CWpcwa9JHXu/wOpsrqToEoAswAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "n=10\n",
    "X=np.random.binomial(n,0.5,size=3000)\n",
    "\n",
    "\"\"\"attention np.arange(0,n+2,1) donne l'intervalle discret [0,n+2[= [0,n+1].\n",
    " on lui soustrait ensuite 0.5 pour avoir chaque entier de [0,n] dans un sous-intervalle\"\"\"\n",
    "bins=np.arange(0,n+2,1)-0.5\n",
    "\n",
    "\"\"\" rwidth=0.6 (=ratio_width) signifie que la base des batons occupe 60% des sous-intervalles.  \"\"\"\n",
    "plt.hist(X,bins=bins, histtype='bar', color='blue', rwidth=0.6) \n",
    "\"\"\"on précise les graduations en x\"\"\"\n",
    "plt.xticks(np.arange(0,n+1,1));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plusieurs histogrammes\n",
    "comparons des lois béta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "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5Dpm1p7EdHFHQXqXH+mMGTO7APhn4FJ331ugvuVTqnF3BX4IvG5mm0iskVbH/ERwOr/rBqDa3fe5+8fA/5AIhDhLZ9zXAU8CuPtbQCcS++WUsrT+77dWnAMgnW0lqoFJ0XEl8KpHZ1RiKuWYzexM4N9JvPiXwpowpBi3u+9y9x7uXu7u5STOfVzq7rXF6W5OpPPv+79IvPvHzHqQWBL6qJCdzIN0xv0pMArAzE4jEQDbCtrLwqsGJkZXAw0Hdrn7lmwbje0SkLewrYSZ/Rqodfdq4DES08N6EidYJhSvx9lLc8z/BnQB/iM63/2pu19atE7nQJrjLilpjvkl4EIzex/4BrjT3eM8w0133L8Afm9mt5M4IfyzmL+xw8z+RCLMe0TnNqYDHQDc/RES5zrGAPXAbuDanDxvzH9uIiKSoTgvAYmISBYUACIigVIAiIgESgEgIhIoBYCISKAUACIigVIAiIgESgEgIhKo/wegVWR2L4dDKgAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "nbData=10000\n",
    "X1=np.random.beta(3,1,size=nbData)\n",
    "X2=np.random.beta(2,3,size=nbData)\n",
    "X3=np.random.beta(1,0.5,size=nbData)\n",
    "\n",
    "plt.hist([X1,X2,X3],bins=20,label=[\"a=3,b=1\",\"a=2,b=3\",\"a=1,b=0.5\"]);\n",
    "plt.legend();"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "La variété des formes possible d'une loi la rend très pratique en modélisation. \n",
    "\n",
    "Choisissez des lois bêta bien choisies (dilatée par une constante), pour modéliser les variables X suivantes:\n",
vincentvigon's avatar
vincentvigon committed
257
    "\n",
vincentvigon's avatar
vincentvigon committed
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
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
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
    " * X : quantité chocolat consommée par les français  (sachant que plus on en mange, et plus on a envie d'en manger)\n",
    " * X : durée de vie des français \n",
    " * X : durée de vie des grenouilles (forte mortalité infantile)\n",
    " \n",
    "Dressez les histogrammes\n",
    "\n",
    "Connaissez-vous d'autre loi pour des durées de vie ?"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Superposons histogramme et densité "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### une loi normale"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAIABJREFUeJzt3Xd8VFX6x/HPMzNJaIqFgEhoIhaQpgE7ICJNFrCggAUry+8nuqvr2tafrnUtu67uiqusZVVEpFhQUQRpFhCCIEiVokIAjSJNIMnceX5/zOCOEcwkmcmZ8rxfr3k59869k+9g8uTknHvPEVXFGGNMZvC5DmCMMab6WNE3xpgMYkXfGGMyiBV9Y4zJIFb0jTEmg1jRN8aYDGJF3xhjMogVfWOMySBW9I0xJoMEXAcoq169etqsWTPXMYw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JuELAZKixmTy1TsTCc/oGQK+Aoarakq04CLTXeQQntQOwjOZpsSVRwAicg7wTyAX2AosUtWeblPtn4j0AR7lv9OQJOMd5vskIi8DXQnP9vgNcKeqPuM0VIxE5DTgA2AJ4Z9TgNsiMwQkNRFpCzxP+HvGB4xT1bvdpgrL2KJvjDGZKGO7d4wxJhNZ0TfGmAxiRd8YYzKIFX1jjMkgVvSNMSaDWNE3xpgMYkXfGGMyiBV9Y4zJIP8Puj0If8fNS+oAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "nbSimu=1000\n",
    "Simu=np.random.normal(size=nbSimu)\n",
    "\n",
    "\"\"\"formule à emmener partout avec soi\"\"\"\n",
    "def gaussian_density(x):\n",
    "    return 1/(np.sqrt(2*np.pi))*np.exp(-0.5*x**2)\n",
    "\n",
    "plt.hist(Simu,bins=30,density=True,edgecolor=\"k\");\n",
    "\n",
    "x=np.linspace(-3,3,200)\n",
    "plt.plot(x, gaussian_density(x));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Tronquer un histogramme\n",
    "\n",
    "Parfois on a envit de ne montrer qu'une partie de l'histogramme. plt.hist dispose d'une option range qui ignore les valeurs de l'échantillon en dehors du range. Mais malheureusement, plt.hist utlise la normalisation 'naturelle' qui n'est pas compatible avec la superposition avec la densité théorique.  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAHFBJREFUeJzt3XucVHX9x/HXZ2ZnlsuKomyK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oK+Z9TazODAcqGsxpg44J/t8GDBX59tFRILT6pF79hz6KGAOzZdC3u3uC81sElDv7nXAz4F7zawBeJfmXwAiIhKQvK5zd/fZwOwW6ybkPN8MfL2w0XZot0/tlCC95/Kg91weiv6eW/1AVURESo++Zk9EJIRKrtzNbJCZLTGzBjMbG3SeYjOzu81sZfZy07JgZj3M7DEzW2RmC83s0qAzFZuZtTOzF8zs5ex7vjroTHuCmUXN7CUzezjoLHuCmb1pZq+a2QIzqy/qvkrptEx2KoTXyZkKARjRYiqEUDGzzwMbgF+5+yFB59kTzKwr0NXdXzSzvYD5wGkh/+9sQEd332BmMeBp4FJ3fy7gaEVlZpcBtUAndw/9XAlm9iZQ2/IeoGIotSP3rVMhuHsC2DIVQmi5+5M0X4FUNtz9bXd/Mfv8fWAxzXdBh5Y325BdjGUfpXPktQvMrDtwMnBX0FnCqNTKfVtTIYT6L325M7NeQH/g+WCTFF/2FMUCYCXwF3cP+3ueAlwB7MTXo5Q8B/5sZvOzd+wXTamVu5QRM6sCHgK+5+7rg85TbO6edvfDab4LfICZhfY0nJmdAqx09/lBZ9nDjnX3I4DBwEXZ065FUWrlns9UCBIC2fPODwH3u/tvg86zJ7n7e8BjwKCgsxTRMcCQ7DnoGcAXzey+YCMVn7uvyP5cCfyO5lPNRVFq5Z7PVAhS4rIfLv4cWOzuNwWdZ08ws2oz2yf7vD3NFw28Fmyq4nH3ce7e3d170fz3eK67nxlwrKIys47ZCwQws47ACUDRroIrqXJ39xSwZSqExcBMd18YbKriMrNfA88CHzezRjM7P+hMe8AxwFk0H80tyD5OCjpUkXUFHjOzV2g+iPmLu5fF5YFlZH/gaTN7GXgBeMTd/1SsnZXUpZAiIpKfkjpyFxGR/KjcRURCSOUuIhJCKncRkRBSuYuIhJDKXUQkhFTuIiIhpHIXEQmh/wMJ6Z4EM3F69AAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "X=np.random.normal(0,1,size=1000)\n",
    "plt.hist(X,bins=15,range=[0,5],density=True,edgecolor=\"k\");\n",
    "x=np.linspace(0,5,200)\n",
    "plt.plot(x, gaussian_density(x));\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Il faut donc faire la normalisation à la main, en précisant le poids de chaque observation."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAAHABJREFUeJzt3Xl4VPXd/vH3ZyYJO6gQaiRArOCCtS6kLrW1yyMKgti6FXerFjeqrcsD1pZWWmtRq32s9ifYasVWEbc2Copri9YNUFARsYggURRc2ISQ7fP74wxeEQMZwky+M2fu13Wdi5wzX2fuuby4czjL95i7IyIi8ZIIHUBERDJP5S4iEkMqdxGRGFK5i4jEkMpdRCSGVO4iIjGkchcRiSGVu4hIDKncRURiqCjUB/fo0cMrKipCfbyISF6aPXv2h+5e2tK4YOVeUVHBrFmzQn28iEheMrMl6YzTYRkRkRhSuYuIxFBa5W5mg81sgZktNLMxzbx+upmtMLM5qeWszEcVEZF0tXjM3cySwE3AIKAamGlmVe7++iZD73b3UVnIKCIiWymdPff9gYXuvsjda4HJwFHZjSUiItsinXLvBSxtsl6d2rapY8zsFTO718x6N/dGZjbSzGaZ2awVK1a0Iq6IiKQjUydUHwQq3P2rwGPA7c0NcveJ7l7p7pWlpS1epikiIq2UTrm/CzTdEy9PbfuMu3/k7htSq38GBmYmnoiItEY65T4T6G9mO5tZCTACqGo6wMzKmqwOB+ZnLqKIiGytFsvd3euBUcB0otKe4u7zzGycmQ1PDbvA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wMPEB1qzop8K/d0pkKQPJc6ufgXYL67Xxc6T1sws1Iz2y71cweiiwbeCJsqe9z9Mncvd/cKor/HT7r7yYFjZZWZdUpdIICZdQIOA7J2FVxelbu71wMbp0KYD0xx93lhU2WXmd0FPAfsZmbVZnZm6Ext4GDgFKK9uTmp5YjQobKsDHjKzF4h2ol5zN0L4vLAAvIl4Bkzmwu8CEx190ey9WF5dSmkiIikJ6/23EVEJD0qdxGRGFK5i4jEkMpdRCSGVO4iIjGkchcRiSGVu4hIDKncRURi6P8Dk93/bsihz2oAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "X=np.random.normal(0,1,size=1000)\n",
    "\n",
    "nb_batons=30\n",
    "gauche=0\n",
    "droite=5\n",
    "bins=np.linspace(gauche,droite,nb_batons)\n",
    "step=(droite-gauche)/nb_batons\n",
    "weights=np.ones_like(X)/step/len(X)\n",
    "\n",
    "plt.hist(X,bins=bins,weights=weights,range=[gauche,droite],edgecolor=\"k\")\n",
    "x=np.linspace(gauche,droite,200)\n",
    "plt.plot(x, gaussian_density(x));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "***Exo:*** améliorer l'histogramme ci-dessous en tronquant les grandes valeurs de l'échantillon de lois de Cauchy. \n",
    "\n",
    "Plutôt que de recopier le code précédent, créez une petite fonction qui trace un histogramme tronqué. Elle pourrait par exemple avoir comme signature : `hist_tronc( ech,gauche,droite,nb_batons )`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD8CAYAAACb4nSYAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdG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CzpP8E3E/yw6zt+Y5cM7MO0mntHTOzjubQNzPrIA59M7MO4tA3M+sgDn0zsw7i0Dcz6yAOfTOzDuLQNzPrIP8fIT1dpaSKf/MAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "\n",
    "def cauchy_density(x):\n",
    "    return 1/np.pi/(1+x**2)\n",
    "\n",
    "\n",
    "X=np.random.standard_cauchy(size=200)\n",
    "plt.hist(X,bins=15,density=True,edgecolor=\"k\");\n",
    "x=np.linspace(-10,10,200)\n",
    "plt.plot(x, cauchy_density(x));"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "###  Une loi log-normale\n",
    " \n",
    "***Exo:*** Que représente une distribution log-normale ?\n",
    "\n",
    "Réponse : c'est la distribution de $f(X)$ avec $f$ ... et $X$ ...\n",
    "\n",
    "Vérifiez votre réponse en superposant histogramme de $f(X)$  à l'histogramme proposé ci-dessous. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD8CAYAAACMwORRAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvhp/UCwAADldJREFUeJzt3X+s3Xddx/Hni9tVZBD8sRusvf0VbTAN/gCuAyVBAjPpwtJiGLolEGZGqgmVKSSuqJmm/sOATElsDM2YggJ1ThKvszrNwBj/gPTuR4CuNlzrut66uQ4QjAbajrd/3DNydr3t/d57z7mn93Ofj+Sm5/u933vP+2Td83z3Pd/vd6kqJEltecGoB5AkDZ5xl6QGGXdJapBxl6QGGXdJapBxl6QGGXdJapBxl6QGGXdJatCGUT3xNddcU9u3bx/V00vSmv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M1JchVzYf9kVX1m1PMM2euAPUkeZ+6w2xuT/PloRxq6WWC2qp77L7L7mIt9y64D/r2qzlXVBeAzwM+OeKbV8p9JNgH0/nx6GE+y1uLe5VYITcncrec+BpyoqrtGPc+wVdX7q2qiqrYz98/3s1XV9B5dVT0FnEny8t6qN/H8W2q36AngtUle1Ps7/iYa/xC5T//tWt4J/PUwnmRN/W/2LnUrhBGPNWyvA94BfCnJo711v9W7aljt+DXgk72dllPAL494nqGqqi8kuQ94mLkzwh6hwStVk3waeANwTZJZ4HeBDwD3JrkVOA384lCe2ytUJak9a+2wjCSpA+MuSQ0y7pLUIOMuSQ0y7pLUIOMuSQ0y7pLUIOMuSQ36P0Ybl0M7bKFcAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "size=1000\n",
    "X=np.random.lognormal(size=size)\n",
    "bins=np.linspace(0,10,20)\n",
    "plt.hist(X, bins=bins, density=True,edgecolor=\"k\");"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
vincentvigon's avatar
vincentvigon committed
458
    "***Exo suite:*** \n",
vincentvigon's avatar
vincentvigon committed
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
    "Réponse de la première partie : la loi log-normale c'est la loi de $exp(X)$ avec $X \\sim Normale(0,1)$. \n",
    "\n",
    "A partir de cette description, vous devez pouvoir intuitivement comprendre que la densité de la log-normale en 0 vaut ... \n",
    "Ce fait est très mal illustrer par l'histrogramme ci-dessus. Modifiez-le ! \n",
    "\n",
    "\n",
    "#### Complétez le calcul de la densité de la log-normale :\n",
    "\n",
    "Considérons $\\phi$ une fonction teste et $X$ une v.a de loi normale.\n",
    "$$\n",
    "     \\mathbf   E [\\phi( \\exp(X) )] =  cst  \\int \\ \\phi( e^x ) \\  e^{- \\frac 1 2 x^2 }\\ dx \n",
    "$$\n",
    "on fait le changement de variable $e^x \\to  y$ on trouve ...\n",
    "   \n",
    "donc la densité de $\\exp(X)$ est ...\n",
    "\n",
    "Superposez cette densité avec l'histogramme précédent pour valider votre calcul.\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Une loi binomiale\n",
    "\n",
    "Quelle est le lien entre loi binomiale et loi de bernouilli ?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "X: [6 6 5 6 4 6 4 5 3 4 3 3 5 6 5 6 3 4 7 6 7 7 5 5 6 3 5 4 4 5 7 8 7 2 7 6 6 5 6 6 5 2 4 6 4 3 3 5 4 5 3 3 4 5 3 5 3 4 4 5 6 5 6 6 6 7 4 6 5 8 5 5 5 4 4 5 6 7 7 6 4 4 3 7 2 6 8 4 4 5 6 6 1 4 6 4 3 5 8 4]\n"
     ]
    }
   ],
   "source": [
    "\"\"\" échantillon d'une binomiale \"\"\"\n",
    "X=np.random.binomial(n=10,p=0.5,size=100)\n",
    "np.set_printoptions(linewidth=2000)\n",
    "print(\"X:\",X)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Dressez l'histogramme de ces simulations. Superposez cet histogramme avec la densité discrète de la loi binomiale. \n",
    "\n",
    "On calculera cette densité point par point (sans chercher de package particulier). Vous aurez seulement besoin de la fonction factorielle.\n",
    "\n",
    "Remarque : Il est plus élégant de ne pas relier les points d'une densité discrète. \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "10!: 3628800\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "print(\"10!:\",math.factorial(10))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "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.5"
  }
 },
 "nbformat": 4,
vincentvigon's avatar
vincentvigon committed
573
 "nbformat_minor": 2
vincentvigon's avatar
vincentvigon committed
574
}