You are on page 1of 19

Random Variables

1
Introduction
In many instances, one may be interested on
the effects/implications of outcomes of a
random variable.
Examples:
Gambling Games we may be interested in the
amount of money we expect to win rather than
just the probability of winning/loosing.

2
Introduction
Weather Forecasting we may be interested in
determining the amount of rainfall in the production of
crops rather than just the probability of rain.
Stock Markets we may be interested in the profits we
expect in addition to the probability that the price of a
particular stock would increase in a given trading day.

SUCH IMPLICATIONS OR EFFECTS MAY BE
QUANTIFIED USING THE NOTION OF A RANDOM
VARIABLE
3
Definition
A random variable is a rule (or a real-
valued function) defined over a sample
space of a given random experiment that
specifies how one assigns one and only
one real number to the outcomes of a
random experiment.
Usually denoted by uppercase letters
such as X, Y, Z, .
4
Example
RANDOM EXPT: Toss 2 coins
S={HH, HT, TH, TT}
Define X number of heads
X is a random variable! (why?)
5
6
S
HH

HT

TH

TT
9
Set of real-numbers
0


1


2 X
The assignment of one number
to each outcome in S is made
possible by the rule X. Thus, X is
a random variable.
Remarks
Because of the defn of a random variable,
there is/are corresponding outcomes in S (and
therefore are events) for every possible value
that the random variable assumes (X=x). Thus
X=x can be regarded as an event.
Because it is an event, then one can compute
P(X=x)
Note that (X=a) and (X=b) for all ab can be
regarded as mutually exclusive events.
7
Remarks
To illustrate, consider the previous
example (tossing two coins and X-number
of heads)
X=0 {TT} P(X=0)=P{TT}=1/4
X=1 {HT,TH} P(X=1)=P{HT,TH}=1/2
X=2 {HH} P(X=1)=P{HH}=1/4
These are mutually exclusive events.

8
Types of Random Variables
Random variables can be classified
based on the possible values it can
assume
DISCRETE if the possible values it
assumes is finite (countable) but not
necessarily integers/counting numbers.
CONTINUOUS if the possible values it
assumes is contained in a continuum (an
interval) and therefore the possible values
is infinite.
9
Example (Types)
RE: Toss 2 coins. X-number of heads. In here
X is discrete.
RE: Select a student in class. Y-weight (kg).
Possible values of Y can be contained in the
interval (55kg, 80kg). Therefore Y is
continuous.
RE: Select a student in class. Z-grade.
Possible values of Z are 0, 1, 1.5, 2, 2.5, 3, 3.5,
4. Finite and therefore Z is discrete.
10
Probability Distribution
A probability distribution can be defined
as the set of possible values that a
random variable can assume with their
corresponding probabilities.
For discrete random variables, the
probability distribution can be presented
in tabular, graphical (bar-charts) or
functional form.
11
Example: Probability
distribution of a discrete r.v.
RE: Toss 2 coins. X-number of heads
X=x 0 1 2
P(X=x) 0.25 0.50 0.25
12
TABULAR
0.25
0.50
1.00
P(X=x)
x
0 1 2
GRAPHICAL
2! 1
, 0,1, 2
( )
!(2 )! 2
0 , elsewhere
x
x
P X x
x x

| |
=

|
= =

\ .

FUNCTIONAL
Probability Distribution
For continuous random variables,
probability distribution can be presented
in either functional or graphical form
(curves)
13
Example: Probability
distribution of a continuous r.v.
14
2
1
2
1
, , , 0
( )
2
0 , elsewhere
x
e x
f x

o
o
o t
| |

|
\ .

< < + >


=

FUNCTIONAL
GRAPHICAL
Properties
For the discrete case,
P(X=x) > 0 for all x
E P(X=x) = 1 (sum taken for all possible values
of x)
For the continuous case
Total area under the curve is 1.
P(X=x)=0
P(a<X<b) total area under the curve bounded by
the lines X=a and X=b
15
Descriptive Measures
Mean or Expected Value of a Random
Variable


16

= = =
x all
x
x X P x X E

] [ ) (
Consider tossing 2 coins and X denotes
the number of heads.


( ) 0 ( 0) 1 ( 1) 2 ( 2)
(0)(1/ 4) (1)(1/ 2) (2)(1/ 4) 1
x
E X P X P X P X = = = + = + =
= + + =
Descriptive Measures
The average number of heads that will
turn up with repeated performance of the
random experiment.
It is possible that the computed value of
the mean of the r.v. X may not
correspond to any of the possible values
it can assume.
17
Descriptive Measures
Standard Deviation
18
2 2
( ) ( ) ( )
x x x
x
E X x P X x o = = =

Example
2 2 2
2 2 2
(0 1) ( 0) (1 1) ( 1) (2 1) ( 2)
( 1) (1/ 4) (0) (1/ 2) (1) (1/ 4)
1/ 2 0.71
x
P X P X P X o = = + = + =
= + +
= =
Descriptive Measures
This means that if the 2 coins are tossed
repeatedly, then the number of heads
turning up will deviate from 1 by 0.71 on
the average.
19

You might also like