diff --git a/your-code/main.ipynb b/your-code/main.ipynb index b8b7a9c..5b495fd 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -24,7 +24,21 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "P(A U B) = P(A) + P(B) - P(A & B)\n", + " = 0.3 + 0.6 - 0.1\n", + " = 0.8\n", + "The first staement is false.\n", + "\n", + "The second statement is true (based on venn diagram.)\n", + "\n", + "The third statement is False (= 0.3)\n", + " - The union of B and Bc is everything. So the P(A & everything) is P(A)\n", + " \n", + "The fourth statement is false (= 0.2, based on veen diagram).\n", + "\n", + "The fifth statement is true (1 - P(A & B) = 0.9)\n", + "\n", + "\n", "\"\"\"" ] }, @@ -49,7 +63,27 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "Total balls = 30\n", + "\n", + "P(white ball) = 10/30 = 1/3\n", + "\n", + "P(white ball after black) = 10/29\n", + "\n", + "P(red ball after black and red) = 11/28\n", + "\n", + "P(red ball with reposition) = 12/30\n", + "\n", + "\n", + "If we were meant to calculate both probabilities:\n", + "\n", + "P(white ball) = 10/30 = 1/3\n", + "\n", + "P(white ball after black) = 8/30 * 10/29\n", + "\n", + "P(red ball after black and red) = 11/28 * 8/29 * 12/30\n", + "\n", + "P(red ball with reposition) = 12/30 * 8/30 * 12/30\n", + "\n", "\"\"\"" ] }, @@ -75,7 +109,17 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "P(C|R) = 0.5\n", + "P(R) = 0.1\n", + "P(C) = 0.4\n", + "\n", + "We want to know P(R|C)\n", + "\n", + "P(C & R) = 0.5 * 0.1 = 0.05\n", + "\n", + "P(R|C) = P(C & R) / P(C)\n", + " = 0.05/0.4\n", + " = 0.125\n", "\"\"\"" ] }, @@ -101,12 +145,12 @@ ] }, { - "cell_type": "code", - "execution_count": null, + "attachments": {}, + "cell_type": "markdown", "metadata": {}, - "outputs": [], "source": [ - "# your code here" + "480 men = 324 yes | 156 no\n", + "520 women = 351 yes | 169 no" ] }, { @@ -116,7 +160,7 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "It seems that they care in the same proportion about street lighting independently of their genitals\n", "\"\"\"" ] }