From 93e15dfda0a04cd85b4e8afcb9e4468035b8e7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cdanielmdepaoli=E2=80=9D?= <β€œdanielmdepaoli@gmail.com”> Date: Wed, 9 Aug 2023 13:45:08 +0100 Subject: [PATCH] Lab Done --- .../{main.ipynb => IntroProbablityLab.ipynb} | 148 +++++++++++++++--- 1 file changed, 128 insertions(+), 20 deletions(-) rename your-code/{main.ipynb => IntroProbablityLab.ipynb} (64%) diff --git a/your-code/main.ipynb b/your-code/IntroProbablityLab.ipynb similarity index 64% rename from your-code/main.ipynb rename to your-code/IntroProbablityLab.ipynb index b8b7a9c..e42d735 100644 --- a/your-code/main.ipynb +++ b/your-code/IntroProbablityLab.ipynb @@ -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" ] }, { @@ -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" ] }, { @@ -74,9 +174,7 @@ "metadata": {}, "outputs": [], "source": [ - "\"\"\"\n", - "your solution here\n", - "\"\"\"" + "12,5%" ] }, { @@ -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" }, @@ -137,7 +245,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.10.9" } }, "nbformat": 4,