Random Variable
Random Variable
Random Variable
A Random Variable is a function, which assigns unique numerical values to all possible
outcomes of a random experiment under fixed conditions.
Example 1
This example is extracted from (Ali 2000). Suppose that a coin is tossed three times and
the sequence of heads and tails is noted. The sample space for this experiment evaluates
to: S= {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}. Now let the random variable
X be the number of heads in three coin tosses. X assigns each outcome in S a number
from the set Sx= {0, 1, 2, and 3}. The table below lists the eight outcomes of S and the
corresponding values of X.
OutcomeHHHHHTHTHTHHHTTTHTTTHTTT
X 3 2 2 2 1 1 1 0
Table 1
The condition for a function to be a random variable is that the random variable cannot be
multivalued.
• Discrete
• Continuous
A discrete random variable is a countable set (e.g., the integers), with each value in
the range having probability greater than or equal to zero. For example, a coin is
tossed ten times. The random variable X is the number of tails that are noted. X can
only take the values 0, 1……. 10, so X is a discrete random variable.
A discrete random variable is one which may take on only a countable number of
distinct values such as 0,1,2,3,4………, discrete random numbers are usually (but not
necessary) count. If a random variable can take only a finite number of distinct values
then it must be discrete. Example of discrete random variable includes the number of
children in a family, the Friday night attendance in the cinema, the number of patient
in a doctor’s surgery.
Continuous random variable is an uncountable set (e.g., the real numbers). 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.
OR
A continuous random variable which can assume all possible values between certain limit
is called continuous random variable. A light bulb is burned until it burns out. The random
variable Y is its lifetime in hours. Y can take any positive real value, so Y is a continuous random
variable. Usually in a continuous random variable the probability of any specific value is
zero, although the probability of an infinite set of values (such as an interval of non-zero
length) may be positive. However, sometimes a continuous random variable can be
"mixed", having part of its probability spread out over an interval like a typical
continuous variable, and part of it concentrated on particular values, like a discrete
variable.
A random variable can also be used to describe the process of rolling a fair die and the
possible outcomes. The most obvious representation is to take the set {1, 2, 3, 4, 5, and
6} as the sample space, defining the random variable X as the number rolled. In this case,
An example of a continuous random variable would be one based on a spinner that can
choose a real number from the interval [0, 2π), with all values being "equally likely". In
this case, X = the number spun. Any real number has probability zero of being selected.
But a positive probability can be assigned to any range of values. For example, the
probability of choosing a number in [0, π] is ½. Instead of speaking of a probability mass
function, we say that the probability density of X is 1/2π. The probability of a subset of
[0, 2π) can be calculated by multiplying the measure of the set by 1/2π. In general, the
probability of a set for a given continuous random variable can be calculated by
integrating the density over the given set.
An example of a random variable of mixed type would be based on an experiment where
a coin is flipped and the spinner is spun only if the result of the coin toss is heads. If the
result is tails, X = −1; otherwise X = the value of the spinner as in the preceding example.
There is a probability of ½ that this random variable will have the value −1. Other ranges
of values would have half the probability of the last example.
Here we see that E(X) is the expected value of the random variable X.
The variance and standard deviation of a random variable are always non-negative.