A TON OF NEW TEXTBOOKS
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "43cc5069",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d706c044",
|
||||
"metadata": {},
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
+101
@@ -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
|
||||
}
|
||||
+176
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user