Discrete Random Variables and Variance
Discrete random variables are those that can take on a countable number of distinct values.
Variance of Discrete Random Variables
The variance of a discrete random variable X, denoted as Var(X), measures the spread of the values around the mean. It is defined as:
$$ Var(X) = E[(X - \mu)^2] $$
where $\mu = E(X)$ is the expected value or mean of X.
NoteAn alternative and often more convenient formula for calculating variance is:
$$ Var(X) = E(X^2) - [E(X)]^2 $$
This formula is particularly useful in practice as it often simplifies calculations.
Continuous Random Variables
Continuous random variables can take on any value within a given range. They are described by probability density functions (PDFs). In other words, the probability that $P(X=x) =f(x)$.
Probability Density Functions
A probability density function f(x) for a continuous random variable X has the following properties:
- $f(x) \geq 0$ for all x
- The total area under the curve of f(x) equals 1: $$ \int_{-\infty}^{\infty} f(x) dx = 1 $$
Unlike discrete probability mass functions, f(x) can take values greater than 1, as long as the total area under the curve is 1.
Piecewise Functions
PDFs can be defined piecewise, meaning different functions apply to different intervals of x.
ExampleA simple piecewise PDF might look like:
$f(x) = \begin{cases} 2x & \text{ for } 0 \leq x < 1 \\ 2-2x & \text{ for } 1 \leq x < 2 \ 0 & \text{otherwise} \end{cases}$
Measures of Central Tendency for Continuous Random Variables
Mode
The mode of a continuous random variable is the value at which the PDF reaches its maximum, which can be solved with differentiation.
Median
The median $m$ of a continuous random variable is defined as the value that divides the area under probability distribution into two equal halves:
$$ \int_{-\infty}^m f(x) dx = \frac{1}{2} $$