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
148 changes: 128 additions & 20 deletions your-code/main.ipynb → your-code/IntroProbablityLab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,73 @@
"metadata": {},
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"\"\"\""
"1\n",
"\n",
"𝑃(𝐴∪𝐵)=0.6 ?\n",
"\n",
"P(AUB) = P(A) + P(B) - P(A and B)\n",
"P(AUB) = 0.3 + 0.6 - 0.1\n",
"P(AUB) = 0.8\n",
"\n",
"FALSE"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"2\n",
"\n",
"𝑃(𝐴∩𝐵𝐶)= 0.2 ?\n",
"\n",
"P(A and NOT B) = P(not AUB)\n",
"\n",
"TRUE"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"3\n",
"\n",
"𝑃(𝐴∩(𝐵∪𝐵𝐶))=0.4 ?\n",
"\n",
"0.3\n",
"\n",
"FALSE"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"4\n",
"\n",
"𝑃(𝐴𝐶∩𝐵𝐶)=0.3 ?\n",
"\n",
"0.2\n",
"\n",
"FALSE"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"5 \n",
"\n",
"𝑃((𝐴∩𝐵)𝐶)=0.9 ?\n",
"\n",
"TRUE"
]
},
{
Expand All @@ -42,15 +106,51 @@
"**Hint**: Reposition means putting back the ball into the box after taking it out."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"10 white balls\n",
"12 red balls\n",
"8 black balls\n",
"\n",
"30 balls in total"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"1. 1/3"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"2. 10/29"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"\"\"\""
"3. 12/28"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"4. 12/30"
]
},
{
Expand All @@ -74,9 +174,7 @@
"metadata": {},
"outputs": [],
"source": [
"\"\"\"\n",
"your solution here\n",
"\"\"\""
"12,5%"
]
},
{
Expand All @@ -101,29 +199,39 @@
]
},
{
"cell_type": "code",
"execution_count": null,
"cell_type": "markdown",
"metadata": {},
"outputs": [],
"source": [
"# your code here"
"Gender does not matter, as both the survey answers for both men and women were equal. 67.5% of men and woman surveyed answered yes and 32.5% of men and woman answered no. "
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"67.5\n",
"67.5\n"
]
}
],
"source": [
"\"\"\"\n",
"your solution here\n",
"\"\"\""
"woman_yes = (351/520)*100\n",
"man_yes = (324/480)*100\n",
"\n",
"\n",
"print(woman_yes)\n",
"print(man_yes)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -137,7 +245,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
"version": "3.10.9"
}
},
"nbformat": 4,
Expand Down