Skip to main content

Random Variable

A random variable is a variable whose values depend on outcomes of a random process. It is a mathematical function that assigns a numerical value to each outcome in a sample space of a random experiment.

Definition

A random variable X\mathcal{X} is a function from the sample space Ω\Omega to the set of real numbers R\mathbb{R}:

X:ΩR \mathcal{X}: \Omega \rightarrow \mathbb{R}

Types of Random Variables:

  • Discrete Random Variable: Takes specific, discrete values.
    • Example: The number of heads when flipping a coin 10 times. You can get 0, 1, 2, ..., or 10 heads, but not 3.5 heads.
  • Continuous Random Variable: Takes on an infinite number of possible values.
    • Example: The time it takes to run a race. It could be 12.3 seconds, 12.31 seconds, 12.315 seconds, etc.