LUNAR
🌙
Dashboard
Browse
SW11_Notes
JUPYTER
View Source
{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Joint probabilities\n", "## Conditional probabilities\n", "\n", "- test, selection with replacement\n", "\n", "### Rules\n", "\n", "- $\\mathbb{P}(A|B) \\neq \\mathbb{P}(B|A)$\n", "\n", "- $\\mathbb{P}(A|B) = \\dfrac{\\mathbb{P}(A \\cap B)}{\\mathbb{P}(B)}$\n", "\n", "- $\\mathbb{P}(A_1 \\cap A_2|B) = \\mathbb{P}(A_1|B)+\\mathbb{P}(A_2|B)$ if $A_1 \\cap A_2 \\cap B = \\emptyset$\n", "\n", "- $\\mathbb{P}(\\bar{A}|B) = 1-\\mathbb{P}(A|B)$\n", "\n", "### Bayes' theorem\n", "Let A and B be events with $\\mathbb{P}(A) > 0$ and $\\mathbb{P}(B) > 0$. Then, between $\\mathbb{P}(A|B)$ and $\\mathbb{P}(B|A)$ there is the relationship:\n", "$$\\mathbb{P}(A|B) = \\dfrac{\\mathbb{P}(A \\cap B)}{\\mathbb{P}(B)} = \\dfrac{\\mathbb{P}(B|A)\\mathbb{P}(A)}{\\mathbb{P}(B)}$$\n", "\n", "Therefore:\n", "\n", "$$\\mathbb{P}(B|A) = \\dfrac{\\mathbb{P}(A \\cap B)}{\\mathbb{P}(A)} = \\dfrac{\\mathbb{P}(A|B)\\mathbb{P}(B)}{\\mathbb{P}(A)}$$\n", "\n", "Solving for $\\mathbb{P}(B)$:\n", "$$\\mathbb{P}(B) = \\mathbb{P}(B \\cap A)+\\mathbb{P}(B \\cap \\bar{A})$$\n", "\n", "\n", "## Unconditional probabilities\n", "\n", "- rolling dice\n", "\n", "When $B$ is a prerequisit:\n", "\n", "$\\mathbb{P}(A|B)= \\mathbb{P}(A)$\n", "\n", "### Prove if the space is conditional\n", "\n", "If $\\mathbb{P}(A \\cap B) \\neq \\mathbb{P}(A) \\cdot \\mathbb{P}(B)$, so we are in a unconditional space\n", "\n", "***\n", "# Probability trees\n", "\n", "\n", "\n", "***\n", "# Partition\n", "\n", "## Definition\n", "The subset $A_1,...,A_k$ of $\\Omega$ are called $\\textit{partition}$ of $\\Omega$ if the following is hold:\n", "1. $A_1 \\cup ... \\cup A_k = \\Omega$\n", "2. $\\forall i \\neq j,\\ A_i \\cap A_j = \\emptyset$\n", "\n", "## Law of total probability\n", "$\\forall A_1,...,A_k \\in \\Omega \\land \\forall B \\subseteq \\Omega$:\n", "\n", "$$\n", "\\begin{aligned}\n", "\\mathbb{P}(B) &= \\mathbb{P}(B|A_1)\\mathbb{P}(A_1) + \\dots + \\mathbb{P}(B|A_k)\\mathbb{P}(A_k) \\\\\n", "&= \\sum_{i} \\mathbb{P}(B|A_i)\\mathbb{P}(A_i)\n", "\\end{aligned}\n", "$$\n", "\n", "***\n", "# Stochastic indipendence\n", "Events $A,\\, B$ are called $\\textit{stochastically indipendent}$ if:\n", "$$\\mathbb{P}(A \\cap B) = \\mathbb{P}(A)\\mathbb{P}(B)$$" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 2 }