# Continuous and Mixed Random Variables

**Source:** probabilitycourse.com → Hossein Pishro-Nik  
**Date:** Monday January 26th

---

## What is a continuous random variable?

> A random variable $X$ is **continuous** if its cumulative distribution function $F_X(x)$ is continuous for $x \in \mathbb{R}$.

---

## Probability Density Functions

Continuous variables lend themselves to **Probability Density Functions** (PDFs). A PDF is defined as:

$$f_X(x) = \frac{dF_X(x)}{dx}$$

---

## Example: Uniform Distribution

**Consider** a uniform distribution of $x$ between $[a,b]$:

**CDF:**
$$F_X = \begin{cases} 0, & x < a \\ \frac{x-a}{b-a}, & a \leq x \leq b \\ 1, & x > b \end{cases}$$

**PDF:**
$$f_X = \begin{cases} 0, & x < a \\ \frac{1}{b-a}, & a \leq x \leq b \\ 0, & x > b \end{cases}$$

*Note: $F_X$ is a continuous S-curve from 0 to 1 between $a$ and $b$; $f_X$ is a rectangular function with height $\frac{1}{b-a}$ between $a$ and $b$.*

---

## Probability from PDF

Now that we've got some machinery, we can define:

$$P(x \in [a,b]) = \int_a^b f_X(x) \, dx$$
