diff --git a/your-code/main.ipynb b/your-code/main.ipynb index b8b7a9c..accc7cf 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -24,7 +24,19 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "The first statement is False:\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", + "\n", + "The second statement is True.\n", + "\n", + "The third statement is False.\n", + "\n", + "The fourth statement is False\n", + "\n", + "The fifth statement is True.\n", + "\n", "\"\"\"" ] }, @@ -49,7 +61,13 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "Taking a white ball out: 10/30 = 1/3\n", + "\n", + "Taking a white ball out after taking a black ball out: 10/29\n", + "\n", + "Taking a red ball out after taking a black and a red ball out: 11/28\n", + "\n", + "Taking a red ball out after taking a black and a red ball out with reposition: 12/30\n", "\"\"\"" ] }, @@ -75,7 +93,11 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "P(A|B) = (P(B|A) * P(A)) / P(B)\n", + " = 0.50 * 0.10 / 0.40\n", + " = 0.125 = 12.5%\n", + "\n", + "12.5%\n", "\"\"\"" ] }, @@ -102,28 +124,105 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ - "# your code here" + "import pandas as pd" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 7, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/html": [ + "
| \n", + " | men | \n", + "women | \n", + "
|---|---|---|
| yes | \n", + "324 | \n", + "351 | \n", + "
| no | \n", + "156 | \n", + "169 | \n", + "