## What is a random variable?

A **random variable** is a variable with an unknown value or a function that gives values to each of the results of an experiment. A random variable might be discrete (meaning it has definite values) or continuous (meaning it has no specific values) (any value in a continuous range).

**Discrete Random Variable:**A finite number of possible values for a discrete random variable. Each value of a discrete random variable has a probability between 0 and 1, and the sum of all probabilities equals 1.**Continuous Random Variable:**A continuous random variable takes on all of the values in a specific numerical interval. Continuous random variables are usually measurements. The amount of rainfall that will fall in June is an example of a continuous random variable.

## Example of Random Variable:

### Mean of Random Variable:

The mean of a discrete random variable is the weighted mean of the values. The formula is:

μx = x_{1}*p_{1} + x_{2}*p_{2} = Σ x_{i}p_{i}.

### The variance of Random Variable:

The formula for calculating the variance of a discrete random variable is:

*σ ^{2} = Σ(xi – μ)^{2}f(x)*

Note: This is also one of the AP Statistics formulas.

Σ (summation notation) means to “add everything up”,

μ = expected value,

xi = the value of the random variable,

f(x) is the probability (in function notation).

## Why are random variables important?

A random variable is a method that provides unpredictable results by assigning unique numerical values to the outcomes of a random experiment. A probability distribution gives each conceivable value of a random variable a probability.