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
57 changes: 49 additions & 8 deletions your-code/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,15 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"P(A∪B) = 0.3 + 0.6 − 0.1 = 0.8 -> False\n",
"\n",
"P(A∩BC) = 0.3 − 0.1 = 0.2 -> True\n",
"\n",
"P(A∩(B∪BC)) = P(A) = 0.3 -> False\n",
"\n",
"P(AC∩BC) = 1 − 0.8 = 0.2 -> False\n",
"\n",
"P((A∩B)C) = 1 − 0.1 = 0.9 -> True\n",
"\"\"\""
]
},
Expand All @@ -49,7 +57,13 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"Taking the white ball out: 10 white balls / 30 balls in total which translates into -> 1/3\n",
"\n",
"Taking a white ball out after taking a black ball out: 10 white / 29 remaning balls -> 10/29\n",
"\n",
"Taking a red ball out after taking a black and a red ball out: 11 red balls / 28 remaining balls -> 11/28\n",
"\n",
"Taking a red ball out after taking a black and a red ball out with reposition: 12 red balls / 30 remaining balls -> 12/30\n",
"\"\"\""
]
},
Expand All @@ -75,7 +89,13 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"P(Cloud|Rain) = 0,5 (50%)\n",
"P(Rain) = 0,1 (10%)\n",
"P(Cloudy) = 0,4 (40%)\n",
"\n",
"P(Rain|Cloudy) -> 0,5 * 0,1 = 0,05 / 0,4 = 0,125\n",
"\n",
"Given the day starting cloudy the probability of rain is 12,5%\n",
"\"\"\""
]
},
Expand All @@ -102,11 +122,32 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.675\n",
"0.48\n",
"0.324\n"
]
}
],
"source": [
"# your code here"
"# your code here\n",
"survey = 480 + 520\n",
"yes = 324 + 351\n",
"no = 156 + 169\n",
"\n",
"positive = yes/survey\n",
"men = 480 / survey\n",
"positive_men = 324 / survey\n",
"\n",
"print(positive)\n",
"print(men)\n",
"print(positive_men)"
]
},
{
Expand All @@ -116,7 +157,7 @@
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"Indeed both events are independent because be it men or women the request to have more street light is common to both genders.\n",
"\"\"\""
]
}
Expand All @@ -137,7 +178,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
"version": "3.11.4"
}
},
"nbformat": 4,
Expand Down