renamed dir

This commit is contained in:
2026-06-04 19:49:16 -07:00
parent 77fd1312ef
commit e955e56c36
22 changed files with 279 additions and 111 deletions
@@ -1,51 +0,0 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "206bf674",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"\n",
"sns.set_theme(style=\"whitegrid\", context=\"notebook\")"
]
},
{
"cell_type": "markdown",
"id": "612bd02c",
"metadata": {},
"source": [
"# Chapter 4 Example Problems"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "roadmap (3.14.5)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -1,59 +0,0 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "c58309b2",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"\n",
"sns.set_theme(style=\"whitegrid\", context=\"notebook\")"
]
},
{
"cell_type": "markdown",
"id": "a6732353-51d5-4478-9cf8-5834e57e5a4e",
"metadata": {},
"source": [
"# Chapter 4 Notes"
]
},
{
"cell_type": "markdown",
"id": "9f0046c2",
"metadata": {},
"source": [
"## Continuous Random Variables and their Distributions (4.0.0 - 4.0.0)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "roadmap (3.14.5)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -4,7 +4,7 @@
total pages=1007
**Currently reading:** chapter 3, page 222
**Currently reading:** chapter 3, page 236
TODO:
@@ -13,3 +13,4 @@ TODO:
- 3.1.6 problems
- 3.2.5 problems
- ch3 end of chapter problems
- 4.1.4 problems
@@ -0,0 +1,101 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "206bf674",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"\n",
"sns.set_theme(style=\"whitegrid\", context=\"notebook\")"
]
},
{
"cell_type": "markdown",
"id": "612bd02c",
"metadata": {},
"source": [
"# Chapter 4 Example Problems"
]
},
{
"cell_type": "markdown",
"id": "5ce47b88",
"metadata": {},
"source": [
"4.2 \n",
"\n",
"a. \n",
"\n",
"$\\int_{-\\infty}^{\\infty}f_X(u)du = 1$\n",
"\n",
"ie\n",
"\n",
"\\begin{align*}\n",
"\\int_{-\\infty}^{0^+}f_X(u)du + \\int_{0}^{\\infty}f_X(x)dx = 1 \\\\\n",
"0 + \\int_{0}^{\\infty}ce^{-x}dx = 1 \\\\\n",
"c\\cdot\\lim_{t \\to \\infty }\\int_{0}^{t}e^{-x}dx = 1 \\\\\n",
"c\\cdot\\lim_{t \\to \\infty } [-e^{-x}]_0^t = 1 \\\\\n",
"c\\cdot\\lim_{t \\to \\infty } ((-e^{-t}) - (-e^{-0})) = 1 \\\\\n",
"c\\cdot\\lim_{t \\to \\infty } (-e^{-t} + 1) = 1 \\\\\n",
"c\\cdot 1 = 1 \\\\\n",
"c = 1\n",
"\\end{align*}\n",
"\n",
"b.\n",
"\n",
"Note that\n",
"\n",
"$$F_X(x) = \\int_{-\\infty}^x f_X(u)du$$\n",
"\n",
"and $c=1$\n",
"\n",
"so\n",
"\n",
"\\begin{align*}\n",
"F_X(x) = \\begin{cases} \n",
"1-e^{-x} & \\text{for } x \\geq 0 \\\\ \n",
"0 & \\text{otherwise} \n",
"\\end{cases}\n",
"\\end{align*}\n",
"\n",
"c. $F_X(3) - F_X(1) = $"
]
},
{
"cell_type": "markdown",
"id": "95a3b21c",
"metadata": {},
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "roadmap (3.14.5)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
@@ -0,0 +1,176 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"id": "c58309b2",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import sys\n",
"\n",
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"\n",
"sns.set_theme(style=\"whitegrid\", context=\"notebook\")"
]
},
{
"cell_type": "markdown",
"id": "a6732353-51d5-4478-9cf8-5834e57e5a4e",
"metadata": {},
"source": [
"# Chapter 4 Notes"
]
},
{
"cell_type": "markdown",
"id": "9f0046c2",
"metadata": {},
"source": [
"## Continuous Random Variables and their Distributions (4.1.0)"
]
},
{
"cell_type": "markdown",
"id": "ea9b1f96",
"metadata": {},
"source": [
"***Definition*** A random variable $X$ with CDF $F_X(x)$ is said to be continuous if $F_X(x)$ is a continuous for all $x \\in \\mathbb{R}$"
]
},
{
"cell_type": "markdown",
"id": "a96da4d3",
"metadata": {},
"source": [
"## Probability Density Function (PDF) (4.1.1)"
]
},
{
"cell_type": "markdown",
"id": "c62129a5",
"metadata": {},
"source": [
"***Definition*** Consider a continuous random variable $X$ with an absolutely continuous CDF $F_X(x)$. The function $f_X(x)$ defined by\n",
"\n",
"$$f_X(x) = \\frac{dF_X(x)}{dx} = F'_X(x) \\quad \\text{if } F_X(x) \\text{ is differentiable at } x$$\n",
" \n",
"is called the probability density function (PDF) of $X$."
]
},
{
"cell_type": "markdown",
"id": "df411869",
"metadata": {},
"source": [
"NOTE: The PDF being constant implies uniformity\n",
"\n",
"NOTE: For small values of $\\delta$,\n",
"\n",
"$$P(x \\lt X \\leq x + \\delta) \\approx f_X(x)\\delta$$\n",
"\n",
"Thus if $f_X(x_1) \\gt f_X(x_2)$, we can say $P(x_1 \\lt X \\leq x_1 + \\delta) \\gt P(x_2 \\lt X \\leq x_2 + \\delta)$, ie the value of $X$ is more likely to be around $x_1$ then $x_2$\n",
"\n",
"NOTE: The CDF can be obtained from the PDF via (assuming absolute continuity)\n",
"\n",
"$$F_X(x) = \\int_{-\\infty}^x f_X(u)du$$"
]
},
{
"cell_type": "markdown",
"id": "f29a3bfb",
"metadata": {},
"source": [
"***Properties*** Consider a continuous random variable $X$ with PDF $f_X(x)$. We have\n",
"- $f_X(x) \\geq 0, \\forall x \\in \\mathbb{R}$\n",
"- $\\int_{-\\infty}^{\\infty}f_X(u)du = 1$\n",
"- $P(a \\lt X \\leq b) = F_X(b) - F_X(a) = \\int_a^bf_X(u)du$\n",
"- For a set $A$, $P(X \\in A) = \\int_Af_X(u)du$. However, set $A$ must satisfy:"
]
},
{
"cell_type": "markdown",
"id": "6f546fed",
"metadata": {},
"source": [
"***Definition*** If $X$ is a continuous random variable, we can write the range of $X$ as\n",
"\n",
"$$R_X = \\{ x \\mid f_X(x) \\gt 0 \\}$$"
]
},
{
"cell_type": "markdown",
"id": "170db3a0",
"metadata": {},
"source": [
"***Property*** The expected value if a continuous random variable $X$ is\n",
"\n",
"$$E[X] = \\int_{-\\infty}^{\\infty}xf_X(x)dx$$"
]
},
{
"cell_type": "markdown",
"id": "deccea51",
"metadata": {},
"source": [
"***Property*** Law of the unconscious statistician (LOTUS) for continuous random variables\n",
"\n",
"$$E[g(X)] = \\int_{-\\infty}^{\\infty}g(x)f_X(x)dx$$\n"
]
},
{
"cell_type": "markdown",
"id": "c0a20195",
"metadata": {},
"source": [
"***Property*** Variance for a continuous random variable $X$, we can write\n",
"\n",
"\\begin{align*}\n",
"\\text{Var}(X) &= E[(X - E[x])^2] = \\int_{-\\infty}^{\\infty}(x - E[X])^2f_X(x)dx \\\\\n",
"&= E[X^2] - E[X]^2 = \\int_{-\\infty}^{\\infty}x^2f_X(x)dx - E[X]^2\n",
"\\end{align*}"
]
},
{
"cell_type": "markdown",
"id": "6f2f6b72",
"metadata": {},
"source": [
"## Functions of Continuous Random Variables"
]
},
{
"cell_type": "markdown",
"id": "f4a95738",
"metadata": {},
"source": [
"***Theorem***"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "roadmap (3.14.5)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.14.5"
}
},
"nbformat": 4,
"nbformat_minor": 5
}