diff --git a/your-code/main.ipynb b/your-code/main.ipynb index b8b7a9c..f8cada0 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -24,10 +24,29 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "1,3,4\n", "\"\"\"" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "P(A) = 0.3\n", + "P(B) = 0.6\n", + "P(A int B) = 0.1\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -49,7 +68,21 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "- white = 10/30 = 1/3\n", + "\n", + "- white after black\n", + "P(B|A) = P(A int B)/P(A) = 0,333\n", + "\n", + "P(W) = 10/29\n", + "\n", + "\n", + "- red ball after black and red ball\n", + "P(R)= 11/28\n", + "\n", + "\n", + "- red after black and red\n", + "P(R) = 12/30\n", + "\n", "\"\"\"" ] }, @@ -75,7 +108,9 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "\n", + "P(R|C) = (P(C|R)*P(R))/P(C)= 0.5*0.1/0.4 = 0.125\n", + "\n", "\"\"\"" ] }, @@ -102,11 +137,91 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "67.5 67.5\n" + ] + } + ], + "source": [ + "import pandas as pd\n", + "\n", + "woman_yes = (351/520)*100\n", + "man_yes = (324/480)*100\n", + "\n", + "print(woman_yes, man_yes)\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
| \n", + " | man | \n", + "woman | \n", + "
|---|---|---|
| 0 | \n", + "480 | \n", + "520 | \n", + "
| 1 | \n", + "324 | \n", + "351 | \n", + "
| 2 | \n", + "156 | \n", + "169 | \n", + "