Skip to content
Go back

Exploring Random Variable

Edit page

Probability theory is a foundational element of statistics, data science, and numerous applied mathematics fields. At its core are mass functions, distribution functions, and density functions, which collectively describe the behavior of random variables. This article provides a comprehensive exploration of these functions, their properties, and their real-world applications.


1. Random Variables: An Introduction

A random variable is a numerical outcome of a random process or experiment, serving as a link between probabilistic concepts and real-world observations. Random variables are broadly classified into:

1.1 Discrete Random Variables

Discrete random variables take on a countable set of distinct values. For example, the number of heads obtained in a series of coin flips is a discrete random variable.

1.2 Continuous Random Variables

Continuous random variables can assume an infinite number of values within a given range. For instance, the height of individuals in a population is modeled as a continuous random variable.

To characterize random variables, three essential functions are used: the probability mass function (PMF), the cumulative distribution function (CDF), and the probability density function (PDF). These functions will be discussed in detail below.


2. Probability Mass Function (PMF)

The probability mass function (PMF) quantifies the probability of each possible value of a discrete random variable. It is defined as:

P(X=x)=fX(x),for xrange(X),P(X = x) = f_X(x),\quad \text{for } x \in \text{range}(X),

where:

2.1 Properties of the PMF

  1. Non-Negativity : fX(x)0\footnotesize \mathbf{f_X(x) \geq 0} for all x\footnotesize \mathbf{x}.
  2. Normalization: xRange(X)fX(x)=1\footnotesize \mathbf{\sum_{x \in \text{Range}(X)} f_X(x) = 1}.
  3. Support: The PMF is defined only for values within the range of X\footnotesize \mathbf{X}.

2.2 Example: Rolling a Die

Consider a fair six-sided die. The random variable X\footnotesize \mathbf{X} represents the outcome of the roll. The PMF is:

fX(x)={16,x{1,2,3,4,5,6},0,otherwise.f_X(x) = \begin{cases} \frac{1}{6}, & x \in \{1, 2, 3, 4, 5, 6\}, \\ 0, & \text{otherwise}. \end{cases}

3. Cumulative Distribution Function (CDF)

The cumulative distribution function (CDF) describes the probability that a random variable X\footnotesize \mathbf{X} is less than or equal to a certain value x\footnotesize \mathbf{x}. It is defined as:

FX(x)=P(Xx).F_X(x) = P(X \leq x).

3.1 CDF for Discrete Random Variables

FX(x)=txfX(t).F_X(x) = \sum_{t \leq x} f_X(t).

3.2 CDF for Continuous Random Variables

FX(x)=xfX(t)dt.F_X(x) = \int_{-\infty}^x f_X(t)\, dt.

3.3 Properties of the CDF

  1. Monotonicity: FX(x)\footnotesize \mathbf{F_X(x)} is a non-decreasing function.
  2. Limits: limxFX(x)=0\footnotesize \mathbf{\lim_{x \to -\infty} F_X(x) = 0} and limxFX(x)=1\footnotesize \mathbf{\lim_{x \to \infty} F_X(x) = 1}.
  3. Right-Continuity: The CDF is continuous from the right.

3.4 Example: Rolling a Die

For the six-sided die example, the CDF is:

FX(x)={0,x<1,16,1x<2,26,2x<3,36,3x<4,46,4x<5,56,5x<6,1,x6.F_X(x) = \begin{cases} 0, & x < 1, \\ \frac{1}{6}, & 1 \leq x < 2, \\ \frac{2}{6}, & 2 \leq x < 3, \\ \frac{3}{6}, & 3 \leq x < 4, \\ \frac{4}{6}, & 4 \leq x < 5, \\ \frac{5}{6}, & 5 \leq x < 6, \\ 1, & x \geq 6. \end{cases}

4. Probability Density Function (PDF)

The probability density function (PDF) describes the likelihood of a continuous random variable taking on a particular value. Unlike the PMF, the PDF does not give probabilities directly but instead indicates the density of probabilities across a range of values.

The relationship between the PDF fX(x)\footnotesize \mathbf{f_X(x)} and the CDF FX(x)\footnotesize \mathbf{F_X(x)} is:

FX(x)=xfX(t)dt,fX(x)=ddxFX(x).F_X(x) = \int_{-\infty}^x f_X(t)\, dt,\quad f_X(x) = \frac{d}{dx} F_X(x).

4.1 Properties of the PDF

  1. Non-Negativity: fX(x)0\footnotesize \mathbf{f_X(x) \geq 0} for all x\footnotesize \mathbf{x}.
  2. Normalization: fX(x)dx=1\footnotesize \mathbf{\int_{-\infty}^\infty f_X(x)\, dx = 1}.
  3. Support: The PDF is defined over the entire range of X\footnotesize \mathbf{X}.

4.2 Example: Uniform Distribution

Consider a random variable X\footnotesize \mathbf{X} uniformly distributed over [a,b]\footnotesize \mathbf{[a, b]}. The PDF is:

fX(x)={1ba,axb,0,otherwise.f_X(x) = \begin{cases} \frac{1}{b-a}, & a \leq x \leq b, \\ 0, & \text{otherwise}. \end{cases}

5. Relationships Between PMF, CDF, and PDF

The PMF, CDF, and PDF provide complementary perspectives on random variables.

5.1 Discrete Case

5.2 Continuous Case

5.3 Key Transitions


6. Moments and Expectation

Moments provide insights into the distribution of a random variable. Common moments include:

6.1 Expected Value (Mean)

6.2 Variance

Var(X)=E[(XE[X])2]=E[X2](E[X])2.\text{Var}(X) = E[(X - E[X])^2] = E[X^2] - (E[X])^2.

6.3 Higher-Order Moments


7. Real-World Applications

7.1 Discrete Random Variables

7.2 Continuous Random Variables

7.3 Combined Applications


Understanding mass, distribution, and density functions is essential for analyzing random variables. These functions form a framework for describing and interpreting random processes in both theoretical and practical contexts. By mastering these concepts, one gains a powerful toolset for exploring the stochastic nature of the world and applying probabilistic models across diverse fields.

Check out my full article on Medium


Edit page
Share this post on:

Previous Post
Introduction to Random Vectors
Next Post
Hypothesis and P-Value