<!--
.. title: Hassett, chapter 7: continuous random variables
.. date: 2025-07-02 Wed 06:02 UTC-05:00
.. description: notes on Hassett and Stewart, chapter 7
.. type: text
.. has_math: true
-->

{{% hassett_navigation %}}

[TOC]

# 7.1 Defining a continuous random variable

Calculus!  The probability density function $f(x)$ obeys 
$$
\begin{aligned} 
f(x) &≥ 0 \text{ everywhere} \\\\
\int f(x) \mathrm dx &=1\\\\
P(a≤X≤b) &= \int_a^b f(x)\mathrm dx
\end{aligned}
$$

The cumulative distribution function is
$$\begin{aligned} 
F(x)&=\int_{-\infty}^x f(x) \mathrm dx
\\\\
F'(x)&=f(x)
\end{aligned}$$

# 7.2 Mode, median, and percentiles

+ mode
  : This is where $f(x)$ has a maximum.
+ median
  : The solution to $F(x)=\frac 12$, a.k.a. the 50th percentile.

# 7.3 Mean and variance

In the continuum limit of the discrete expectation value
$$\begin{aligned} 
E[g(x)] &= \sum g(x) p(x)
\end{aligned}$$

the continuous expectation value is
$$\begin{aligned} 
E[g(x)] &= \int g(x) f(x)\mathrm dx
\end{aligned}$$

So we have
$$\begin{aligned} 
\text{linearity:}&&
    E(aX+b) &= aE(x)+b
\\\\
\end{aligned}$$

and, as expected, 
$$\begin{aligned} 
V(X) &= E(X^2) - (E(X))^2
\end {aligned}$$

And that's it! That's the chapter.
