From c4ae1aa839e5dd6f03adaa4e0132ad580729d64b Mon Sep 17 00:00:00 2001 From: Fernando Carvalho Date: Mon, 15 May 2023 22:18:45 +0100 Subject: [PATCH] done --- your-code/main.ipynb | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/your-code/main.ipynb b/your-code/main.ipynb index b8b7a9c..c67bbfb 100644 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -24,7 +24,11 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "1.True\n", + "2.True\n", + "3.False 0.3\n", + "4.False 0.4\n", + "5.True 0.9\n", "\"\"\"" ] }, @@ -49,7 +53,10 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "1. 10/30\n", + "2. 10/29\n", + "3. 12/28\n", + "4. 12/30\n", "\"\"\"" ] }, @@ -75,7 +82,14 @@ "outputs": [], "source": [ "\"\"\"\n", - "your solution here\n", + "P(B|A)=0.5\n", + "P(A)=0.1\n", + "P(B)= P(B|A)xP(A)+P(B|notA)x P(notA)\n", + "P(B)= 0.5 x 0.1 + 0.4 x 0.9 = 0.41\n", + "\n", + "P(A|B) = P(B|A) * P(A) / P(B)\n", + "= 0.5 * 0.1 / 0.41\n", + "P()= 0.12\n", "\"\"\"" ] }, @@ -123,7 +137,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -137,7 +151,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.9.13" } }, "nbformat": 4,