Browse Source

Poisson distribution

Will K 6 years ago
parent
commit
6d5f95fa7b

+ 15 - 3
bayesian drake equation/poisson-development.ipynb

@@ -2,7 +2,7 @@
  "cells": [
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 1,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-01-18T01:56:55.465220Z",
@@ -80,14 +80,25 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 2,
    "metadata": {
     "ExecuteTime": {
      "end_time": "2019-01-18T01:57:48.167368Z",
      "start_time": "2019-01-18T01:57:48.163398Z"
     }
    },
-   "outputs": [],
+   "outputs": [
+    {
+     "name": "stderr",
+     "output_type": "stream",
+     "text": [
+      "C:\\Users\\willk\\Anaconda3\\lib\\site-packages\\h5py\\__init__.py:36: FutureWarning:\n",
+      "\n",
+      "Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.\n",
+      "\n"
+     ]
+    }
+   ],
    "source": [
     "import pymc3 as pm"
    ]
@@ -105,6 +116,7 @@
      "name": "stderr",
      "output_type": "stream",
      "text": [
+      "WARNING (theano.gof.compilelock): Overriding existing lock by dead process '14584' (I am process '17296')\n",
       "Multiprocess sampling (8 chains in 8 jobs)\n",
       "Metropolis: [y]\n"
      ]

+ 11 - 0
poisson/equations.md

@@ -0,0 +1,11 @@
+{\displaystyle P(k{\text{ events in interval}})=e^{-\lambda }{\frac {\lambda ^{k}}{k!}}}
+
+\frac{1 \text{ meteor}}{15 \text{ minutes}} * 60 \text{ minutes} = 4 \text{ meteors expected} = \lambda
+
+{\displaystyle P(4{\text{ meteors in 1 hour}})=e^{-4}{\frac {4^{4}}{4!}}} = 0.195 = 19.5\%
+
+P(T > t) = e^{-\text{rate} * {t}}
+
+P(T \le t) = 1 - e^{-\text{rate} * {t}}
+
+\Pr(X=k)={\binom {n}{k}}p^{k}(1-p)^{n-k}

BIN
poisson/images/binomial.png


BIN
poisson/images/distribution_equation.png


BIN
poisson/images/lambda_num.png


BIN
poisson/images/less_than_waiting.png


BIN
poisson/images/wait_time.png


BIN
poisson/images/worked_num.png


File diff suppressed because it is too large
+ 21688 - 243
poisson/poisson.ipynb