{ "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 }