Skip to content

Instantly share code, notes, and snippets.

@aarchiba
Last active December 12, 2015 00:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aarchiba/4686833 to your computer and use it in GitHub Desktop.
Save aarchiba/4686833 to your computer and use it in GitHub Desktop.
Estimating Poisson uncertainties when the events are weighted
{
"metadata": {
"name": "poissonplus"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": "Weighted Poisson Uncertainties\n=============================="
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Poisson distributions turn up a lot in high-energy astronomy. If you take the photons from a source and sort them into phase bins, the number in each phase bin will be Poisson distributed, with an expected value corresponding to the source's emission. This is something we often do, for example to look for evidence that the source's emission varies: in addition to various statistical tests, we plot a histogram of photon arrival phases. Part of plotting such a histogram is plotting error bars on each bin, to give the reader an indication of the likelihood that such variations are real. "
},
{
"cell_type": "markdown",
"metadata": {},
"source": "The error bars on each bin are supposed to indicate the uncertainty on the value in that bin. Now, a Poisson random variable with expected value $\\lambda$ has standard deviation $\\sqrt{\\lambda}$, but of course we don't actually know $\\lambda$. We can estimate $\\lambda$ as the number $n$ of observed photons (in fact this is an unbiased estimate and about as good as we can hope for from a single measurement). It turns out that if $n$ is decently large, $\\sqrt{n}$ is a decent estimate for $\\sqrt{\\lambda}$. It's not unbiased, and it's definitely wrong if $n$ is small, but in that case the distribution isn't much like a normal distribution anyway, and so you enter realms of messy statistics. For histograms we try to keep the number $n$ in each bin pretty high anyway. So $\\sqrt{n}$ is a decent value for the error bar in each bin."
},
{
"cell_type": "code",
"collapsed": false,
"input": "import scipy.stats\n\nfrom IPython.zmq.pylab import backend_inline\ncfg = backend_inline.InlineBackendConfig.instance()\ncfg.figure_format = 'svg' # 'png' to switch back",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 203
},
{
"cell_type": "code",
"collapsed": false,
"input": "phases = (np.random.vonmises(np.pi, 1, size=1000)/(2*np.pi)) % 1",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 204
},
{
"cell_type": "code",
"collapsed": false,
"input": "ns, bin_edges = np.histogram(phases, range=(0,1), bins=10)\nplt.plot(bin_edges, np.concatenate((ns,[ns[0]])), drawstyle='steps-post')\nplt.errorbar((bin_edges[:-1]+bin_edges[1:])/2., ns, np.sqrt(ns), linestyle=\"none\")",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 215,
"text": "<Container object of 3 artists>"
},
{
"output_type": "display_data",
"svg": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->\n<svg height=\"252pt\" version=\"1.1\" viewBox=\"0 0 377 252\" width=\"377pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <style type=\"text/css\">\n*{stroke-linecap:square;stroke-linejoin:round;}\n </style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"\nM0 252.946\nL377.961 252.946\nL377.961 0\nL0 0\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"\nM28.8906 234.182\nL363.691 234.182\nL363.691 10.982\nL28.8906 10.982\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"LineCollection_1\">\n <defs>\n <path d=\"\nM45.6306 -42.2832\nL45.6306 -52.3841\" id=\"C0_0_d5af59d9d2\"/>\n <path d=\"\nM79.1106 -54.6049\nL79.1106 -66.8464\" id=\"C0_1_dc65da1547\"/>\n <path d=\"\nM112.591 -79.6754\nL112.591 -95.344\" id=\"C0_2_5f36a75cc9\"/>\n <path d=\"\nM146.071 -126.356\nL146.071 -146.871\" id=\"C0_3_f5533b7c3e\"/>\n <path d=\"\nM179.551 -176.95\nL179.551 -201.628\" id=\"C0_4_d71791d9eb\"/>\n <path d=\"\nM213.031 -186.421\nL213.031 -211.799\" id=\"C0_5_29dbcc9a56\"/>\n <path d=\"\nM246.511 -152.892\nL246.511 -175.689\" id=\"C0_6_16878af980\"/>\n <path d=\"\nM279.991 -83.0457\nL279.991 -99.1161\" id=\"C0_7_24bfbca7b4\"/>\n <path d=\"\nM313.471 -52.951\nL313.471 -64.9291\" id=\"C0_8_236487d1a1\"/>\n <path d=\"\nM346.951 -40.658\nL346.951 -50.4381\" id=\"C0_9_7b9c58263c\"/>\n </defs>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_0_d5af59d9d2\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_1_dc65da1547\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_2_5f36a75cc9\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_3_f5533b7c3e\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_4_d71791d9eb\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_5_29dbcc9a56\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_6_16878af980\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_7_24bfbca7b4\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_8_236487d1a1\" y=\"252.94609375\"/>\n </g>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:none;stroke:#008000;stroke-linecap:butt;\" x=\"0\" xlink:href=\"#C0_9_7b9c58263c\" y=\"252.94609375\"/>\n </g>\n </g>\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p349b51bf5c)\" d=\"\nM28.8906 205.612\nL62.3706 205.612\nL62.3706 192.22\nL95.8506 192.22\nL95.8506 165.436\nL129.331 165.436\nL129.331 116.332\nL162.811 116.332\nL162.811 63.6572\nL196.291 63.6572\nL196.291 53.8364\nL229.771 53.8364\nL229.771 88.6556\nL263.251 88.6556\nL263.251 161.865\nL296.731 161.865\nL296.731 194.006\nL330.211 194.006\nL330.211 207.398\nL363.691 207.398\nL363.691 205.612\" style=\"fill:none;stroke:#0000ff;\"/>\n </g>\n <g id=\"line2d_2\">\n <defs>\n <path d=\"\nM3 1.83697e-16\nL-3 -1.83697e-16\" id=\"m63ac373c74\" style=\"stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"45.630625\" xlink:href=\"#m63ac373c74\" y=\"210.662870724\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"79.110625\" xlink:href=\"#m63ac373c74\" y=\"198.341159677\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"112.590625\" xlink:href=\"#m63ac373c74\" y=\"173.270719455\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"146.070625\" xlink:href=\"#m63ac373c74\" y=\"126.589922312\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"179.550625\" xlink:href=\"#m63ac373c74\" y=\"75.9959727353\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"213.030625\" xlink:href=\"#m63ac373c74\" y=\"66.5255033863\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"246.510625\" xlink:href=\"#m63ac373c74\" y=\"100.054138605\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"279.990625\" xlink:href=\"#m63ac373c74\" y=\"169.90043125\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"313.470625\" xlink:href=\"#m63ac373c74\" y=\"199.995115721\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"346.950625\" xlink:href=\"#m63ac373c74\" y=\"212.288098243\"/>\n </g>\n </g>\n <g id=\"line2d_3\">\n <g clip-path=\"url(#p349b51bf5c)\">\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"45.630625\" xlink:href=\"#m63ac373c74\" y=\"200.561991776\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"79.110625\" xlink:href=\"#m63ac373c74\" y=\"186.099702823\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"112.590625\" xlink:href=\"#m63ac373c74\" y=\"157.602143045\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"146.070625\" xlink:href=\"#m63ac373c74\" y=\"106.074940188\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"179.550625\" xlink:href=\"#m63ac373c74\" y=\"51.3184897647\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"213.030625\" xlink:href=\"#m63ac373c74\" y=\"41.1473591137\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"246.510625\" xlink:href=\"#m63ac373c74\" y=\"77.2571238951\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"279.990625\" xlink:href=\"#m63ac373c74\" y=\"153.83003125\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"313.470625\" xlink:href=\"#m63ac373c74\" y=\"188.016946779\"/>\n <use style=\"fill:#008000;stroke:#008000;stroke-linecap:butt;stroke-width:0.5;\" x=\"346.950625\" xlink:href=\"#m63ac373c74\" y=\"202.507964257\"/>\n </g>\n </g>\n <g id=\"line2d_4\"/>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_5\">\n <defs>\n <path d=\"\nM0 0\nL0 -4\" id=\"m0012dd4eef\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_6\">\n <defs>\n <path d=\"\nM0 0\nL0 4\" id=\"m476344969c\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0.0 -->\n <defs>\n <path d=\"\nM31.7812 66.4062\nQ24.1719 66.4062 20.3281 58.9062\nQ16.5 51.4219 16.5 36.375\nQ16.5 21.3906 20.3281 13.8906\nQ24.1719 6.39062 31.7812 6.39062\nQ39.4531 6.39062 43.2812 13.8906\nQ47.125 21.3906 47.125 36.375\nQ47.125 51.4219 43.2812 58.9062\nQ39.4531 66.4062 31.7812 66.4062\nM31.7812 74.2188\nQ44.0469 74.2188 50.5156 64.5156\nQ56.9844 54.8281 56.9844 36.375\nQ56.9844 17.9688 50.5156 8.26562\nQ44.0469 -1.42188 31.7812 -1.42188\nQ19.5312 -1.42188 13.0625 8.26562\nQ6.59375 17.9688 6.59375 36.375\nQ6.59375 54.8281 13.0625 64.5156\nQ19.5312 74.2188 31.7812 74.2188\" id=\"BitstreamVeraSans-Roman-30\"/>\n <path d=\"\nM10.6875 12.4062\nL21 12.4062\nL21 0\nL10.6875 0\nz\n\" id=\"BitstreamVeraSans-Roman-2e\"/>\n </defs>\n <g transform=\"translate(21.60078125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_7\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"95.850625\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_8\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"95.850625\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 0.2 -->\n <defs>\n <path d=\"\nM19.1875 8.29688\nL53.6094 8.29688\nL53.6094 0\nL7.32812 0\nL7.32812 8.29688\nQ12.9375 14.1094 22.625 23.8906\nQ32.3281 33.6875 34.8125 36.5312\nQ39.5469 41.8438 41.4219 45.5312\nQ43.3125 49.2188 43.3125 52.7812\nQ43.3125 58.5938 39.2344 62.25\nQ35.1562 65.9219 28.6094 65.9219\nQ23.9688 65.9219 18.8125 64.3125\nQ13.6719 62.7031 7.8125 59.4219\nL7.8125 69.3906\nQ13.7656 71.7812 18.9375 73\nQ24.125 74.2188 28.4219 74.2188\nQ39.75 74.2188 46.4844 68.5469\nQ53.2188 62.8906 53.2188 53.4219\nQ53.2188 48.9219 51.5312 44.8906\nQ49.8594 40.875 45.4062 35.4062\nQ44.1875 33.9844 37.6406 27.2188\nQ31.1094 20.4531 19.1875 8.29688\" id=\"BitstreamVeraSans-Roman-32\"/>\n </defs>\n <g transform=\"translate(88.72953125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_9\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"162.810625\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_10\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"162.810625\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_3\">\n <!-- 0.4 -->\n <defs>\n <path d=\"\nM37.7969 64.3125\nL12.8906 25.3906\nL37.7969 25.3906\nz\n\nM35.2031 72.9062\nL47.6094 72.9062\nL47.6094 25.3906\nL58.0156 25.3906\nL58.0156 17.1875\nL47.6094 17.1875\nL47.6094 0\nL37.7969 0\nL37.7969 17.1875\nL4.89062 17.1875\nL4.89062 26.7031\nz\n\" id=\"BitstreamVeraSans-Roman-34\"/>\n </defs>\n <g transform=\"translate(155.46921875 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_4\">\n <g id=\"line2d_11\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"229.770625\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_12\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"229.770625\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_4\">\n <!-- 0.6 -->\n <defs>\n <path d=\"\nM33.0156 40.375\nQ26.375 40.375 22.4844 35.8281\nQ18.6094 31.2969 18.6094 23.3906\nQ18.6094 15.5312 22.4844 10.9531\nQ26.375 6.39062 33.0156 6.39062\nQ39.6562 6.39062 43.5312 10.9531\nQ47.4062 15.5312 47.4062 23.3906\nQ47.4062 31.2969 43.5312 35.8281\nQ39.6562 40.375 33.0156 40.375\nM52.5938 71.2969\nL52.5938 62.3125\nQ48.875 64.0625 45.0938 64.9844\nQ41.3125 65.9219 37.5938 65.9219\nQ27.8281 65.9219 22.6719 59.3281\nQ17.5312 52.7344 16.7969 39.4062\nQ19.6719 43.6562 24.0156 45.9219\nQ28.375 48.1875 33.5938 48.1875\nQ44.5781 48.1875 50.9531 41.5156\nQ57.3281 34.8594 57.3281 23.3906\nQ57.3281 12.1562 50.6875 5.35938\nQ44.0469 -1.42188 33.0156 -1.42188\nQ20.3594 -1.42188 13.6719 8.26562\nQ6.98438 17.9688 6.98438 36.375\nQ6.98438 53.6562 15.1875 63.9375\nQ23.3906 74.2188 37.2031 74.2188\nQ40.9219 74.2188 44.7031 73.4844\nQ48.4844 72.75 52.5938 71.2969\" id=\"BitstreamVeraSans-Roman-36\"/>\n </defs>\n <g transform=\"translate(222.46359375 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-36\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_5\">\n <g id=\"line2d_13\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"296.730625\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_14\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"296.730625\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_5\">\n <!-- 0.8 -->\n <defs>\n <path d=\"\nM31.7812 34.625\nQ24.75 34.625 20.7188 30.8594\nQ16.7031 27.0938 16.7031 20.5156\nQ16.7031 13.9219 20.7188 10.1562\nQ24.75 6.39062 31.7812 6.39062\nQ38.8125 6.39062 42.8594 10.1719\nQ46.9219 13.9688 46.9219 20.5156\nQ46.9219 27.0938 42.8906 30.8594\nQ38.875 34.625 31.7812 34.625\nM21.9219 38.8125\nQ15.5781 40.375 12.0312 44.7188\nQ8.5 49.0781 8.5 55.3281\nQ8.5 64.0625 14.7188 69.1406\nQ20.9531 74.2188 31.7812 74.2188\nQ42.6719 74.2188 48.875 69.1406\nQ55.0781 64.0625 55.0781 55.3281\nQ55.0781 49.0781 51.5312 44.7188\nQ48 40.375 41.7031 38.8125\nQ48.8281 37.1562 52.7969 32.3125\nQ56.7812 27.4844 56.7812 20.5156\nQ56.7812 9.90625 50.3125 4.23438\nQ43.8438 -1.42188 31.7812 -1.42188\nQ19.7344 -1.42188 13.25 4.23438\nQ6.78125 9.90625 6.78125 20.5156\nQ6.78125 27.4844 10.7812 32.3125\nQ14.7969 37.1562 21.9219 38.8125\nM18.3125 54.3906\nQ18.3125 48.7344 21.8438 45.5625\nQ25.3906 42.3906 31.7812 42.3906\nQ38.1406 42.3906 41.7188 45.5625\nQ45.3125 48.7344 45.3125 54.3906\nQ45.3125 60.0625 41.7188 63.2344\nQ38.1406 66.4062 31.7812 66.4062\nQ25.3906 66.4062 21.8438 63.2344\nQ18.3125 60.0625 18.3125 54.3906\" id=\"BitstreamVeraSans-Roman-38\"/>\n </defs>\n <g transform=\"translate(289.4509375 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-38\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_6\">\n <g id=\"line2d_15\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_16\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_6\">\n <!-- 1.0 -->\n <defs>\n <path d=\"\nM12.4062 8.29688\nL28.5156 8.29688\nL28.5156 63.9219\nL10.9844 60.4062\nL10.9844 69.3906\nL28.4219 72.9062\nL38.2812 72.9062\nL38.2812 8.29688\nL54.3906 8.29688\nL54.3906 0\nL12.4062 0\nz\n\" id=\"BitstreamVeraSans-Roman-31\"/>\n </defs>\n <g transform=\"translate(356.6203125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"matplotlib.axis_2\">\n <g id=\"ytick_1\">\n <g id=\"line2d_17\">\n <defs>\n <path d=\"\nM0 0\nL4 0\" id=\"me8a85f7bf6\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#me8a85f7bf6\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_18\">\n <defs>\n <path d=\"\nM0 0\nL-4 0\" id=\"m1a32005dea\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m1a32005dea\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"text_7\">\n <!-- 0 -->\n <g transform=\"translate(19.8515625 237.821875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_2\">\n <g id=\"line2d_19\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#me8a85f7bf6\" y=\"189.54203125\"/>\n </g>\n </g>\n <g id=\"line2d_20\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m1a32005dea\" y=\"189.54203125\"/>\n </g>\n </g>\n <g id=\"text_8\">\n <!-- 50 -->\n <defs>\n <path d=\"\nM10.7969 72.9062\nL49.5156 72.9062\nL49.5156 64.5938\nL19.8281 64.5938\nL19.8281 46.7344\nQ21.9688 47.4688 24.1094 47.8281\nQ26.2656 48.1875 28.4219 48.1875\nQ40.625 48.1875 47.75 41.5\nQ54.8906 34.8125 54.8906 23.3906\nQ54.8906 11.625 47.5625 5.09375\nQ40.2344 -1.42188 26.9062 -1.42188\nQ22.3125 -1.42188 17.5469 -0.640625\nQ12.7969 0.140625 7.71875 1.70312\nL7.71875 11.625\nQ12.1094 9.23438 16.7969 8.0625\nQ21.4844 6.89062 26.7031 6.89062\nQ35.1562 6.89062 40.0781 11.3281\nQ45.0156 15.7656 45.0156 23.3906\nQ45.0156 31 40.0781 35.4375\nQ35.1562 39.8906 26.7031 39.8906\nQ22.75 39.8906 18.8125 39.0156\nQ14.8906 38.1406 10.7969 36.2812\nz\n\" id=\"BitstreamVeraSans-Roman-35\"/>\n </defs>\n <g transform=\"translate(13.6015625 193.181875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_3\">\n <g id=\"line2d_21\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#me8a85f7bf6\" y=\"144.90203125\"/>\n </g>\n </g>\n <g id=\"line2d_22\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m1a32005dea\" y=\"144.90203125\"/>\n </g>\n </g>\n <g id=\"text_9\">\n <!-- 100 -->\n <g transform=\"translate(7.565625 148.541875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"127.24609375\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_4\">\n <g id=\"line2d_23\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#me8a85f7bf6\" y=\"100.26203125\"/>\n </g>\n </g>\n <g id=\"line2d_24\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m1a32005dea\" y=\"100.26203125\"/>\n </g>\n </g>\n <g id=\"text_10\">\n <!-- 150 -->\n <g transform=\"translate(7.565625 103.901875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n <use x=\"127.24609375\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_5\">\n <g id=\"line2d_25\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#me8a85f7bf6\" y=\"55.62203125\"/>\n </g>\n </g>\n <g id=\"line2d_26\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m1a32005dea\" y=\"55.62203125\"/>\n </g>\n </g>\n <g id=\"text_11\">\n <!-- 200 -->\n <g transform=\"translate(7.2 59.261875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"127.24609375\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_6\">\n <g id=\"line2d_27\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"28.890625\" xlink:href=\"#me8a85f7bf6\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"line2d_28\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"363.690625\" xlink:href=\"#m1a32005dea\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_12\">\n <!-- 250 -->\n <g transform=\"translate(7.2 14.621875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n <use x=\"127.24609375\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"patch_3\">\n <path d=\"\nM28.8906 10.982\nL363.691 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_4\">\n <path d=\"\nM363.691 234.182\nL363.691 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_5\">\n <path d=\"\nM28.8906 234.182\nL363.691 234.182\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_6\">\n <path d=\"\nM28.8906 234.182\nL28.8906 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"p349b51bf5c\">\n <rect height=\"223.2\" width=\"334.8\" x=\"28.890625\" y=\"10.98203125\"/>\n </clipPath>\n </defs>\n</svg>\n"
}
],
"prompt_number": 215
},
{
"cell_type": "markdown",
"metadata": {},
"source": "We can even check the reasonableness of the error estimate. If we pick a $\\lambda$ and generate Poisson samples $n_i$, then for each $n_i$ we can compute $z_i = (\\lambda-n_i)/\\sqrt{n_i}$, which should be distributed as a normal distribution with mean zero and unit standard deviation. So let's test that."
},
{
"cell_type": "code",
"collapsed": false,
"input": "lam = 100.\nni = np.random.poisson(lam, size=1000000)\nzi = (lam-ni)/np.sqrt(ni)\nui = scipy.stats.norm.cdf(zi)",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 206
},
{
"cell_type": "code",
"collapsed": false,
"input": "ui.sort()\nplt.plot(np.arange(len(ui))/float(len(ui)), ui)\nplt.plot((0,1),(0,1))",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 207,
"text": "[<matplotlib.lines.Line2D at 0x1ac6dd10>]"
},
{
"output_type": "display_data",
"svg": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->\n<svg height=\"252pt\" version=\"1.1\" viewBox=\"0 0 374 252\" width=\"374pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <style type=\"text/css\">\n*{stroke-linecap:square;stroke-linejoin:round;}\n </style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"\nM0 252.946\nL374.953 252.946\nL374.953 0\nL0 0\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"\nM25.8828 234.182\nL360.683 234.182\nL360.683 10.982\nL25.8828 10.982\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"line2d_1\">\n <path clip-path=\"url(#pfde95f0c18)\" d=\"\nM25.8828 234.181\nL26.0713 233.812\nL26.1928 233.711\nL26.304 233.585\nL26.3073 233.585\nL26.4185 233.428\nL26.4573 233.428\nL26.5685 233.232\nL26.6488 233.232\nL26.76 232.991\nL26.8946 232.991\nL27.0057 232.695\nL27.217 232.695\nL27.3281 232.332\nL27.6305 232.332\nL27.7416 231.889\nL28.1598 231.889\nL28.2709 231.353\nL28.8431 231.353\nL28.9543 230.707\nL29.6486 230.707\nL29.7598 229.931\nL30.6771 229.931\nL30.7883 229.004\nL31.9477 229.004\nL32.0589 227.904\nL33.5273 227.904\nL33.6385 226.606\nL35.3818 226.606\nL35.4929 225.08\nL37.6319 225.08\nL37.7431 223.3\nL40.305 223.3\nL40.4161 221.233\nL43.4658 221.233\nL43.577 218.849\nL47.0726 218.849\nL47.1838 216.116\nL51.3507 216.116\nL51.4619 213.002\nL56.3007 213.002\nL56.4119 209.479\nL61.8554 209.479\nL61.9666 205.519\nL68.1456 205.519\nL68.2568 201.098\nL75.231 201.098\nL75.3421 196.198\nL83.0295 196.198\nL83.1406 190.807\nL91.5913 190.807\nL91.7025 184.92\nL100.935 184.92\nL101.046 178.54\nL111.212 178.54\nL111.323 171.681\nL122.055 171.681\nL122.167 164.367\nL133.625 164.367\nL133.737 156.633\nL145.831 156.633\nL145.942 148.525\nL158.477 148.525\nL158.588 140.101\nL171.421 140.101\nL171.532 131.428\nL184.667 131.428\nL184.778 122.582\nL197.919 122.582\nL198.031 113.648\nL211.341 113.648\nL211.452 104.714\nL224.54 104.714\nL224.651 95.8726\nL237.471 95.8726\nL237.583 87.215\nL249.972 87.215\nL250.083 78.8302\nL261.863 78.8302\nL261.974 70.8011\nL273.387 70.8011\nL273.499 63.202\nL284.217 63.202\nL284.328 56.0962\nL294.275 56.0962\nL294.386 49.534\nL303.523 49.534\nL303.634 43.5514\nL311.794 43.5514\nL311.905 38.1695\nL319.451 38.1695\nL319.562 33.3941\nL326.07 33.3941\nL326.181 29.2168\nL331.96 29.2168\nL332.071 25.6162\nL337.103 25.6162\nL337.214 22.5596\nL341.433 22.5596\nL341.545 20.0055\nL345.157 20.0055\nL345.268 17.906\nL348.276 17.906\nL348.387 16.2091\nL350.91 16.2091\nL351.021 14.8616\nL353.099 14.8616\nL353.21 13.8108\nL354.832 13.8108\nL354.943 13.0068\nL356.199 13.0068\nL356.31 12.4036\nL357.302 12.4036\nL357.413 11.9602\nL358.164 11.9602\nL358.275 11.6411\nL358.83 11.6411\nL358.941 11.4164\nL359.327 11.4164\nL359.438 11.2619\nL359.994 11.158\nL360.106 11.09\nL360.682 10.982\nL360.682 10.982\" style=\"fill:none;stroke:#0000ff;\"/>\n </g>\n <g id=\"line2d_2\">\n <path clip-path=\"url(#pfde95f0c18)\" d=\"\nM25.8828 234.182\nL360.683 10.982\" style=\"fill:none;stroke:#008000;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_3\">\n <defs>\n <path d=\"\nM0 0\nL0 -4\" id=\"m0012dd4eef\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_4\">\n <defs>\n <path d=\"\nM0 0\nL0 4\" id=\"m476344969c\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0.0 -->\n <defs>\n <path d=\"\nM31.7812 66.4062\nQ24.1719 66.4062 20.3281 58.9062\nQ16.5 51.4219 16.5 36.375\nQ16.5 21.3906 20.3281 13.8906\nQ24.1719 6.39062 31.7812 6.39062\nQ39.4531 6.39062 43.2812 13.8906\nQ47.125 21.3906 47.125 36.375\nQ47.125 51.4219 43.2812 58.9062\nQ39.4531 66.4062 31.7812 66.4062\nM31.7812 74.2188\nQ44.0469 74.2188 50.5156 64.5156\nQ56.9844 54.8281 56.9844 36.375\nQ56.9844 17.9688 50.5156 8.26562\nQ44.0469 -1.42188 31.7812 -1.42188\nQ19.5312 -1.42188 13.0625 8.26562\nQ6.59375 17.9688 6.59375 36.375\nQ6.59375 54.8281 13.0625 64.5156\nQ19.5312 74.2188 31.7812 74.2188\" id=\"BitstreamVeraSans-Roman-30\"/>\n <path d=\"\nM10.6875 12.4062\nL21 12.4062\nL21 0\nL10.6875 0\nz\n\" id=\"BitstreamVeraSans-Roman-2e\"/>\n </defs>\n <g transform=\"translate(18.59296875 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_5\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"92.8428125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_6\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"92.8428125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 0.2 -->\n <defs>\n <path d=\"\nM19.1875 8.29688\nL53.6094 8.29688\nL53.6094 0\nL7.32812 0\nL7.32812 8.29688\nQ12.9375 14.1094 22.625 23.8906\nQ32.3281 33.6875 34.8125 36.5312\nQ39.5469 41.8438 41.4219 45.5312\nQ43.3125 49.2188 43.3125 52.7812\nQ43.3125 58.5938 39.2344 62.25\nQ35.1562 65.9219 28.6094 65.9219\nQ23.9688 65.9219 18.8125 64.3125\nQ13.6719 62.7031 7.8125 59.4219\nL7.8125 69.3906\nQ13.7656 71.7812 18.9375 73\nQ24.125 74.2188 28.4219 74.2188\nQ39.75 74.2188 46.4844 68.5469\nQ53.2188 62.8906 53.2188 53.4219\nQ53.2188 48.9219 51.5312 44.8906\nQ49.8594 40.875 45.4062 35.4062\nQ44.1875 33.9844 37.6406 27.2188\nQ31.1094 20.4531 19.1875 8.29688\" id=\"BitstreamVeraSans-Roman-32\"/>\n </defs>\n <g transform=\"translate(85.72171875 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_7\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"159.8028125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_8\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"159.8028125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_3\">\n <!-- 0.4 -->\n <defs>\n <path d=\"\nM37.7969 64.3125\nL12.8906 25.3906\nL37.7969 25.3906\nz\n\nM35.2031 72.9062\nL47.6094 72.9062\nL47.6094 25.3906\nL58.0156 25.3906\nL58.0156 17.1875\nL47.6094 17.1875\nL47.6094 0\nL37.7969 0\nL37.7969 17.1875\nL4.89062 17.1875\nL4.89062 26.7031\nz\n\" id=\"BitstreamVeraSans-Roman-34\"/>\n </defs>\n <g transform=\"translate(152.46140625 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_4\">\n <g id=\"line2d_9\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"226.7628125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_10\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"226.7628125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_4\">\n <!-- 0.6 -->\n <defs>\n <path d=\"\nM33.0156 40.375\nQ26.375 40.375 22.4844 35.8281\nQ18.6094 31.2969 18.6094 23.3906\nQ18.6094 15.5312 22.4844 10.9531\nQ26.375 6.39062 33.0156 6.39062\nQ39.6562 6.39062 43.5312 10.9531\nQ47.4062 15.5312 47.4062 23.3906\nQ47.4062 31.2969 43.5312 35.8281\nQ39.6562 40.375 33.0156 40.375\nM52.5938 71.2969\nL52.5938 62.3125\nQ48.875 64.0625 45.0938 64.9844\nQ41.3125 65.9219 37.5938 65.9219\nQ27.8281 65.9219 22.6719 59.3281\nQ17.5312 52.7344 16.7969 39.4062\nQ19.6719 43.6562 24.0156 45.9219\nQ28.375 48.1875 33.5938 48.1875\nQ44.5781 48.1875 50.9531 41.5156\nQ57.3281 34.8594 57.3281 23.3906\nQ57.3281 12.1562 50.6875 5.35938\nQ44.0469 -1.42188 33.0156 -1.42188\nQ20.3594 -1.42188 13.6719 8.26562\nQ6.98438 17.9688 6.98438 36.375\nQ6.98438 53.6562 15.1875 63.9375\nQ23.3906 74.2188 37.2031 74.2188\nQ40.9219 74.2188 44.7031 73.4844\nQ48.4844 72.75 52.5938 71.2969\" id=\"BitstreamVeraSans-Roman-36\"/>\n </defs>\n <g transform=\"translate(219.45578125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-36\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_5\">\n <g id=\"line2d_11\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"293.7228125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_12\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"293.7228125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_5\">\n <!-- 0.8 -->\n <defs>\n <path d=\"\nM31.7812 34.625\nQ24.75 34.625 20.7188 30.8594\nQ16.7031 27.0938 16.7031 20.5156\nQ16.7031 13.9219 20.7188 10.1562\nQ24.75 6.39062 31.7812 6.39062\nQ38.8125 6.39062 42.8594 10.1719\nQ46.9219 13.9688 46.9219 20.5156\nQ46.9219 27.0938 42.8906 30.8594\nQ38.875 34.625 31.7812 34.625\nM21.9219 38.8125\nQ15.5781 40.375 12.0312 44.7188\nQ8.5 49.0781 8.5 55.3281\nQ8.5 64.0625 14.7188 69.1406\nQ20.9531 74.2188 31.7812 74.2188\nQ42.6719 74.2188 48.875 69.1406\nQ55.0781 64.0625 55.0781 55.3281\nQ55.0781 49.0781 51.5312 44.7188\nQ48 40.375 41.7031 38.8125\nQ48.8281 37.1562 52.7969 32.3125\nQ56.7812 27.4844 56.7812 20.5156\nQ56.7812 9.90625 50.3125 4.23438\nQ43.8438 -1.42188 31.7812 -1.42188\nQ19.7344 -1.42188 13.25 4.23438\nQ6.78125 9.90625 6.78125 20.5156\nQ6.78125 27.4844 10.7812 32.3125\nQ14.7969 37.1562 21.9219 38.8125\nM18.3125 54.3906\nQ18.3125 48.7344 21.8438 45.5625\nQ25.3906 42.3906 31.7812 42.3906\nQ38.1406 42.3906 41.7188 45.5625\nQ45.3125 48.7344 45.3125 54.3906\nQ45.3125 60.0625 41.7188 63.2344\nQ38.1406 66.4062 31.7812 66.4062\nQ25.3906 66.4062 21.8438 63.2344\nQ18.3125 60.0625 18.3125 54.3906\" id=\"BitstreamVeraSans-Roman-38\"/>\n </defs>\n <g transform=\"translate(286.443125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-38\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_6\">\n <g id=\"line2d_13\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_14\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_6\">\n <!-- 1.0 -->\n <defs>\n <path d=\"\nM12.4062 8.29688\nL28.5156 8.29688\nL28.5156 63.9219\nL10.9844 60.4062\nL10.9844 69.3906\nL28.4219 72.9062\nL38.2812 72.9062\nL38.2812 8.29688\nL54.3906 8.29688\nL54.3906 0\nL12.4062 0\nz\n\" id=\"BitstreamVeraSans-Roman-31\"/>\n </defs>\n <g transform=\"translate(353.6125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"matplotlib.axis_2\">\n <g id=\"ytick_1\">\n <g id=\"line2d_15\">\n <defs>\n <path d=\"\nM0 0\nL4 0\" id=\"me8a85f7bf6\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_16\">\n <defs>\n <path d=\"\nM0 0\nL-4 0\" id=\"m1a32005dea\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"text_7\">\n <!-- 0.0 -->\n <g transform=\"translate(7.303125 237.821875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_2\">\n <g id=\"line2d_17\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"189.54203125\"/>\n </g>\n </g>\n <g id=\"line2d_18\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"189.54203125\"/>\n </g>\n </g>\n <g id=\"text_8\">\n <!-- 0.2 -->\n <g transform=\"translate(7.640625 193.181875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_3\">\n <g id=\"line2d_19\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"144.90203125\"/>\n </g>\n </g>\n <g id=\"line2d_20\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"144.90203125\"/>\n </g>\n </g>\n <g id=\"text_9\">\n <!-- 0.4 -->\n <g transform=\"translate(7.2 148.541875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_4\">\n <g id=\"line2d_21\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"100.26203125\"/>\n </g>\n </g>\n <g id=\"line2d_22\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"100.26203125\"/>\n </g>\n </g>\n <g id=\"text_10\">\n <!-- 0.6 -->\n <g transform=\"translate(7.26875 103.901875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-36\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_5\">\n <g id=\"line2d_23\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"55.62203125\"/>\n </g>\n </g>\n <g id=\"line2d_24\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"55.62203125\"/>\n </g>\n </g>\n <g id=\"text_11\">\n <!-- 0.8 -->\n <g transform=\"translate(7.3234375 59.261875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-38\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_6\">\n <g id=\"line2d_25\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"line2d_26\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_12\">\n <!-- 1.0 -->\n <g transform=\"translate(7.7421875 14.621875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"patch_3\">\n <path d=\"\nM25.8828 10.982\nL360.683 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_4\">\n <path d=\"\nM360.683 234.182\nL360.683 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_5\">\n <path d=\"\nM25.8828 234.182\nL360.683 234.182\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_6\">\n <path d=\"\nM25.8828 234.182\nL25.8828 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"pfde95f0c18\">\n <rect height=\"223.2\" width=\"334.8\" x=\"25.8828125\" y=\"10.98203125\"/>\n </clipPath>\n </defs>\n</svg>\n"
}
],
"prompt_number": 207
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Not too bad. It's going to flunk a Kolmogorov-Smirnov test because it's discrete, and we can't really do much about that without going to higher $n$ where we expect the approximation to be better anyway. Well, I guess we could choose the $\\lambda$ independently for each trial, but that's getting really very messy. And it's not what I'm really interested in anyway: the results so far are straight from the textbook."
},
{
"cell_type": "markdown",
"metadata": {},
"source": "What interests me right now is a more tricky variation on the problem. With the Fermi space telescope, the tool gtsrcprob gives us a probability for each photon that it's actually from the source (rather than from some nearby contaminating source). So what we want to plot in a histogram is not the number of photons, but the total probability, the expected number of photons. What's the uncertainty on that?"
},
{
"cell_type": "markdown",
"metadata": {},
"source": "It's not entirely clear how best to pose the problem mathematically. But let's try this: there is some unknown distribution of photon weights. To find the expected number of photons in each bin, we draw a number of photons from a Poisson distribution, then we draw the weight from our (unknown) distribution. "
},
{
"cell_type": "markdown",
"metadata": {},
"source": "Taking this as our mathematical model, what's the standard deviation of the result? Well, first let's get the mean: if the Poisson distribution has mean $\\lambda$, and the unknown distribution has mean $\\mu$, the expected value will be \n$$\nE(T) = \\sum_{n=0}^{\\infty} P(n|\\lambda)n\\mu = \\lambda\\mu.\n$$\nNow what about the standard deviation? Let's use $U$ for variables drawn from the unknown distribution, and compute the variance of $T$: \n$$\nE((T-E(T))^2) = E(T^2)-E(T)^2 = \\sum_{n=0}^\\infty P(n|\\lambda)nE(U^2) - \\lambda^2\\mu^2 = \\lambda E(U^2) - (\\lambda\\mu)^2,\n$$\nsince the different weights are drawn independently. "
},
{
"cell_type": "markdown",
"metadata": {},
"source": "This doesn't quite answer our question, since what we're looking for is a way to estimate the standard deviation given a list of $n$ weights $w_i$ drawn from a single sample. But we can take a guess based on the Poisson approach. We can estimate $\\lambda$ as $n$ and $E(U^2)$ as the root mean squared of the $w_i$. How does this stand up?"
},
{
"cell_type": "code",
"collapsed": false,
"input": "lam = 1000.\nni = np.random.poisson(lam, size=10000)\nmu = np.exp(0.5)\nwi = [np.exp(np.random.normal(size=n)) for n in ni]\nti = np.array([np.sum(w) for w in wi])",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 208
},
{
"cell_type": "code",
"collapsed": false,
"input": "np.mean([np.mean(w) for w in wi])/mu",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 209,
"text": "0.99987120363348647"
}
],
"prompt_number": 209
},
{
"cell_type": "code",
"collapsed": false,
"input": "vi = np.array([np.sum(w**2)-np.mean(w)**2 for w in wi])\nsi = np.sqrt(vi)\nzi = (lam*mu - ti)/si\nui = scipy.stats.norm.cdf(zi)",
"language": "python",
"metadata": {},
"outputs": [],
"prompt_number": 210
},
{
"cell_type": "code",
"collapsed": false,
"input": "plt.hist(zi, bins=np.ceil(np.sqrt(len(zi))), normed=True)\nxs = np.linspace(np.amin(zi),np.amax(zi),1000)\nplt.plot(xs,scipy.stats.norm.pdf(xs))",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 211,
"text": "[<matplotlib.lines.Line2D at 0x1aca3c10>]"
},
{
"output_type": "display_data",
"svg": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->\n<svg height=\"252pt\" version=\"1.1\" viewBox=\"0 0 376 252\" width=\"376pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <style type=\"text/css\">\n*{stroke-linecap:square;stroke-linejoin:round;}\n </style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"\nM0 252.946\nL376.501 252.946\nL376.501 0\nL0 0\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"\nM32.1422 234.182\nL366.942 234.182\nL366.942 10.982\nL32.1422 10.982\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"patch_3\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM54.1244 234.182\nL56.9863 234.182\nL56.9863 233.537\nL54.1244 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_4\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM56.9863 234.182\nL59.8482 234.182\nL59.8482 233.537\nL56.9863 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_5\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM59.8482 234.182\nL62.71 234.182\nL62.71 234.182\nL59.8482 234.182\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_6\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM62.71 234.182\nL65.5719 234.182\nL65.5719 232.893\nL62.71 232.893\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_7\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM65.5719 234.182\nL68.4338 234.182\nL68.4338 233.537\nL65.5719 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_8\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM68.4338 234.182\nL71.2957 234.182\nL71.2957 233.537\nL68.4338 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_9\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM71.2957 234.182\nL74.1576 234.182\nL74.1576 233.537\nL71.2957 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_10\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM74.1576 234.182\nL77.0194 234.182\nL77.0194 230.958\nL74.1576 230.958\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_11\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM77.0194 234.182\nL79.8813 234.182\nL79.8813 232.248\nL77.0194 232.248\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_12\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM79.8813 234.182\nL82.7432 234.182\nL82.7432 233.537\nL79.8813 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_13\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM82.7432 234.182\nL85.6051 234.182\nL85.6051 229.024\nL82.7432 229.024\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_14\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM85.6051 234.182\nL88.4669 234.182\nL88.4669 230.314\nL85.6051 230.314\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_15\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM88.4669 234.182\nL91.3288 234.182\nL91.3288 227.09\nL88.4669 227.09\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_16\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM91.3288 234.182\nL94.1907 234.182\nL94.1907 230.314\nL91.3288 230.314\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_17\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM94.1907 234.182\nL97.0526 234.182\nL97.0526 229.024\nL94.1907 229.024\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_18\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM97.0526 234.182\nL99.9145 234.182\nL99.9145 223.866\nL97.0526 223.866\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_19\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM99.9145 234.182\nL102.776 234.182\nL102.776 222.577\nL99.9145 222.577\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_20\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM102.776 234.182\nL105.638 234.182\nL105.638 216.13\nL102.776 216.13\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_21\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM105.638 234.182\nL108.5 234.182\nL108.5 212.906\nL105.638 212.906\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_22\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM108.5 234.182\nL111.362 234.182\nL111.362 209.683\nL108.5 209.683\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_23\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM111.362 234.182\nL114.224 234.182\nL114.224 197.433\nL111.362 197.433\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_24\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM114.224 234.182\nL117.086 234.182\nL117.086 196.143\nL114.224 196.143\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_25\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM117.086 234.182\nL119.948 234.182\nL119.948 195.499\nL117.086 195.499\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_26\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM119.948 234.182\nL122.809 234.182\nL122.809 170.354\nL119.948 170.354\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_27\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM122.809 234.182\nL125.671 234.182\nL125.671 172.933\nL122.809 172.933\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_28\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM125.671 234.182\nL128.533 234.182\nL128.533 161.973\nL125.671 161.973\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_29\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM128.533 234.182\nL131.395 234.182\nL131.395 152.302\nL128.533 152.302\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_30\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM131.395 234.182\nL134.257 234.182\nL134.257 156.815\nL131.395 156.815\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_31\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM134.257 234.182\nL137.119 234.182\nL137.119 132.96\nL134.257 132.96\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_32\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM137.119 234.182\nL139.981 234.182\nL139.981 127.158\nL137.119 127.158\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_33\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM139.981 234.182\nL142.843 234.182\nL142.843 123.29\nL139.981 123.29\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_34\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM142.843 234.182\nL145.705 234.182\nL145.705 109.75\nL142.843 109.75\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_35\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM145.705 234.182\nL148.566 234.182\nL148.566 94.2771\nL145.705 94.2771\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_36\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM148.566 234.182\nL151.428 234.182\nL151.428 100.724\nL148.566 100.724\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_37\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM151.428 234.182\nL154.29 234.182\nL154.29 81.3826\nL151.428 81.3826\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_38\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM154.29 234.182\nL157.152 234.182\nL157.152 62.6856\nL154.29 62.6856\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_39\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM157.152 234.182\nL160.014 234.182\nL160.014 71.067\nL157.152 71.067\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_40\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM160.014 234.182\nL162.876 234.182\nL162.876 45.9228\nL160.014 45.9228\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_41\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM162.876 234.182\nL165.738 234.182\nL165.738 73.6459\nL162.876 73.6459\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_42\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM165.738 234.182\nL168.6 234.182\nL168.6 24.6469\nL165.738 24.6469\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_43\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM168.6 234.182\nL171.461 234.182\nL171.461 38.8308\nL168.6 38.8308\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_44\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM171.461 234.182\nL174.323 234.182\nL174.323 31.7389\nL171.461 31.7389\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_45\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM174.323 234.182\nL177.185 234.182\nL177.185 25.9364\nL174.323 25.9364\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_46\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM177.185 234.182\nL180.047 234.182\nL180.047 58.8173\nL177.185 58.8173\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_47\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM180.047 234.182\nL182.909 234.182\nL182.909 64.6198\nL180.047 64.6198\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_48\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM182.909 234.182\nL185.771 234.182\nL185.771 29.16\nL182.909 29.16\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_49\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM185.771 234.182\nL188.633 234.182\nL188.633 47.2122\nL185.771 47.2122\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_50\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM188.633 234.182\nL191.495 234.182\nL191.495 62.0409\nL188.633 62.0409\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_51\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM191.495 234.182\nL194.356 234.182\nL194.356 61.3962\nL191.495 61.3962\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_52\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM194.356 234.182\nL197.218 234.182\nL197.218 43.9886\nL194.356 43.9886\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_53\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM197.218 234.182\nL200.08 234.182\nL200.08 65.2645\nL197.218 65.2645\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_54\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM200.08 234.182\nL202.942 234.182\nL202.942 72.3565\nL200.08 72.3565\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_55\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM202.942 234.182\nL205.804 234.182\nL205.804 77.5142\nL202.942 77.5142\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_56\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM205.804 234.182\nL208.666 234.182\nL208.666 95.5665\nL205.804 95.5665\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_57\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM208.666 234.182\nL211.528 234.182\nL211.528 102.014\nL208.666 102.014\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_58\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM211.528 234.182\nL214.39 234.182\nL214.39 111.04\nL211.528 111.04\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_59\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM214.39 234.182\nL217.251 234.182\nL217.251 93.6323\nL214.39 93.6323\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_60\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM217.251 234.182\nL220.113 234.182\nL220.113 122.645\nL217.251 122.645\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_61\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM220.113 234.182\nL222.975 234.182\nL222.975 122\nL220.113 122\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_62\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM222.975 234.182\nL225.837 234.182\nL225.837 118.777\nL222.975 118.777\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_63\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM225.837 234.182\nL228.699 234.182\nL228.699 134.895\nL225.837 134.895\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_64\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM228.699 234.182\nL231.561 234.182\nL231.561 156.815\nL228.699 156.815\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_65\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM231.561 234.182\nL234.423 234.182\nL234.423 161.973\nL231.561 161.973\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_66\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM234.423 234.182\nL237.285 234.182\nL237.285 163.262\nL234.423 163.262\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_67\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM237.285 234.182\nL240.147 234.182\nL240.147 172.933\nL237.285 172.933\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_68\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM240.147 234.182\nL243.008 234.182\nL243.008 174.223\nL240.147 174.223\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_69\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM243.008 234.182\nL245.87 234.182\nL245.87 172.933\nL243.008 172.933\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_70\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM245.87 234.182\nL248.732 234.182\nL248.732 191.63\nL245.87 191.63\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_71\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM248.732 234.182\nL251.594 234.182\nL251.594 192.92\nL248.732 192.92\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_72\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM251.594 234.182\nL254.456 234.182\nL254.456 200.656\nL251.594 200.656\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_73\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM254.456 234.182\nL257.318 234.182\nL257.318 200.012\nL254.456 200.012\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_74\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM257.318 234.182\nL260.18 234.182\nL260.18 203.88\nL257.318 203.88\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_75\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM260.18 234.182\nL263.042 234.182\nL263.042 212.906\nL260.18 212.906\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_76\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM263.042 234.182\nL265.903 234.182\nL265.903 214.84\nL263.042 214.84\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_77\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM265.903 234.182\nL268.765 234.182\nL268.765 217.419\nL265.903 217.419\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_78\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM268.765 234.182\nL271.627 234.182\nL271.627 218.064\nL268.765 218.064\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_79\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM271.627 234.182\nL274.489 234.182\nL274.489 224.511\nL271.627 224.511\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_80\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM274.489 234.182\nL277.351 234.182\nL277.351 219.998\nL274.489 219.998\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_81\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM277.351 234.182\nL280.213 234.182\nL280.213 219.353\nL277.351 219.353\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_82\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM280.213 234.182\nL283.075 234.182\nL283.075 223.866\nL280.213 223.866\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_83\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM283.075 234.182\nL285.937 234.182\nL285.937 225.801\nL283.075 225.801\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_84\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM285.937 234.182\nL288.798 234.182\nL288.798 229.669\nL285.937 229.669\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_85\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM288.798 234.182\nL291.66 234.182\nL291.66 230.314\nL288.798 230.314\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_86\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM291.66 234.182\nL294.522 234.182\nL294.522 229.669\nL291.66 229.669\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_87\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM294.522 234.182\nL297.384 234.182\nL297.384 226.445\nL294.522 226.445\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_88\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM297.384 234.182\nL300.246 234.182\nL300.246 231.603\nL297.384 231.603\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_89\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM300.246 234.182\nL303.108 234.182\nL303.108 231.603\nL300.246 231.603\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_90\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM303.108 234.182\nL305.97 234.182\nL305.97 232.893\nL303.108 232.893\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_91\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM305.97 234.182\nL308.832 234.182\nL308.832 233.537\nL305.97 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_92\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM308.832 234.182\nL311.693 234.182\nL311.693 231.603\nL308.832 231.603\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_93\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM311.693 234.182\nL314.555 234.182\nL314.555 229.669\nL311.693 229.669\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_94\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM314.555 234.182\nL317.417 234.182\nL317.417 234.182\nL314.555 234.182\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_95\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM317.417 234.182\nL320.279 234.182\nL320.279 232.893\nL317.417 232.893\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_96\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM320.279 234.182\nL323.141 234.182\nL323.141 234.182\nL320.279 234.182\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_97\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM323.141 234.182\nL326.003 234.182\nL326.003 233.537\nL323.141 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_98\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM326.003 234.182\nL328.865 234.182\nL328.865 233.537\nL326.003 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_99\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM328.865 234.182\nL331.727 234.182\nL331.727 233.537\nL328.865 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_100\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM331.727 234.182\nL334.588 234.182\nL334.588 233.537\nL331.727 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_101\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM334.588 234.182\nL337.45 234.182\nL337.45 234.182\nL334.588 234.182\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"patch_102\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM337.45 234.182\nL340.312 234.182\nL340.312 233.537\nL337.45 233.537\nz\n\" style=\"fill:#0000ff;stroke:#000000;\"/>\n </g>\n <g id=\"line2d_1\">\n <path clip-path=\"url(#p92a2503c99)\" d=\"\nM54.1244 233.589\nL60.4268 233.141\nL65.5834 232.567\nL70.167 231.833\nL74.1776 230.963\nL77.6153 230.003\nL80.7665 228.913\nL83.9177 227.587\nL86.7825 226.144\nL89.6472 224.443\nL92.2255 222.665\nL94.8038 220.627\nL97.382 218.306\nL99.9603 215.676\nL102.539 212.713\nL105.117 209.396\nL107.695 205.704\nL110.273 201.618\nL112.852 197.125\nL115.43 192.213\nL118.295 186.26\nL121.159 179.785\nL124.311 172.075\nL127.462 163.78\nL130.9 154.119\nL134.91 142.16\nL139.78 126.9\nL153.531 83.3516\nL156.969 73.4112\nL159.833 65.7313\nL162.412 59.3947\nL164.703 54.2893\nL166.995 49.7361\nL169.001 46.2438\nL170.719 43.6389\nL172.438 41.4099\nL174.157 39.5708\nL175.59 38.3445\nL177.022 37.4024\nL178.454 36.7487\nL179.887 36.3863\nL181.033 36.3072\nL182.178 36.4159\nL183.324 36.7119\nL184.757 37.3442\nL186.189 38.2651\nL187.621 39.4707\nL189.054 40.9554\nL190.773 43.0966\nL192.491 45.617\nL194.497 49.0158\nL196.502 52.881\nL198.794 57.8282\nL201.372 64.0065\nL204.237 71.5367\nL207.388 80.4919\nL211.112 91.7655\nL216.555 109.048\nL226.295 140.074\nL230.593 152.98\nL234.317 163.491\nL237.754 172.533\nL240.906 180.209\nL243.77 186.65\nL246.635 192.571\nL249.5 197.969\nL252.078 202.388\nL254.656 206.401\nL257.235 210.025\nL259.813 213.276\nL262.391 216.176\nL264.97 218.748\nL267.548 221.017\nL270.126 223.005\nL272.991 224.917\nL275.856 226.547\nL278.72 227.928\nL281.871 229.194\nL285.309 230.317\nL289.033 231.278\nL293.044 232.071\nL297.628 232.737\nL302.784 233.255\nL309.087 233.658\nL317.394 233.945\nL329.426 234.113\nL340.312 234.162\nL340.312 234.162\" style=\"fill:none;stroke:#008000;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_2\">\n <defs>\n <path d=\"\nM0 0\nL0 -4\" id=\"m0012dd4eef\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_3\">\n <defs>\n <path d=\"\nM0 0\nL0 4\" id=\"m476344969c\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- \u22124 -->\n <defs>\n <path d=\"\nM10.5938 35.5\nL73.1875 35.5\nL73.1875 27.2031\nL10.5938 27.2031\nz\n\" id=\"BitstreamVeraSans-Roman-2212\"/>\n <path d=\"\nM37.7969 64.3125\nL12.8906 25.3906\nL37.7969 25.3906\nz\n\nM35.2031 72.9062\nL47.6094 72.9062\nL47.6094 25.3906\nL58.0156 25.3906\nL58.0156 17.1875\nL47.6094 17.1875\nL47.6094 0\nL37.7969 0\nL37.7969 17.1875\nL4.89062 17.1875\nL4.89062 26.7031\nz\n\" id=\"BitstreamVeraSans-Roman-34\"/>\n </defs>\n <g transform=\"translate(25.58125 245.47265625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-2212\"/>\n <use x=\"83.7890625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_4\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"69.3421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_5\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"69.3421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- \u22123 -->\n <defs>\n <path d=\"\nM40.5781 39.3125\nQ47.6562 37.7969 51.625 33\nQ55.6094 28.2188 55.6094 21.1875\nQ55.6094 10.4062 48.1875 4.48438\nQ40.7656 -1.42188 27.0938 -1.42188\nQ22.5156 -1.42188 17.6562 -0.515625\nQ12.7969 0.390625 7.625 2.20312\nL7.625 11.7188\nQ11.7188 9.32812 16.5938 8.10938\nQ21.4844 6.89062 26.8125 6.89062\nQ36.0781 6.89062 40.9375 10.5469\nQ45.7969 14.2031 45.7969 21.1875\nQ45.7969 27.6406 41.2812 31.2656\nQ36.7656 34.9062 28.7188 34.9062\nL20.2188 34.9062\nL20.2188 43.0156\nL29.1094 43.0156\nQ36.375 43.0156 40.2344 45.9219\nQ44.0938 48.8281 44.0938 54.2969\nQ44.0938 59.9062 40.1094 62.9062\nQ36.1406 65.9219 28.7188 65.9219\nQ24.6562 65.9219 20.0156 65.0312\nQ15.375 64.1562 9.8125 62.3125\nL9.8125 71.0938\nQ15.4375 72.6562 20.3438 73.4375\nQ25.25 74.2188 29.5938 74.2188\nQ40.8281 74.2188 47.3594 69.1094\nQ53.9062 64.0156 53.9062 55.3281\nQ53.9062 49.2656 50.4375 45.0938\nQ46.9688 40.9219 40.5781 39.3125\" id=\"BitstreamVeraSans-Roman-33\"/>\n </defs>\n <g transform=\"translate(62.9015625 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-2212\"/>\n <use x=\"83.7890625\" xlink:href=\"#BitstreamVeraSans-Roman-33\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_6\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"106.5421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_7\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"106.5421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_3\">\n <!-- \u22122 -->\n <defs>\n <path d=\"\nM19.1875 8.29688\nL53.6094 8.29688\nL53.6094 0\nL7.32812 0\nL7.32812 8.29688\nQ12.9375 14.1094 22.625 23.8906\nQ32.3281 33.6875 34.8125 36.5312\nQ39.5469 41.8438 41.4219 45.5312\nQ43.3125 49.2188 43.3125 52.7812\nQ43.3125 58.5938 39.2344 62.25\nQ35.1562 65.9219 28.6094 65.9219\nQ23.9688 65.9219 18.8125 64.3125\nQ13.6719 62.7031 7.8125 59.4219\nL7.8125 69.3906\nQ13.7656 71.7812 18.9375 73\nQ24.125 74.2188 28.4219 74.2188\nQ39.75 74.2188 46.4844 68.5469\nQ53.2188 62.8906 53.2188 53.4219\nQ53.2188 48.9219 51.5312 44.8906\nQ49.8594 40.875 45.4062 35.4062\nQ44.1875 33.9844 37.6406 27.2188\nQ31.1094 20.4531 19.1875 8.29688\" id=\"BitstreamVeraSans-Roman-32\"/>\n </defs>\n <g transform=\"translate(100.2015625 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-2212\"/>\n <use x=\"83.7890625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_4\">\n <g id=\"line2d_8\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"143.7421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_9\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"143.7421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_4\">\n <!-- \u22121 -->\n <defs>\n <path d=\"\nM12.4062 8.29688\nL28.5156 8.29688\nL28.5156 63.9219\nL10.9844 60.4062\nL10.9844 69.3906\nL28.4219 72.9062\nL38.2812 72.9062\nL38.2812 8.29688\nL54.3906 8.29688\nL54.3906 0\nL12.4062 0\nz\n\" id=\"BitstreamVeraSans-Roman-31\"/>\n </defs>\n <g transform=\"translate(137.3625 245.47265625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-2212\"/>\n <use x=\"83.7890625\" xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_5\">\n <g id=\"line2d_10\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"180.9421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_11\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"180.9421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_5\">\n <!-- 0 -->\n <defs>\n <path d=\"\nM31.7812 66.4062\nQ24.1719 66.4062 20.3281 58.9062\nQ16.5 51.4219 16.5 36.375\nQ16.5 21.3906 20.3281 13.8906\nQ24.1719 6.39062 31.7812 6.39062\nQ39.4531 6.39062 43.2812 13.8906\nQ47.125 21.3906 47.125 36.375\nQ47.125 51.4219 43.2812 58.9062\nQ39.4531 66.4062 31.7812 66.4062\nM31.7812 74.2188\nQ44.0469 74.2188 50.5156 64.5156\nQ56.9844 54.8281 56.9844 36.375\nQ56.9844 17.9688 50.5156 8.26562\nQ44.0469 -1.42188 31.7812 -1.42188\nQ19.5312 -1.42188 13.0625 8.26562\nQ6.59375 17.9688 6.59375 36.375\nQ6.59375 54.8281 13.0625 64.5156\nQ19.5312 74.2188 31.7812 74.2188\" id=\"BitstreamVeraSans-Roman-30\"/>\n </defs>\n <g transform=\"translate(178.42265625 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_6\">\n <g id=\"line2d_12\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"218.1421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_13\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"218.1421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_6\">\n <!-- 1 -->\n <g transform=\"translate(215.971875 245.47265625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_7\">\n <g id=\"line2d_14\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"255.3421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_15\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"255.3421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_7\">\n <!-- 2 -->\n <g transform=\"translate(253.028125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_8\">\n <g id=\"line2d_16\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"292.5421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_17\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"292.5421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_8\">\n <!-- 3 -->\n <g transform=\"translate(290.14296875 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-33\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_9\">\n <g id=\"line2d_18\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"329.7421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_19\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"329.7421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_9\">\n <!-- 4 -->\n <g transform=\"translate(327.0859375 245.47265625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_10\">\n <g id=\"line2d_20\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_21\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_10\">\n <!-- 5 -->\n <defs>\n <path d=\"\nM10.7969 72.9062\nL49.5156 72.9062\nL49.5156 64.5938\nL19.8281 64.5938\nL19.8281 46.7344\nQ21.9688 47.4688 24.1094 47.8281\nQ26.2656 48.1875 28.4219 48.1875\nQ40.625 48.1875 47.75 41.5\nQ54.8906 34.8125 54.8906 23.3906\nQ54.8906 11.625 47.5625 5.09375\nQ40.2344 -1.42188 26.9062 -1.42188\nQ22.3125 -1.42188 17.5469 -0.640625\nQ12.7969 0.140625 7.71875 1.70312\nL7.71875 11.625\nQ12.1094 9.23438 16.7969 8.0625\nQ21.4844 6.89062 26.7031 6.89062\nQ35.1562 6.89062 40.0781 11.3281\nQ45.0156 15.7656 45.0156 23.3906\nQ45.0156 31 40.0781 35.4375\nQ35.1562 39.8906 26.7031 39.8906\nQ22.75 39.8906 18.8125 39.0156\nQ14.8906 38.1406 10.7969 36.2812\nz\n\" id=\"BitstreamVeraSans-Roman-35\"/>\n </defs>\n <g transform=\"translate(364.58359375 245.47265625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"matplotlib.axis_2\">\n <g id=\"ytick_1\">\n <g id=\"line2d_22\">\n <defs>\n <path d=\"\nM0 0\nL4 0\" id=\"me8a85f7bf6\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_23\">\n <defs>\n <path d=\"\nM0 0\nL-4 0\" id=\"m1a32005dea\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"text_11\">\n <!-- 0.00 -->\n <defs>\n <path d=\"\nM10.6875 12.4062\nL21 12.4062\nL21 0\nL10.6875 0\nz\n\" id=\"BitstreamVeraSans-Roman-2e\"/>\n </defs>\n <g transform=\"translate(7.2 237.821875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_2\">\n <g id=\"line2d_24\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"209.38203125\"/>\n </g>\n </g>\n <g id=\"line2d_25\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"209.38203125\"/>\n </g>\n </g>\n <g id=\"text_12\">\n <!-- 0.05 -->\n <g transform=\"translate(7.409375 213.021875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_3\">\n <g id=\"line2d_26\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"184.58203125\"/>\n </g>\n </g>\n <g id=\"line2d_27\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"184.58203125\"/>\n </g>\n </g>\n <g id=\"text_13\">\n <!-- 0.10 -->\n <g transform=\"translate(7.2 188.221875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_4\">\n <g id=\"line2d_28\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"159.78203125\"/>\n </g>\n </g>\n <g id=\"line2d_29\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"159.78203125\"/>\n </g>\n </g>\n <g id=\"text_14\">\n <!-- 0.15 -->\n <g transform=\"translate(7.409375 163.421875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_5\">\n <g id=\"line2d_30\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"134.98203125\"/>\n </g>\n </g>\n <g id=\"line2d_31\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"134.98203125\"/>\n </g>\n </g>\n <g id=\"text_15\">\n <!-- 0.20 -->\n <g transform=\"translate(7.2 138.621875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_6\">\n <g id=\"line2d_32\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"110.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_33\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"110.18203125\"/>\n </g>\n </g>\n <g id=\"text_16\">\n <!-- 0.25 -->\n <g transform=\"translate(7.409375 113.821875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_7\">\n <g id=\"line2d_34\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"85.38203125\"/>\n </g>\n </g>\n <g id=\"line2d_35\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"85.38203125\"/>\n </g>\n </g>\n <g id=\"text_17\">\n <!-- 0.30 -->\n <g transform=\"translate(7.2 89.021875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-33\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_8\">\n <g id=\"line2d_36\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"60.58203125\"/>\n </g>\n </g>\n <g id=\"line2d_37\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"60.58203125\"/>\n </g>\n </g>\n <g id=\"text_18\">\n <!-- 0.35 -->\n <g transform=\"translate(7.409375 64.221875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-33\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_9\">\n <g id=\"line2d_38\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"35.78203125\"/>\n </g>\n </g>\n <g id=\"line2d_39\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"35.78203125\"/>\n </g>\n </g>\n <g id=\"text_19\">\n <!-- 0.40 -->\n <g transform=\"translate(7.2 39.421875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_10\">\n <g id=\"line2d_40\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"32.1421875\" xlink:href=\"#me8a85f7bf6\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"line2d_41\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"366.9421875\" xlink:href=\"#m1a32005dea\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_20\">\n <!-- 0.45 -->\n <g transform=\"translate(7.409375 14.621875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n <use x=\"159.033203125\" xlink:href=\"#BitstreamVeraSans-Roman-35\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"patch_103\">\n <path d=\"\nM32.1422 10.982\nL366.942 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_104\">\n <path d=\"\nM366.942 234.182\nL366.942 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_105\">\n <path d=\"\nM32.1422 234.182\nL366.942 234.182\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_106\">\n <path d=\"\nM32.1422 234.182\nL32.1422 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"p92a2503c99\">\n <rect height=\"223.2\" width=\"334.8\" x=\"32.1421875\" y=\"10.98203125\"/>\n </clipPath>\n </defs>\n</svg>\n"
}
],
"prompt_number": 211
},
{
"cell_type": "code",
"collapsed": false,
"input": "ui.sort()\nplt.plot(np.arange(len(ui))/float(len(ui)), ui)\nplt.plot((0,1),(0,1))",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 212,
"text": "[<matplotlib.lines.Line2D at 0x11aebd90>]"
},
{
"output_type": "display_data",
"svg": "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n<!-- Created with matplotlib (http://matplotlib.sourceforge.net/) -->\n<svg height=\"252pt\" version=\"1.1\" viewBox=\"0 0 374 252\" width=\"374pt\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n <defs>\n <style type=\"text/css\">\n*{stroke-linecap:square;stroke-linejoin:round;}\n </style>\n </defs>\n <g id=\"figure_1\">\n <g id=\"patch_1\">\n <path d=\"\nM0 252.946\nL374.953 252.946\nL374.953 0\nL0 0\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"axes_1\">\n <g id=\"patch_2\">\n <path d=\"\nM25.8828 234.182\nL360.683 234.182\nL360.683 10.982\nL25.8828 10.982\nz\n\" style=\"fill:#ffffff;\"/>\n </g>\n <g id=\"line2d_1\">\n <path clip-path=\"url(#pfde95f0c18)\" d=\"\nM25.8828 234.109\nL26.3515 233.458\nL26.5189 233.115\nL26.6863 233.02\nL26.9207 232.712\nL27.2555 232.372\nL27.4899 231.968\nL27.5903 231.869\nL27.8916 231.2\nL28.0255 231.092\nL28.5277 230.69\nL28.6951 230.464\nL29.0969 229.906\nL32.2105 227.242\nL32.4114 227.094\nL32.5119 226.97\nL33.6502 226.316\nL33.8845 226.129\nL35.0229 225.325\nL35.1903 225.155\nL35.592 224.908\nL35.8264 224.797\nL36.0607 224.57\nL36.1277 224.523\nL36.2616 224.325\nL36.5295 224.15\nL36.9647 223.809\nL37.1656 223.602\nL37.6678 223.228\nL38.3374 222.704\nL38.5383 222.596\nL40.5805 221.335\nL40.9153 221.167\nL41.7189 220.836\nL42.0202 220.543\nL42.355 220.362\nL42.5559 220.038\nL42.7902 219.88\nL43.192 219.577\nL43.9955 219.192\nL44.1294 219.086\nL44.799 218.699\nL44.9664 218.569\nL45.8034 218.127\nL46.0713 217.926\nL47.2431 217.156\nL47.3435 217.039\nL47.5444 216.926\nL48.984 215.964\nL49.2519 215.711\nL49.5197 215.523\nL49.6871 215.367\nL49.9884 215.254\nL50.2563 215.04\nL50.5241 214.879\nL51.2272 214.509\nL51.9303 214.259\nL52.1311 214.076\nL52.3655 213.948\nL52.9347 213.544\nL53.1355 213.386\nL53.2695 213.276\nL53.5038 213.121\nL53.5708 213.011\nL53.8051 212.889\nL54.5752 212.503\nL54.7426 212.298\nL55.0774 211.843\nL55.6131 211.486\nL55.8139 211.36\nL55.9479 211.22\nL56.1153 211.126\nL56.3161 210.904\nL56.6509 210.768\nL57.0862 210.529\nL57.2536 210.45\nL57.6219 210.08\nL59.932 208.538\nL60.1998 208.429\nL60.4342 208.296\nL61.5725 207.653\nL61.9408 207.487\nL62.1082 207.369\nL62.8447 206.941\nL63.0121 206.831\nL63.1795 206.694\nL63.5813 206.203\nL63.7822 206.026\nL64.4183 205.602\nL64.6192 205.466\nL64.9875 205.341\nL65.3557 205.121\nL65.6905 204.896\nL65.8579 204.795\nL66.0588 204.647\nL66.3936 204.514\nL66.6949 204.274\nL67.2306 203.985\nL67.5319 203.866\nL67.7998 203.755\nL67.9672 203.658\nL68.2015 203.482\nL68.3355 203.354\nL68.7707 203.089\nL69.2059 202.876\nL69.7751 202.625\nL70.2438 202.301\nL70.5786 201.976\nL70.9469 201.761\nL71.2482 201.513\nL71.4156 201.441\nL71.65 201.319\nL71.9848 201.082\nL72.3865 200.736\nL72.6879 200.535\nL73.4244 199.873\nL73.6588 199.703\nL74.1945 199.319\nL74.5962 198.922\nL74.8641 198.793\nL75.0315 198.674\nL75.5337 198.119\nL75.9019 198.034\nL76.0359 197.89\nL76.3372 197.774\nL76.7724 197.547\nL77.0068 197.452\nL77.1407 197.357\nL77.2746 197.211\nL77.6094 196.991\nL77.9107 196.82\nL78.1451 196.711\nL79.5847 195.905\nL79.7521 195.749\nL80.1539 195.557\nL83.3345 193.842\nL83.4684 193.79\nL83.6358 193.673\nL84.5398 192.963\nL85.1089 192.571\nL85.5107 192.288\nL85.7116 192.096\nL85.879 191.984\nL86.5486 191.624\nL86.716 191.426\nL88.2561 190.239\nL88.4569 190.04\nL88.6913 189.795\nL90.1979 189.022\nL90.4992 188.828\nL90.8675 188.675\nL93.8807 186.421\nL94.0481 186.278\nL94.249 186.028\nL94.4499 185.917\nL95.1195 185.472\nL95.4208 185.345\nL95.6551 185.098\nL95.9899 184.917\nL96.3917 184.554\nL96.693 184.329\nL96.9609 184.201\nL97.6639 183.668\nL97.8313 183.537\nL98.0322 183.421\nL98.3335 183.314\nL98.5344 183.193\nL98.9697 183.024\nL99.1705 182.874\nL99.5388 182.726\nL99.7732 182.627\nL100.275 182.466\nL100.51 182.231\nL101.246 181.752\nL101.38 181.606\nL101.648 181.348\nL101.949 181.209\nL102.284 180.93\nL102.418 180.877\nL102.619 180.63\nL103.121 180.387\nL103.289 180.234\nL103.757 179.951\nL104.159 179.834\nL104.494 179.68\nL104.728 179.539\nL104.862 179.513\nL104.996 179.393\nL105.364 179.256\nL106.034 178.925\nL106.268 178.742\nL106.77 178.491\nL106.938 178.33\nL107.139 178.194\nL107.976 177.376\nL108.244 177.246\nL108.645 177.045\nL110.118 176.217\nL110.587 176.005\nL110.855 175.61\nL111.056 175.483\nL111.424 175.293\nL111.692 175.176\nL112.06 174.909\nL113.969 173.455\nL114.27 173.288\nL115.107 172.644\nL115.375 172.453\nL115.576 172.348\nL115.877 172.031\nL116.48 171.771\nL116.714 171.521\nL116.948 171.438\nL117.116 171.332\nL117.518 171.199\nL117.852 171.059\nL118.154 170.865\nL118.355 170.695\nL119.359 169.98\nL119.593 169.864\nL119.928 169.643\nL120.096 169.53\nL120.296 169.379\nL120.732 169.035\nL120.933 168.933\nL120.966 168.932\nL121.133 168.594\nL121.636 168.291\nL122.841 167.627\nL123.075 167.454\nL125.553 166.103\nL125.72 165.982\nL125.921 165.787\nL126.323 165.513\nL126.725 165.262\nL126.959 165.163\nL127.126 165.044\nL127.528 164.829\nL127.762 164.698\nL128.097 164.584\nL128.332 164.516\nL130.206 163.489\nL130.407 163.203\nL130.541 163.121\nL130.776 162.791\nL130.943 162.704\nL131.11 162.478\nL131.78 162.21\nL132.048 162.075\nL132.416 161.9\nL132.651 161.74\nL132.751 161.596\nL133.287 161.245\nL133.521 161.092\nL133.755 160.897\nL133.956 160.745\nL134.291 160.498\nL134.894 159.983\nL135.061 159.773\nL135.597 159.299\nL135.798 159.107\nL136.132 158.85\nL136.4 158.57\nL136.434 158.564\nL136.568 158.383\nL136.869 158.132\nL138.208 157.364\nL138.342 157.215\nL138.543 157.074\nL139.012 156.771\nL139.179 156.659\nL139.614 156.458\nL139.882 156.26\nL140.585 155.88\nL140.92 155.758\nL141.188 155.576\nL141.322 155.486\nL141.69 155.296\nL142.058 155.016\nL142.226 154.958\nL142.628 154.705\nL142.895 154.565\nL143.431 154.361\nL143.799 154.124\nL144.168 153.864\nL144.435 153.757\nL144.77 153.612\nL145.038 153.322\nL145.44 153.143\nL146.377 152.56\nL146.478 152.456\nL147.884 151.721\nL148.018 151.62\nL148.185 151.545\nL148.353 151.43\nL148.855 151.124\nL149.357 150.948\nL149.558 150.796\nL149.792 150.666\nL149.993 150.478\nL150.228 150.363\nL151.667 149.534\nL152.504 149.027\nL152.772 148.822\nL153.073 148.583\nL153.241 148.422\nL153.843 148.157\nL154.613 147.744\nL154.814 147.513\nL155.316 147.165\nL155.618 147.078\nL155.785 146.884\nL156.22 146.497\nL156.455 146.2\nL156.622 146.092\nL157.392 145.52\nL157.627 145.409\nL158.664 144.826\nL159.736 144.131\nL160.338 143.669\nL160.64 143.496\nL160.841 143.317\nL161.242 143.035\nL161.443 142.91\nL162.481 142.375\nL163.117 141.941\nL163.251 141.836\nL163.586 141.534\nL164.155 141.236\nL164.356 141.149\nL164.724 140.998\nL164.959 140.808\nL165.796 140.473\nL165.997 140.36\nL166.499 140.06\nL166.666 139.921\nL166.834 139.802\nL167.671 139.058\nL167.972 138.932\nL169.043 138.067\nL169.278 137.898\nL169.847 137.625\nL170.182 137.383\nL170.483 137.279\nL170.717 137.165\nL171.42 136.703\nL172.224 136.187\nL172.358 136.017\nL172.659 135.903\nL173.027 135.697\nL173.396 135.41\nL173.563 135.321\nL173.73 135.204\nL174.4 134.802\nL174.768 134.625\nL175.338 134.325\nL176.141 133.822\nL176.375 133.566\nL176.509 133.506\nL176.677 133.339\nL177.212 133.103\nL178.485 132.264\nL178.686 132.102\nL180.627 130.914\nL180.862 130.73\nL180.996 130.632\nL182.301 129.451\nL182.536 129.319\nL182.603 129.209\nL182.77 129.021\nL182.971 128.899\nL183.239 128.745\nL183.44 128.572\nL183.574 128.463\nL183.808 128.333\nL184.21 128.135\nL185.716 127.104\nL188.361 124.892\nL188.663 124.761\nL188.93 124.472\nL189.232 124.249\nL189.5 123.933\nL189.633 123.716\nL190.136 123.234\nL190.404 123.033\nL192.078 121.792\nL192.211 121.695\nL192.513 121.44\nL192.881 121.285\nL193.45 120.835\nL193.752 120.485\nL193.952 120.364\nL194.22 120.276\nL194.421 120.155\nL194.622 120.033\nL194.89 119.775\nL195.124 119.425\nL195.258 119.352\nL195.426 119.151\nL195.626 119.006\nL195.794 118.804\nL196.196 118.488\nL196.497 118.354\nL196.765 118.273\nL196.865 118.156\nL197.066 118.095\nL197.367 117.953\nL197.602 117.802\nL197.87 117.703\nL198.037 117.521\nL198.238 117.445\nL198.372 117.325\nL199.242 116.905\nL199.41 116.788\nL199.979 116.315\nL200.213 116.213\nL200.347 116.063\nL201.285 115.649\nL201.452 115.569\nL201.854 115.366\nL202.155 115.163\nL202.691 114.867\nL202.825 114.643\nL203.561 114.281\nL203.762 114.145\nL203.929 114.05\nL204.197 113.902\nL204.566 113.605\nL204.733 113.492\nL204.9 113.349\nL205.101 113.142\nL205.838 112.523\nL206.24 112.293\nL206.407 112.043\nL206.608 111.891\nL206.809 111.763\nL207.277 111.548\nL207.478 111.352\nL208.884 110.688\nL209.085 110.461\nL209.387 110.17\nL209.956 109.866\nL210.224 109.759\nL212.534 107.38\nL212.634 107.28\nL212.902 107.185\nL213.572 106.965\nL213.739 106.832\nL213.973 106.672\nL220.636 102.282\nL220.803 102.126\nL221.607 101.585\nL221.875 101.373\nL222.076 101.239\nL222.343 101.063\nL222.578 100.933\nL222.745 100.742\nL227.031 97.5549\nL227.131 97.5167\nL227.298 97.3394\nL228.035 96.8038\nL228.303 96.6263\nL229.073 96.2125\nL229.374 96.0203\nL229.676 95.8148\nL229.876 95.6293\nL230.044 95.4594\nL231.283 94.7935\nL231.45 94.6636\nL235.434 91.4247\nL235.568 91.3464\nL235.735 91.1604\nL238.849 89.2941\nL239.083 89.1799\nL239.385 89.0605\nL239.552 88.9597\nL239.787 88.8091\nL240.222 88.4969\nL240.958 87.9962\nL241.092 87.8108\nL241.327 87.676\nL242.398 86.9525\nL242.867 86.7661\nL243.235 86.5463\nL243.469 86.4632\nL243.771 86.221\nL244.038 86.0719\nL244.139 85.9341\nL244.742 85.5169\nL244.809 85.5003\nL244.976 85.2632\nL245.545 84.9653\nL245.746 84.7113\nL245.88 84.5995\nL247.353 83.5969\nL247.621 83.4134\nL247.788 83.1389\nL249.295 81.9608\nL249.496 81.8259\nL249.931 81.5707\nL250.199 81.4729\nL250.902 80.9694\nL251.136 80.8545\nL251.538 80.6849\nL251.772 80.5129\nL252.877 79.7456\nL253.179 79.5903\nL254.384 78.7929\nL254.551 78.6484\nL254.652 78.6051\nL254.819 78.4642\nL255.053 78.2821\nL255.254 78.121\nL255.522 78.029\nL256.024 77.5124\nL256.56 77.2263\nL256.761 77.0901\nL257.029 76.9545\nL258.334 76.0669\nL258.468 75.9275\nL259.004 75.7032\nL259.138 75.6009\nL259.506 75.4531\nL260.611 74.8486\nL260.745 74.7867\nL260.946 74.5773\nL261.348 74.3588\nL261.615 73.8896\nL262.185 73.4927\nL262.486 73.1996\nL262.62 73.0931\nL262.888 72.7054\nL263.089 72.593\nL263.423 72.405\nL265.03 71.4298\nL265.164 71.2415\nL265.6 70.9244\nL265.867 70.8008\nL266.068 70.6448\nL266.838 70.0586\nL267.14 69.9539\nL267.341 69.7656\nL267.575 69.5603\nL271.09 67.1626\nL271.258 67.0143\nL271.492 66.8847\nL271.726 66.7858\nL271.927 66.6657\nL272.329 66.2625\nL272.496 66.1754\nL272.731 66.0214\nL274.137 65.1029\nL274.438 64.7779\nL274.606 64.6083\nL274.807 64.4259\nL275.007 64.3226\nL275.409 63.9949\nL275.476 63.92\nL275.711 63.7812\nL275.911 63.6695\nL276.079 63.4713\nL276.179 63.3925\nL276.414 63.1294\nL276.748 63.0085\nL277.05 62.7496\nL277.217 62.4144\nL277.385 62.3167\nL277.853 62.0707\nL278.188 61.8547\nL278.59 61.372\nL279.36 60.7926\nL280.063 60.3207\nL280.331 60.0341\nL280.532 59.8937\nL280.933 59.6171\nL281.201 59.4915\nL281.402 59.3073\nL281.536 59.1094\nL281.703 59.0059\nL281.871 58.9165\nL282.206 58.7824\nL282.373 58.682\nL282.574 58.5681\nL283.177 57.9823\nL284.449 57.2467\nL284.817 56.9478\nL285.051 56.7788\nL285.219 56.6559\nL285.721 56.3125\nL285.888 56.1028\nL286.089 55.9626\nL286.324 55.8206\nL286.692 55.6326\nL286.893 55.4724\nL287.094 55.3649\nL287.362 55.1574\nL287.429 55.1177\nL287.596 54.8633\nL287.931 54.7003\nL288.199 54.5853\nL288.399 54.4118\nL289.036 53.9824\nL289.17 53.7211\nL289.471 53.6187\nL289.672 53.502\nL289.705 53.4945\nL289.873 53.2083\nL290.308 52.9659\nL290.542 52.846\nL290.977 52.407\nL291.078 52.2686\nL291.614 51.956\nL292.551 51.3896\nL293.053 51.1553\nL293.254 51.0432\nL293.555 50.9272\nL293.957 50.7386\nL295.029 50.0797\nL295.196 49.9685\nL295.531 49.7507\nL295.832 49.628\nL296.033 49.5063\nL296.267 49.3809\nL296.703 49.1443\nL296.87 48.9178\nL297.54 48.5175\nL297.874 48.3498\nL298.778 47.6599\nL298.912 47.5405\nL299.18 47.311\nL300.787 46.3339\nL300.921 46.2878\nL301.122 45.9204\nL304.202 43.8115\nL304.436 43.6363\nL305.073 43.2928\nL305.24 43.1788\nL306.546 42.559\nL306.847 42.4574\nL307.282 41.9831\nL307.416 41.7678\nL307.584 41.6581\nL307.918 41.3363\nL309.023 40.8353\nL309.525 40.5435\nL309.894 40.229\nL310.095 40.0664\nL310.362 39.7489\nL310.731 39.5645\nL311.333 39.2771\nL311.534 39.1606\nL312.338 38.6558\nL312.606 38.4994\nL313.041 38.2323\nL313.275 38.0577\nL313.71 37.8936\nL313.978 37.6956\nL314.246 37.5816\nL314.514 37.3348\nL315.719 36.7553\nL315.887 36.5452\nL316.991 35.9817\nL317.694 35.4065\nL318.029 35.2462\nL318.431 34.9722\nL318.598 34.8588\nL318.933 34.6936\nL319.168 34.6027\nL319.536 34.3494\nL319.837 34.2369\nL320.172 34.0028\nL320.373 33.8642\nL322.348 32.5427\nL322.783 32.2769\nL322.984 32.1759\nL323.386 31.8525\nL323.721 31.6497\nL324.089 31.427\nL324.39 31.3042\nL324.658 31.1181\nL325.194 30.7809\nL325.73 30.199\nL326.031 29.9899\nL327.303 28.9647\nL327.471 28.8543\nL327.672 28.691\nL328.107 28.4591\nL328.341 28.2649\nL329.647 27.5427\nL329.881 27.4213\nL330.049 27.3424\nL330.216 27.2747\nL330.484 27.1315\nL330.685 26.9484\nL331.12 26.7084\nL332.794 25.4928\nL333.028 25.3815\nL333.397 25.1933\nL333.597 25.0708\nL334.401 24.5617\nL334.568 24.3987\nL334.769 24.1739\nL334.97 24.0704\nL341.934 20.2734\nL342.202 20.1759\nL342.369 20.0188\nL343.842 19.1015\nL344.11 18.9679\nL344.981 18.348\nL346.019 17.8128\nL346.186 17.6928\nL346.856 17.3387\nL347.09 17.2246\nL347.425 17.0437\nL350.137 15.5476\nL350.706 15.2135\nL350.907 15.1345\nL351.308 14.9715\nL352.246 14.465\nL352.447 14.2759\nL352.748 14.1108\nL352.982 14.0197\nL353.317 13.8901\nL353.485 13.7289\nL353.685 13.6235\nL353.853 13.5465\nL354.154 13.3247\nL354.489 13.1575\nL354.723 13.0355\nL355.192 12.8785\nL355.46 12.6834\nL355.728 12.6056\nL355.895 12.4459\nL356.23 12.292\nL357.335 11.9506\nL357.502 11.8579\nL358.105 11.7309\nL358.707 11.4807\nL359.042 11.3218\nL359.243 11.2674\nL360.616 10.9871\nL360.649 10.9841\nL360.649 10.9841\" style=\"fill:none;stroke:#0000ff;\"/>\n </g>\n <g id=\"line2d_2\">\n <path clip-path=\"url(#pfde95f0c18)\" d=\"\nM25.8828 234.182\nL360.683 10.982\" style=\"fill:none;stroke:#008000;\"/>\n </g>\n <g id=\"matplotlib.axis_1\">\n <g id=\"xtick_1\">\n <g id=\"line2d_3\">\n <defs>\n <path d=\"\nM0 0\nL0 -4\" id=\"m0012dd4eef\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_4\">\n <defs>\n <path d=\"\nM0 0\nL0 4\" id=\"m476344969c\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_1\">\n <!-- 0.0 -->\n <defs>\n <path d=\"\nM31.7812 66.4062\nQ24.1719 66.4062 20.3281 58.9062\nQ16.5 51.4219 16.5 36.375\nQ16.5 21.3906 20.3281 13.8906\nQ24.1719 6.39062 31.7812 6.39062\nQ39.4531 6.39062 43.2812 13.8906\nQ47.125 21.3906 47.125 36.375\nQ47.125 51.4219 43.2812 58.9062\nQ39.4531 66.4062 31.7812 66.4062\nM31.7812 74.2188\nQ44.0469 74.2188 50.5156 64.5156\nQ56.9844 54.8281 56.9844 36.375\nQ56.9844 17.9688 50.5156 8.26562\nQ44.0469 -1.42188 31.7812 -1.42188\nQ19.5312 -1.42188 13.0625 8.26562\nQ6.59375 17.9688 6.59375 36.375\nQ6.59375 54.8281 13.0625 64.5156\nQ19.5312 74.2188 31.7812 74.2188\" id=\"BitstreamVeraSans-Roman-30\"/>\n <path d=\"\nM10.6875 12.4062\nL21 12.4062\nL21 0\nL10.6875 0\nz\n\" id=\"BitstreamVeraSans-Roman-2e\"/>\n </defs>\n <g transform=\"translate(18.59296875 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_2\">\n <g id=\"line2d_5\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"92.8428125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_6\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"92.8428125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_2\">\n <!-- 0.2 -->\n <defs>\n <path d=\"\nM19.1875 8.29688\nL53.6094 8.29688\nL53.6094 0\nL7.32812 0\nL7.32812 8.29688\nQ12.9375 14.1094 22.625 23.8906\nQ32.3281 33.6875 34.8125 36.5312\nQ39.5469 41.8438 41.4219 45.5312\nQ43.3125 49.2188 43.3125 52.7812\nQ43.3125 58.5938 39.2344 62.25\nQ35.1562 65.9219 28.6094 65.9219\nQ23.9688 65.9219 18.8125 64.3125\nQ13.6719 62.7031 7.8125 59.4219\nL7.8125 69.3906\nQ13.7656 71.7812 18.9375 73\nQ24.125 74.2188 28.4219 74.2188\nQ39.75 74.2188 46.4844 68.5469\nQ53.2188 62.8906 53.2188 53.4219\nQ53.2188 48.9219 51.5312 44.8906\nQ49.8594 40.875 45.4062 35.4062\nQ44.1875 33.9844 37.6406 27.2188\nQ31.1094 20.4531 19.1875 8.29688\" id=\"BitstreamVeraSans-Roman-32\"/>\n </defs>\n <g transform=\"translate(85.72171875 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_3\">\n <g id=\"line2d_7\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"159.8028125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_8\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"159.8028125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_3\">\n <!-- 0.4 -->\n <defs>\n <path d=\"\nM37.7969 64.3125\nL12.8906 25.3906\nL37.7969 25.3906\nz\n\nM35.2031 72.9062\nL47.6094 72.9062\nL47.6094 25.3906\nL58.0156 25.3906\nL58.0156 17.1875\nL47.6094 17.1875\nL47.6094 0\nL37.7969 0\nL37.7969 17.1875\nL4.89062 17.1875\nL4.89062 26.7031\nz\n\" id=\"BitstreamVeraSans-Roman-34\"/>\n </defs>\n <g transform=\"translate(152.46140625 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_4\">\n <g id=\"line2d_9\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"226.7628125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_10\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"226.7628125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_4\">\n <!-- 0.6 -->\n <defs>\n <path d=\"\nM33.0156 40.375\nQ26.375 40.375 22.4844 35.8281\nQ18.6094 31.2969 18.6094 23.3906\nQ18.6094 15.5312 22.4844 10.9531\nQ26.375 6.39062 33.0156 6.39062\nQ39.6562 6.39062 43.5312 10.9531\nQ47.4062 15.5312 47.4062 23.3906\nQ47.4062 31.2969 43.5312 35.8281\nQ39.6562 40.375 33.0156 40.375\nM52.5938 71.2969\nL52.5938 62.3125\nQ48.875 64.0625 45.0938 64.9844\nQ41.3125 65.9219 37.5938 65.9219\nQ27.8281 65.9219 22.6719 59.3281\nQ17.5312 52.7344 16.7969 39.4062\nQ19.6719 43.6562 24.0156 45.9219\nQ28.375 48.1875 33.5938 48.1875\nQ44.5781 48.1875 50.9531 41.5156\nQ57.3281 34.8594 57.3281 23.3906\nQ57.3281 12.1562 50.6875 5.35938\nQ44.0469 -1.42188 33.0156 -1.42188\nQ20.3594 -1.42188 13.6719 8.26562\nQ6.98438 17.9688 6.98438 36.375\nQ6.98438 53.6562 15.1875 63.9375\nQ23.3906 74.2188 37.2031 74.2188\nQ40.9219 74.2188 44.7031 73.4844\nQ48.4844 72.75 52.5938 71.2969\" id=\"BitstreamVeraSans-Roman-36\"/>\n </defs>\n <g transform=\"translate(219.45578125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-36\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_5\">\n <g id=\"line2d_11\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"293.7228125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_12\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"293.7228125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_5\">\n <!-- 0.8 -->\n <defs>\n <path d=\"\nM31.7812 34.625\nQ24.75 34.625 20.7188 30.8594\nQ16.7031 27.0938 16.7031 20.5156\nQ16.7031 13.9219 20.7188 10.1562\nQ24.75 6.39062 31.7812 6.39062\nQ38.8125 6.39062 42.8594 10.1719\nQ46.9219 13.9688 46.9219 20.5156\nQ46.9219 27.0938 42.8906 30.8594\nQ38.875 34.625 31.7812 34.625\nM21.9219 38.8125\nQ15.5781 40.375 12.0312 44.7188\nQ8.5 49.0781 8.5 55.3281\nQ8.5 64.0625 14.7188 69.1406\nQ20.9531 74.2188 31.7812 74.2188\nQ42.6719 74.2188 48.875 69.1406\nQ55.0781 64.0625 55.0781 55.3281\nQ55.0781 49.0781 51.5312 44.7188\nQ48 40.375 41.7031 38.8125\nQ48.8281 37.1562 52.7969 32.3125\nQ56.7812 27.4844 56.7812 20.5156\nQ56.7812 9.90625 50.3125 4.23438\nQ43.8438 -1.42188 31.7812 -1.42188\nQ19.7344 -1.42188 13.25 4.23438\nQ6.78125 9.90625 6.78125 20.5156\nQ6.78125 27.4844 10.7812 32.3125\nQ14.7969 37.1562 21.9219 38.8125\nM18.3125 54.3906\nQ18.3125 48.7344 21.8438 45.5625\nQ25.3906 42.3906 31.7812 42.3906\nQ38.1406 42.3906 41.7188 45.5625\nQ45.3125 48.7344 45.3125 54.3906\nQ45.3125 60.0625 41.7188 63.2344\nQ38.1406 66.4062 31.7812 66.4062\nQ25.3906 66.4062 21.8438 63.2344\nQ18.3125 60.0625 18.3125 54.3906\" id=\"BitstreamVeraSans-Roman-38\"/>\n </defs>\n <g transform=\"translate(286.443125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-38\"/>\n </g>\n </g>\n </g>\n <g id=\"xtick_6\">\n <g id=\"line2d_13\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m0012dd4eef\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_14\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m476344969c\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_6\">\n <!-- 1.0 -->\n <defs>\n <path d=\"\nM12.4062 8.29688\nL28.5156 8.29688\nL28.5156 63.9219\nL10.9844 60.4062\nL10.9844 69.3906\nL28.4219 72.9062\nL38.2812 72.9062\nL38.2812 8.29688\nL54.3906 8.29688\nL54.3906 0\nL12.4062 0\nz\n\" id=\"BitstreamVeraSans-Roman-31\"/>\n </defs>\n <g transform=\"translate(353.6125 245.60390625)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"matplotlib.axis_2\">\n <g id=\"ytick_1\">\n <g id=\"line2d_15\">\n <defs>\n <path d=\"\nM0 0\nL4 0\" id=\"me8a85f7bf6\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"line2d_16\">\n <defs>\n <path d=\"\nM0 0\nL-4 0\" id=\"m1a32005dea\" style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\"/>\n </defs>\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"234.18203125\"/>\n </g>\n </g>\n <g id=\"text_7\">\n <!-- 0.0 -->\n <g transform=\"translate(7.303125 237.821875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_2\">\n <g id=\"line2d_17\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"189.54203125\"/>\n </g>\n </g>\n <g id=\"line2d_18\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"189.54203125\"/>\n </g>\n </g>\n <g id=\"text_8\">\n <!-- 0.2 -->\n <g transform=\"translate(7.640625 193.181875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-32\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_3\">\n <g id=\"line2d_19\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"144.90203125\"/>\n </g>\n </g>\n <g id=\"line2d_20\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"144.90203125\"/>\n </g>\n </g>\n <g id=\"text_9\">\n <!-- 0.4 -->\n <g transform=\"translate(7.2 148.541875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-34\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_4\">\n <g id=\"line2d_21\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"100.26203125\"/>\n </g>\n </g>\n <g id=\"line2d_22\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"100.26203125\"/>\n </g>\n </g>\n <g id=\"text_10\">\n <!-- 0.6 -->\n <g transform=\"translate(7.26875 103.901875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-36\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_5\">\n <g id=\"line2d_23\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"55.62203125\"/>\n </g>\n </g>\n <g id=\"line2d_24\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"55.62203125\"/>\n </g>\n </g>\n <g id=\"text_11\">\n <!-- 0.8 -->\n <g transform=\"translate(7.3234375 59.261875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-38\"/>\n </g>\n </g>\n </g>\n <g id=\"ytick_6\">\n <g id=\"line2d_25\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"25.8828125\" xlink:href=\"#me8a85f7bf6\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"line2d_26\">\n <g>\n <use style=\"stroke:#000000;stroke-linecap:butt;stroke-width:0.5;\" x=\"360.6828125\" xlink:href=\"#m1a32005dea\" y=\"10.98203125\"/>\n </g>\n </g>\n <g id=\"text_12\">\n <!-- 1.0 -->\n <g transform=\"translate(7.7421875 14.621875)scale(0.1 -0.1)\">\n <use xlink:href=\"#BitstreamVeraSans-Roman-31\"/>\n <use x=\"63.623046875\" xlink:href=\"#BitstreamVeraSans-Roman-2e\"/>\n <use x=\"95.41015625\" xlink:href=\"#BitstreamVeraSans-Roman-30\"/>\n </g>\n </g>\n </g>\n </g>\n <g id=\"patch_3\">\n <path d=\"\nM25.8828 10.982\nL360.683 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_4\">\n <path d=\"\nM360.683 234.182\nL360.683 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_5\">\n <path d=\"\nM25.8828 234.182\nL360.683 234.182\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n <g id=\"patch_6\">\n <path d=\"\nM25.8828 234.182\nL25.8828 10.982\" style=\"fill:none;stroke:#000000;\"/>\n </g>\n </g>\n </g>\n <defs>\n <clipPath id=\"pfde95f0c18\">\n <rect height=\"223.2\" width=\"334.8\" x=\"25.8828125\" y=\"10.98203125\"/>\n </clipPath>\n </defs>\n</svg>\n"
}
],
"prompt_number": 212
},
{
"cell_type": "code",
"collapsed": false,
"input": "scipy.stats.kstest(ui, lambda x:x)",
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 213,
"text": "(0.0230439056929167, 4.8824192933359981e-05)"
}
],
"prompt_number": 213
},
{
"cell_type": "markdown",
"metadata": {},
"source": "The second of these values is the false positive probability, that is, the chance that you would obtain such a deviation from uniformity drawing from a genuinely uniform distribution."
},
{
"cell_type": "markdown",
"metadata": {},
"source": "In short, if you observe $n$ weights $w_i$, the ($1\\sigma$) uncertainty you should quote is \n$$\\sqrt{\\sum_{i=1}^n w_i^2 - (\\bar w_i)^2}.$$\nNote that in spite of the similarity, this is not the formula for the standard deviation of the $w_i$. On the other hand, the second term is generally considerably smaller than the first, by a factor of roughly $n$; omitting it does very little harm, so that it is probably as good to simply add all the weights in quadrature."
},
{
"cell_type": "markdown",
"metadata": {},
"source": "A little experimentation shows that for small numbers of photons, the approximation isn't very good. Worse, what matters is the number of photons with weight near the maximum weight. All those small-weight photons don't help improve the approximation substantially."
}
],
"metadata": {}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment