Fixed equation for total probability theorem.
I was using the wrong subscript (i instead of j) in the sum.
This commit is contained in:
parent
04ce859d01
commit
e12352c520
@ -1731,9 +1731,9 @@
|
||||
"source": [
|
||||
"## Total Probability Theorem\n",
|
||||
"\n",
|
||||
"We know now the formal mathematics behind the `update()` function; what about the `predict()` function? `predict()` implements the *total probability theorem*. Let's recall what `predict()` computed. It computed the probability of being at any given position given the probability of all the possible movement events. Let's express that as an equation. The probability of being at any position $i$ at time $t$ can be written as $P(X_i^t)$. We computed that as the sum of the prior at time $t-1$ $P(X_i^{t-1})$ multiplied by the probability of moving from cell $x_j$ to $x_i$. That is\n",
|
||||
"We know now the formal mathematics behind the `update()` function; what about the `predict()` function? `predict()` implements the *total probability theorem*. Let's recall what `predict()` computed. It computed the probability of being at any given position given the probability of all the possible movement events. Let's express that as an equation. The probability of being at any position $i$ at time $t$ can be written as $P(X_i^t)$. We computed that as the sum of the prior at time $t-1$ $P(X_j^{t-1})$ multiplied by the probability of moving from cell $x_j$ to $x_i$. That is\n",
|
||||
"\n",
|
||||
"$$P(X_i^t) = \\sum_j P(X_i^{t-1}) P(x_i | x_j)$$\n",
|
||||
"$$P(X_i^t) = \\sum_j P(X_j^{t-1}) P(x_i | x_j)$$\n",
|
||||
"\n",
|
||||
"That equation is called the *total probability theorem*. Quoting from Wikipedia [6] \"It expresses the total probability of an outcome which can be realized via several distinct events\". I could have given you that equation and implemented `predict()`, but your chances of understanding why the equation works would be slim. As a reminder, here is the code that computes this equation\n",
|
||||
"\n",
|
||||
|
Loading…
Reference in New Issue
Block a user