Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 46 additions & 4 deletions your-code/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,19 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"P(A U B) = P(A) + P(B) - P(A and B)\n",
"P(A U B) = 0.30 + 0.60 - 0.10\n",
"P(A U B) = 0.80\n",
"P(A and not B) = P(A) - P(A and B) = 0.3 - 0.1 = 0.2\n",
"P(A and (B U not B)) = P(A) = 0.3\n",
"P(not A and not B) = 1 - P(A U B) = 1 - 0.8 = 0.2\n",
"P(not (A and B)) = 1 - P(A and B) = 1 - 0.1 = 0.9\n",
"\n",
"1 - False\n",
"2 - True\n",
"3 - False\n",
"4 - False\n",
"5 - True\n",
"\"\"\""
]
},
Expand All @@ -49,7 +61,13 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"Total Balls = w 10 + r 12 + b 8 = 30\n",
"\n",
"a) 10/30\n",
"b) 10/29\n",
"c) 11/28\n",
"d) 12/30\n",
"\n",
"\"\"\""
]
},
Expand All @@ -75,7 +93,15 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"rain = 0.5\n",
"cloudy = 0.4\n",
"month = 0.1\n",
"\n",
"P(rain | cloudy) = (P(cloudy | rain) * P(month)) / P(cloudy)\n",
"P(rain | cloudy) = (0.5 * 0.1) / 0.4 \n",
"P(rain | cloudy) = 0.05 / 0.4 \n",
"P(rain | cloudy) ≈ 0.125 * 100 = 12.5%\n",
"\n",
"\"\"\""
]
},
Expand Down Expand Up @@ -116,7 +142,23 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
" Y - M - T\n",
"M 324 156 480\n",
"W 351 169 520\n",
"T 675 325 1000\n",
"\n",
" Y - M - T\n",
"M 32.4 15,6 48,0\n",
"W 35,1 16,8 52,0\n",
"T 67,5 32,5 100\n",
"\n",
"FOR INDEPENDENT\n",
"P(A AND B) = PA X PB\n",
"P(A AND B) = 67.5% * 48.0% = 32.4%\n",
"\n",
"Man|Yes = 32.4\n",
"\n",
"They are independent!\n",
"\"\"\""
]
}
Expand Down