Table of Contents

# Random Variable

By a random variable, we mean a real number x connected with the outcome of a random experiment. Random variables are of two types: discrete random variable and continuous random variable.

Let us first learn about the mathematical definition of random variable.

## Definition:

**Let E be random variable and S be the event space of E. let T be the class of subsets of S forming the class of all events connected to E. A mapping X of S to R is called a random variable or a stochastic variable or a variate, if for any xϵ R, the set**

**{ω: -∞ < X(ω)<=x, ω ϵ S} ϵT**

I select at random a student from the class and measure his or her height in centimeters.

Here, the sample space is the set of students; the random variable is ‘height’, which is a function from the set of students to the real numbers: h(S) is the height of student S in centimetres. (Remember that a function is nothing but a rule for associating with each element of its domain set an element of its target or range set. Here the domain set is the sample space S, the set of students in the class, and the target space is the set of real numbers.)

Let us consider an experiment of tossing 3 coins, the sample space of the experiment is,

\[S=\{HHH,HHT,HTH,THH,HTT,THT,TTH,TTT\}\]

Let X be the function of real values of S and X(ω) = ‘number of Head’, ω ϵ S. Then X will be a random variable, where,

X(HHH)=3, X(HHT)=2, X(HTH)=2, X(THH)=2, X(HTT)=1, X(THT)=1, X(HHT)=2 and X(TTT)=0

Again, if we denote ω as the event of finding two Head then, ω = {HTH, THH, HHT} and X(ω) = 2

## Probability Distribution of random variable

**If the values of a random variable X are x _{1}, x_{2}, x_{3}, …, x_{n} and the probabilities of them are p_{1}, p_{2}, p_{3}, …, p_{n} respectively, then**

X: | x_{1} | x_{2} | x_{3} | … | x_{n} |

P(X): | p_{1} | p_{2} | p_{3} | … | p_{n} |

**This tabular representation is called Probability Distribution of random variable X**

In the above example 02 we saw,

P(X=0) = Probability of No Head = P(TTT) = 1/8

P(X=1) = Probability of one Head = P(HTT or THT or TTH) = 3/8

P(X=2) = Probability of two Head = P(HHT or THH of HTH) = 3/8

P(X=3) = Probability of three Head = P(HHH) = 1/8

Then the probability distribution of X is

X | 0 | 1 | 2 | 3 |

P(X) | 1/8 | 3/8 | 3/8 | 1/8 |

## Discrete Random Variable:

If a random variable takes at most a countable number of values, it is called a discrete random variable.

## Continuous Random Variable:

A random variable X is said to be continuous if it can take all possible real values between certain limits.