Idea of Random Variable
Idea of Random Variable
Idea of Random Variable
• Or
• This variable X is called random variable.
• Random Variable changes its value depending on
what we get as an outcome of a random
experiment.
• Each value of a random variable is associated with
a probability.
• A random variable is a rule for assigning numbers
to the possible outcomes of an experiment.
Symbolically they are denoted by capital letters
such as X, Y, or Z with or without subscripts and
the values taken by them are denoted by x, y, or z.
Mathematical Definition
• Experiment ----> Outcome ----> Numerical
Value
▪ A random variable, X, maps the experimental
outcome to a real number.
▪ A random variable, X, is a numerical measure of
the outcomes of an experiment
▪ A random variable is a function that assigns a
numeric value to the outcomes of a random
experiment
▪ i.e., X : S →R,
• where S is the sample space, R is the real line (-∞, ∞).
Example
• Consider the random experiment of tossing two
coins
✓Sample space: S = {HH, HT, TH, TT}
✓X is number of Heads appeared
✓X is a random variable
✓X can take any value out of 0,1 and 2.
So,
➢ P(getting 1) = P(X=1) = 1/6
➢ P(X=2) =1/6,
➢ P(X=3) = 1/6,
➢ P(X=4) = 1/6,
➢ P(X=5) = 1/6,
➢ P(X=6) = 1/6
Example
• Consider the random experiment of tossing a
fair coin thrice.
✓Sample space
✓S={HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
✓X: no. of heads appearing in three tosses
✓X is a random variable.
✓X could be 0, 1, 2, or 3.
Corresponding probabilities
0.5
0.4
0.3
0.2
0.1
0
x=0 x=1 x=2
• Example:
• In throwing a die, X is the value that appeared
• X is a discrete random variable having the probability distribution
0.2
Probabilities
0.15
0.1
0.05
0
x=1 x=2 x=3 x=4 x=5 x=6
• Recall the first example where X is the random variable
denoting the gain and is given by
X 1 2 3 4 5 6 7
p(X) .05 .15 .15 .25 .20 .10 .10
3 / 4 if x = 100
• pmf of X is p ( x) =
1 / 4 if x = − 200
Expected gain of the person is
E(X) = (100)(3/4) + (-200)(1/4) = 25 Rupees
• E(a) = a
• E(aX) = aE(X)
• E(X+a)=E(X)+a
Example: Suppose X is a discrete random variable having
following probability distribution
x -2 -1 0 1
p(x) 0.4 k 0.2 0.3
Find E(X).
▪ Ans: -0.6
Example:The number of pizzas delivered to university students
each month is a random variable with following probability
distribution.
X 0 1 2 3
P(x) .1 .3 .4 .2
Determine the mean number of pizzas delivered to students each
Month
Ans: 1.7
Variance of a Discrete Random Variable
• The idea of center is not enough to summarize a
probability distribution.
• We need some idea of variability also.
• Variance of a random variable X is defined as
Var( X ) = 2
X
= E ( X − E( X ))
2
( ) − E( X )
=E X 2 2
3.1, 3.2, 3.4, 3.5, 3.9, 3.10, 3.11, 3.12, 3.16, 3.21, 3.31