|
1203 | 1203 | "\n",
|
1204 | 1204 | "Let's say that we have two political parties' candidates, 'Jill Stein' of the Green Party and 'Gary Johnson' of the Libertarian Party and we have the probabilities of each of these candidates saying the words 'freedom', 'immigration' and 'environment' when they give a speech:\n",
|
1205 | 1205 | "\n",
|
1206 |
| - "* Probability that Jill Stein says 'freedom': 0.1 ---------> `P(J|F)`\n", |
1207 |
| - "* Probability that Jill Stein says 'immigration': 0.1 -----> `P(J|I)`\n", |
1208 |
| - "* Probability that Jill Stein says 'environment': 0.8 -----> `P(J|E)`\n", |
| 1206 | + "* Probability that Jill Stein says 'freedom': 0.1 ---------> `P(F|J)`\n", |
| 1207 | + "* Probability that Jill Stein says 'immigration': 0.1 -----> `P(I|J)`\n", |
| 1208 | + "* Probability that Jill Stein says 'environment': 0.8 -----> `P(E|J)`\n", |
1209 | 1209 | "\n",
|
1210 | 1210 | "\n",
|
1211 |
| - "* Probability that Gary Johnson says 'freedom': 0.7 -------> `P(G|F)`\n", |
1212 |
| - "* Probability that Gary Johnson says 'immigration': 0.2 ---> `P(G|I)`\n", |
1213 |
| - "* Probability that Gary Johnson says 'environment': 0.1 ---> `P(G|E)`\n", |
| 1211 | + "* Probability that Gary Johnson says 'freedom': 0.7 -------> `P(F|G)`\n", |
| 1212 | + "* Probability that Gary Johnson says 'immigration': 0.2 ---> `P(I|G)`\n", |
| 1213 | + "* Probability that Gary Johnson says 'environment': 0.1 ---> `P(E|G)`\n", |
1214 | 1214 | "\n",
|
1215 | 1215 | "\n",
|
1216 | 1216 | "And let us also assume that the probablility of Jill Stein giving a speech, `P(J)` is `0.5` and the same for Gary Johnson, `P(G) = 0.5`. \n",
|
|
1285 | 1285 | "# P(J)\n",
|
1286 | 1286 | "p_j = 0.5\n",
|
1287 | 1287 | "\n",
|
1288 |
| - "# P(J|F)\n", |
| 1288 | + "# P(F/J)\n", |
1289 | 1289 | "p_j_f = 0.1\n",
|
1290 | 1290 | "\n",
|
1291 |
| - "# P(J|I)\n", |
| 1291 | + "# P(I/J)\n", |
1292 | 1292 | "p_j_i = 0.1\n",
|
1293 | 1293 | "\n",
|
1294 | 1294 | "p_j_text = p_j * p_j_f * p_j_i\n",
|
|
1317 | 1317 | "# P(G)\n",
|
1318 | 1318 | "p_g = 0.5\n",
|
1319 | 1319 | "\n",
|
1320 |
| - "# P(G|F)\n", |
| 1320 | + "# P(F/G)\n", |
1321 | 1321 | "p_g_f = 0.7\n",
|
1322 | 1322 | "\n",
|
1323 |
| - "# P(G|I)\n", |
| 1323 | + "# P(I/G)\n", |
1324 | 1324 | "p_g_i = 0.2\n",
|
1325 | 1325 | "\n",
|
1326 | 1326 | "p_g_text = p_g * p_g_f * p_g_i\n",
|
|
0 commit comments