Skip to main content

Random Variables and Probability Distributions

Random Variables and Probability Distributions

  • Understand the concept of random variables.
  • Distinguish between discrete and continuous random variables.
  • Learn about probability mass functions (PMF) and probability density functions (PDF).
  • Calculate expected value, variance, and standard deviation.
  • Visualize probability distributions.

Definition of a Random Variable

A random variable is a function that assigns numerical values to each outcome in a sample space.

  • Discrete Random Variable: Takes countable values (e.g., number of heads in a coin flip).
  • Continuous Random Variable: Takes any value in a range (e.g., height, temperature).

Probability Mass Function (PMF) and Probability Density Function (PDF)

A probability distribution describes how probabilities are assigned to different values of a random variable.

Concept Discrete (PMF) Continuous (PDF)
Definition \( P(X = x) = f(x) \), probability of discrete values \( P(a \leq X \leq b) = \int_a^b f(x) \,dx \), probability over an interval
Probability Constraint \( \sum P(X = x) = 1 \) \( \int_{-\infty}^{\infty} f(x) \,dx = 1 \)

Expectation and Variance

The expected value (mean) of a random variable \( X \) is:

\[ E[X] = \sum x P(X = x) \quad \text{(Discrete)} \] \[ E[X] = \int x f(x) \,dx \quad \text{(Continuous)} \]

The variance measures the spread of the distribution:

\[ Var(X) = E[X^2] - (E[X])^2 \]

The standard deviation is the square root of the variance:

\[ \sigma_X = \sqrt{Var(X)} \]

Proof

By definition, variance is:

\[ Var(X) = E[(X - E[X])^2] \]

Expanding the squared term:

\[ Var(X) = E[X^2 - 2X E[X] + E[X]^2] \]

Using the linearity of expectation:

\[ Var(X) = E[X^2] - 2E[X]E[X] + E[X]^2 \]

Since \( E[X] \) is a constant:

\[ Var(X) = E[X^2] - (E[X])^2 \]

Visualization of Discrete vs Continuous Distributions

Examples

Example 1: A fair die is rolled. Define the random variable \( X \) as the outcome. Compute \( E[X] \).

Since all outcomes are equally likely:

\[ E[X] = 1\cdot \frac{1}{6} + 2\cdot \frac{1}{6} + 3\cdot \frac{1}{6} + 4\cdot \frac{1}{6} + 5\cdot \frac{1}{6} + 6\cdot \frac{1}{6} \] \[ = \frac{1+2+3+4+5+6}{6} = \frac{21}{6} = 3.5 \]

Exercises

  • Question 1: A coin is flipped three times. Let \( X \) be the number of heads. Find the PMF.
  • Question 2: The lifetime of a light bulb follows an exponential distribution with \( \lambda = 0.1 \). Compute \( E[X] \).
  • Question 3: A fair die is rolled. Compute \( Var(X) \).
  • Answer 1: \( P(X=0) = \frac{1}{8}, P(X=1) = \frac{3}{8}, P(X=2) = \frac{3}{8}, P(X=3) = \frac{1}{8} \).
  • Answer 2: \( E[X] = \frac{1}{\lambda} = 10 \).
  • Answer 3: \( Var(X) = \frac{35}{12} \).

This Week's Best Picks from Amazon

Please see more curated items that we picked from Amazon here .

Popular posts from this blog

Gaussian Elimination: A Step-by-Step Guide

Gaussian Elimination: A Step-by-Step Guide Gaussian Elimination is a systematic method for solving systems of linear equations. It works by transforming a given system into an equivalent one in row echelon form using a sequence of row operations. Once in this form, the system can be solved efficiently using back-substitution . What is Gaussian Elimination? Gaussian elimination consists of two main stages: Forward Elimination: Convert the system into an upper triangular form. Back-Substitution: Solve for unknowns starting from the last equation. Definition of a Pivot A pivot is the first nonzero entry in a row when moving from left to right. Pivots are used to eliminate the elements below them, transforming the system into an upper triangular form. Step-by-Step Example Consider the system of equations: \[ \begin{aligned} 2x + 3y - z &= 5 \\ 4x + y...

Singular Value Decomposition

Lesson Objectives ▼ Understand the concept of Singular Value Decomposition (SVD). Decompose a matrix into orthogonal matrices and singular values. Learn how to compute SVD step by step. Explore applications of SVD in data compression and machine learning. Lesson Outline ▼ Definition of SVD Computing SVD Step by Step Applications of SVD Examples Definition of Singular Value Decomposition The **Singular Value Decomposition (SVD)** of an \( m \times n \) matrix \( A \) is a factorization of the form: \[ A = U \Sigma V^T \] where: \( U \) is an \( m \times m \) orthogonal matrix (left singular vectors). \( \Sigma \) is an \( m \times n \) diagonal matrix with **singular values** on the diagonal. \( V \) is an \( n \times n \) orthogonal matrix (right singular vectors). Computing SVD Step by Step To compute \( A = U \Sigma V^T \): Find the eigenvalues and eige...

LU Decomposition

LU Decomposition: A Step-by-Step Guide LU Decomposition, also known as LU Factorization, is a method of decomposing a square matrix into two triangular matrices: a lower triangular matrix L and an upper triangular matrix U . This is useful for solving linear equations, computing determinants, and inverting matrices efficiently. What is LU Decomposition? LU Decomposition expresses a matrix A as: \[ A = LU \] where: L is a lower triangular matrix with ones on the diagonal. U is an upper triangular matrix. Step-by-Step Process Consider the matrix: \[ A = \begin{bmatrix} 2 & 3 & 1 \\ 4 & 7 & 3 \\ 6 & 18 & 5 \end{bmatrix} \] Step 1: Initialize L as an Identity Matrix Start with an identity matrix for \( L \): \[ L = \begin{bmatrix} 1 & 0 & 0 \\ 0 ...