A variable in statistics is an unknown numerical quantity whose value cannot be known in advance but for whom various probabilities can be calculated.

For example, the value taken by the uppermost face of a die on being thrown is a variable but we know that there is a one out of six chance that a particular number appears on the uppermost face. Such variables are called random variables in statistics.

The variables that we encounter in probability are of two types: Discrete and Continuous

**Discrete Variables**

A variable is said to be a discrete variable if it takes either finite or countably infinite values. For example, the number appearing on the uppermost face of the die is a discrete variable because only finitely many values are possible (those values being 1,2,3,4,5 and 6).

Another example of a discrete variable is the number of people who are born per year because it can take countably infinite values. By countably infinite we mean that it is possible to “count” this quantity.

As opposed to a continuous variable, discrete variables take values in “steps” like 1,2,3,4,…… and hence it is possible to count them. Some examples of discrete variables are:

- The number on the uppermost face of the dice.
- Number of printing errors per page on a book.
- Number of customers arriving at a restaurant.

The probabilities associated with the discrete random variable are given by a probability mass function (pmf). Some famous examples of discrete distributions are binomial distribution, Poisson distribution, multinomial distribution, geometric distribution, etc.

**Continuous Variables**

A variable is said to be continuous if it takes uncountably infinite values, that is, it is not possible to “count” these quantities. These quantities do not occur in steps like 1,2,3,4…. and cannot usually be determined to accurate precision.

For example, height is a continuous variable because we can only determine the height of a person up to some decimal precision like 1.72m whereas the actual height might be something like 1.7222……so on.

Some examples of continuous variables are:

- Height of a person.
- Weight of a person.
- Time a customer waits in a bank queue.
- The lifetime of a bulb or any electronic device.

The probabilities associated with the continuous random variable are given by a probability density function (pdf). Some famous examples of continuous distributions are normal distribution, Cauchy distribution, Pareto distribution, Weibull distribution, etc.