A random variable, usually written X, is a variable whose possible values are numerical outcomes of a random phenomenon. There are two types of random variables, discrete and continuous.
A random variable is a variable that contains the outcomes of a chance experiment. For example, suppose an experiment is to measure the arrivals of automobiles at a turnpike tollbooth during a 30-second period. The possible outcomes are: 0, 1, 2, ..., n cars. These numbers (0, 1, 2, ..., n) are the values of a random variable. Suppose another experiment is to measure the time between the completion of two tasks in a production line. The values will range from 0 to n seconds. These time measurements are the values of another random variable. The two categories of random variables are:
A random variable is a variable that can take on a set of values, where each value is associated with a specific probability. (Dawn Griffiths, 2008, p.202)
A random variable is a discrete random variable if the set of all possible values is at most a finite or a countably infinite number of possible values. In most statistical situations, discrete random variables produce values that are nonnegative whole numbers. For example, the outcome of tossing a die will be a discrete value of between 1 and 6. It is not possible for the outcome of a die toss to be 1.5.
A variable is discrete if it can only take on exactly one value.
It can be said that discrete random variables are usually generated from experiments in which things are counted as opposed to measured.
A discrete random variable is one which may take on only a countable number of distinct values such as 0, 1, 2, 3, and 4. Examples of discrete random variables include the number of children in a family, the Friday night attendance at a cinema, the number of patients in a doctor's surgery, the number of defective light bulbs in a box of ten.[1]
Continuous random variables take on values at every point over a given interval. Thus continuous random variables have no gaps or unassumed values.
A continuous random variable is one which takes an infinite number of possible values. Continuous random variables are usually measurements. Examples include height, weight, the amount of sugar in an orange, the time required to run a mile.