Apex Vision AI

Your Genius Study Assistant

Definition A random variable is a function that assigns a numerical value to each outcome in a sample space of a random experiment. It provides a way to quantify uncertain outcomes. There are two main types: Discrete random variable: Takes on a countable set of values (e.g., number of heads in coin tosses).

Statistics

What is a random variable in statistics?

Definition

A random variable is a function that assigns a numerical value to each outcome in a sample space of a random experiment. It provides a way to quantify uncertain outcomes. There are two main types:

  • Discrete random variable: Takes on a countable set of values (e.g., number of heads in coin tosses).
  • Continuous random variable: Takes on values from an interval or collection of intervals (e.g., height, weight).
  • Mathematically, if $S$ is the sample space, a random variable $X$ is a function $X: S \to mathbb{R}$.


    Worked Example

    Example: Suppose you toss a fair coin twice. Let $X$ be the random variable representing the number of heads observed.

    Step 1: List the sample space

    The possible outcomes are:

  • HH
  • HT
  • TH
  • TT
  • Step 2: Assign values of $X$

  • $X(\text{HH}) = 2$
  • $X(\text{HT}) = 1$
  • $X(\text{TH}) = 1$
  • $X(\text{TT}) = 0$
  • Step 3: Find the probability distribution of $X$

  • $P(X = 0) = P(\text{TT}) = \frac{1}{4}$
  • $P(X = 1) = P(\text{HT}) + P(\text{TH}) = \frac{1}{4} + \frac{1}{4} = \frac{1}{2}$
  • $P(X = 2) = P(\text{HH}) = \frac{1}{4}$
  • So, the probability distribution is:

    \[\begin{array}{c|c} x & P(X = x) \\ hline 0 & \frac{1}{4} \\ 1 & \frac{1}{2} \\ 2 & \frac{1}{4} \\ \end{array}\]


    Takeaways

  • A random variable maps outcomes of a random process to numbers.
  • It can be discrete (countable values) or continuous (any value in an interval).
  • Random variables allow us to analyze and compute probabilities for numerical outcomes.
W

Walsh Pex

Walsh Pex is an educational technology specialist with over 8 years of experience helping students overcome academic challenges. He has worked with thousands of students across all education levels and specializes in developing AI-powered learning solutions that improve student outcomes.

Verified Expert
Last updated: January 21, 2026

Need More Help?

Get instant AI-powered answers for any homework question with ApexVision AI

Try ApexVision Free →