MORE chapter 1 progress

This commit is contained in:
2026-05-25 23:13:21 -07:00
parent 3959b06668
commit c16372206c
3 changed files with 168 additions and 19 deletions
@@ -2,4 +2,4 @@
total pages=1007 total pages=1007
**Currently reading:** chapter 1, page 73 **Currently reading:** chapter 1, page 80
@@ -543,7 +543,7 @@
"id": "4790a1dc", "id": "4790a1dc",
"metadata": {}, "metadata": {},
"source": [ "source": [
"## Example 1.20\n", "### Example 1.20\n",
"\n", "\n",
"$S = [1:11]$\n", "$S = [1:11]$\n",
"\n", "\n",
@@ -560,23 +560,137 @@
"$P(A|B) = P(A) \\therefore A$ and $B$ are independent. \n" "$P(A|B) = P(A) \\therefore A$ and $B$ are independent. \n"
] ]
}, },
{
"cell_type": "markdown",
"id": "b16a508d",
"metadata": {},
"source": [
"### Example 1.21\n",
"\n",
"$P(HHHHT) = P(H)P(H)P(H)P(H)P(T) = \\frac{1}{2^5} = \\frac{1}{32}$"
]
},
{
"cell_type": "markdown",
"id": "08fe32c4",
"metadata": {},
"source": [
"### Example 1.22\n",
"\n",
"Number of plane rides over 20 years $= 20 \\cdot 20 = 400$\n",
"\n",
"Let $A_i$ be the flight businessman dies where $i \\in [1:401]$\n",
"\n",
"We want to find $P(A_1 \\cup A_2 \\cup A_3 \\cup \\dots \\cup A_{400})$\n",
"\n",
"\\begin{align*}\n",
"P(A_1 \\cup A_2 \\cup A_3 \\cup \\dots \\cup A_n) &= 1 - (1 - P(A_1))(1 - P(A_2))\\cdots(1 - P(A_{400})) \\\\\n",
"&= 1 - (1 - \\frac{1}{4\\cdot 10^6})^{400} \\\\\n",
"\\approx 10^{-4}\n",
"\\end{align*}"
]
},
{
"cell_type": "markdown",
"id": "42589434",
"metadata": {},
"source": [
"### Example 1.23\n",
"\n",
"a.\n",
"\n",
"What is the probability someone makes a shot in a round?\n",
"\n",
"Let $A$ be the event player 1 makes the shot, and $B$ the event player 2 makes the shot. \n",
"\n",
"\\begin{align*}\n",
"P(A \\cup B) &= 1 - (1 - P(A))(1 - P(B)) \\\\\n",
"&= 1 - (1 - p_1)(1 - p_2) \\\\\n",
"&= p_1 + p_2 - p_1p_2\n",
"\\end{align*}\n",
"\n",
"What is the probability nobody makes a shot in a round?\n",
"\n",
"$$P((A \\cup B)^c) = 1 - p_1 - p_2 + p_1p_2 = 1 - (1 - p_1)(1 - p_2)$$\n",
"\n",
"What is the probability player one wins in the first round?\n",
"\n",
"$$P(W_1(1)) = p_1$$\n",
"\n",
"What is the probability player one wins in the second round?\n",
"\n",
"\\begin{align*}\n",
"P(W_1(2)) = P(R_1(1)) + P(R_1(2)) \\\\\n",
"= p_1 + P((A \\cup B)^c)p_1 \\\\\n",
"= p_1 + (1 - (1 - p_1)(1 - p_2))p_1\n",
"\\end{align*}\n",
"\n",
"What is the probability player one wins in the third round?\n",
"\n",
"\\begin{align*}\n",
"P(W_1(3)) = P(R_1(1)) + P(R_1(2)) + P(R_1(3)) \\\\\n",
"= p_1 + P((A \\cup B)^c)p_1 + P((A \\cup B)^c)P((A \\cup B)^c)p_1 \\\\\n",
"\\end{align*}\n",
"\n",
"What is the probability player one wins on round $n$?\n",
"\n",
"\\begin{align*}\n",
"P(W_1(n)) = P(R_1(1)) + P(R_1(2)) + P(R_1(3)) + \\dots + P(R_1(n)) \\\\\n",
"= p_1 + P((A \\cup B)^c)p_1 + P((A \\cup B)^c)P((A \\cup B)^c)p_1 + \\dots + P((A \\cup B)^c)^np_1 \\\\\n",
"= p_1 + (1 - p_1 - p_2 + p_1p_2)p_1 + (1 - p_1 - p_2 + p_1p_2)^2p_1 + \\dots + (1 - p_1 - p_2 + p_1p_2)^np_1 \\\\\n",
"= p_1 (1 + (1 - p_1 - p_2 + p_1p_2) + (1 - p_1 - p_2 + p_1p_2)^2 + \\dots + (1 - p_1 - p_2 + p_1p_2)^n) \n",
"\\end{align*}\n",
"\n",
"Let $x = 1 - p_1 - p_2 + p_1p_2$, substitute for \n",
"\n",
"\\begin{align*}\n",
"P(W_1(n)) = p_1 (1 + x + x^2 + \\dots + x^n) \n",
"\\end{align*}\n",
"\n",
"Notice that $|x| \\lt 1$. Proof\n",
"\n",
"$$x = 1 - p_1 - p_2 + p_1p_2 = (1 - p_1)(1 - p_2)$$\n",
"\n",
"Since $0<p_1,p_2<1$, we have\n",
"\n",
"$0 < (1 - p_1) < 1$ and $0 < (1 - p_2) < 1$ which implies $0 < (1 - p_1)(1 - p_2) < 1$ so $0 < x < 1$ which implies $|x| < 1$\n",
"\n",
"Now we consider \n",
"\n",
"\\begin{align*}\n",
"P(W_1) &= p_1 \\cdot \\lim_{n \\to \\infty} (1 + x + x^2 + \\dots + x^n) \\\\\n",
"&= p_1 \\cdot (\\frac{1}{1 - x}) \\\\\n",
"&= p_1 \\cdot (\\frac{1}{1 - (1 - p_1 - p_2 + p_1p_2)}) \\\\\n",
"&= \\frac{p_1}{p_1 + p_2 - p_1p_2} \\\\\n",
"\\end{align*}\n",
"\n",
"b.\n",
"\n",
"If $P(W_1) = \\frac{1}{2}$, find the values of $p_1$ and $p_2$.\n",
"\n",
"\\begin{align*}\n",
"P(W_1) &= \\frac{1}{2} \\\\\n",
"\\frac{p_1}{p_1 + p_2 - p_1p_2} &= \\frac{1}{2} \\\\\n",
"2p_1 &= p_1 + p_2 - p_1p_2 \\\\\n",
"0 &= p_1 + p_2 - p_1p_2 - 2p_1 \\\\\n",
"0 &= p_2 - p_1p_2 - p_1 \\\\\n",
"\\end{align*}\n",
"\n",
"In terms of $p_1$\n",
"\n",
"$$p_2 = \\frac{p_1}{1 - p_1}$$\n",
"\n",
"In terms of $p_2$\n",
"\n",
"$$p_1 = \\frac{p_2}{1 + p_2}$$"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
"id": "ef40221f", "id": "d283ef80",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"0.8559987631416203"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [] "source": []
} }
], ],
@@ -23,7 +23,7 @@
"id": "612bd02c", "id": "612bd02c",
"metadata": {}, "metadata": {},
"source": [ "source": [
"# Summary of Introduction to Probability, Statistics, and Random Processes (Hossein Pishro-Nik) chapter 1" "# Chapter 1 Summary"
] ]
}, },
{ {
@@ -99,11 +99,46 @@
"- $P(A \\cup B|C) = P(A|C) + P(B|C) - P(A \\cap B|C)$\n", "- $P(A \\cup B|C) = P(A|C) + P(B|C) - P(A \\cap B|C)$\n",
"- if $A \\subset B$ then $P(A|C) \\leq P(B|C)$\n", "- if $A \\subset B$ then $P(A|C) \\leq P(B|C)$\n",
"\n", "\n",
"![](./public/conditional_prob_tree.png)\n", "![](../public/conditional_prob_tree.png)"
"\n", ]
},
{
"cell_type": "markdown",
"id": "188a8fc2",
"metadata": {},
"source": [
"## Independence (1.4.1)\n", "## Independence (1.4.1)\n",
"\n", "\n",
"**Definition.** Two events $A$ and $B$ are *independent* if $P(A \\cap B) = P(A)P(B)$. AKA $P(A|B) = P(A)$" "**Definition.** Two events $A$ and $B$ are *independent* if $P(A \\cap B) = P(A)P(B)$. AKA $P(A|B) = P(A)$\n",
"\n",
"**Definition.** Three events $A, B,$ and $C$ are independent if **all** of the following conditions hold:\n",
"- $P(A \\cap B) = P(A)P(B)$\n",
"- $P(A \\cap C) = P(A)P(C)$\n",
"- $P(B \\cap C) = P(B)P(C)$\n",
"- $P(A \\cap B \\cap C) = P(A)P(B)P(C)$\n",
"\n",
"**Definition.** $N$ events $A_1, A_2, A_3, \\dots, A_n$ are independent if **all** the following conditions holds:\n",
"- $P(A_i \\cap B_j) = P(A_i)P(A_j)$\n",
"- $P(A_i \\cap A_j \\cap A_k) = P(A_i)P(A_j)P(A_k)$ where $i \\in [1:n+1]$, $j \\in [i:n+1]$, $k \\in [j:n+1]$\n",
"- $\\dots$\n",
"- $P(A_1 \\cap A_2 \\cap A_3 \\cap \\dots \\cap A_n) = \\prod_{i=1}^nP(A_i)$\n",
"\n",
"**Lemma.** \\\n",
"If $A$ and $B$ are independent then\n",
"- $A$ and $B^c$ are independent\n",
"- $A^c$ and $B$ are independent\n",
"- $A^c$ and $B^c$ are independent\n",
"\n",
"**Definition.** If $A_1, A_2, \\dots, A_n$ are independent then\n",
"$$P(A_1 \\cup A_2 \\cup \\dots \\cup A_n) = 1 - (1 - P(A_1))(1 - P(A_2))\\dots(1 - P(A_n))$$"
]
},
{
"cell_type": "markdown",
"id": "c33df800",
"metadata": {},
"source": [
"\n"
] ]
} }
], ],