Sei sulla pagina 1di 8

Introduction to Random Variables

The set of all possible outcomes of an experiment is called the sample space and is
denoted by . A random variable is a function X : , where is the real line.
Uppercase letters will be used to represent generic random variables, whilst lowercase
letters will be used to represent possible numerical values of these variables. To describe
the probability of possible values of X, consider the following definition.
The distribution function of a random variable X is the function FX : [0, ! given by
FX"x# $ P"X x).
%"&'# $ 0
%"'#$ and %"a# ($ %"b# for all a ($b.
Discrete random variables
The random variable X is discrete if it ta)es values in some countable subset *x, x+, ,-,
only, of . The distribution function of such a random variable has .ump discontinuities
at the values x, x+, , and is constant in between.
The function given by FX"x# $ P"X $ x# is called the "probability# mass function of X.
The mean value, or expectation, or expected value of X with mass function fX, is defined
to be
"#
The expected value of X is often written as .
/t is often of great interest to measure the extent to which a random variable X is
dispersed. The variance of X or 0ar"X# is defined as follows:
0ariance is the variation from mean
"+#
The variance of X is often written as
+
, while its positive s1uare root is called the
standard deviation. 2ince X is discrete, "+# can be re&expressed accordingly:
"3#
/n the special case where the mass function fX"x# is constant and X ta)es n real values, "3#
reduces to a well )nown e1uation determining the variance of a set of n numbers:
"4#
5vents A and B are said to be independent if and only if the incidence of A does not
change the probability of B occurring. An e1uivalent statement is P"A B# $ P"A#P"B#.
2imilarly, the discrete random variables X and Y are called independent if the numerical
value of X does not affect the distribution of Y. /n other words, the events *X $ x- and *Y
$ y- are independent for all x and y. The joint distribution function FX, Y :
+
[0, ! of
X and Y is given by FX, Y"x, y# $ P"X x and 6 y#. Their joint mass function fX, Y :
+

[0, ! is given by fX, 6"x, y# $ P"X $ x and Y $ y#. X and Y are independent if and only if fX,
Y"x, y# $ fX"x#fY"y# for all x, y .
7onsider an archer, shooting arrows at the target shown in %igure . 2uppose the archer is
a very poor shot and hits the target randomly & in other words, target regions of e1ual area
will have the same probability of being hit. %or simplicity, it is assumed the archer always
hits the target. /f the archer is allowed to fire two arrows, the sample space
$ * AA, A8, A7, A9, A5, 8A, 88, ,, 99, 95, 5A, 58, 57, 59, 55 -.
Figure 1: An archery target. A hit in region A scores 4 points, 8 scores 3 points, 7 scores
+ points, 9 scores point and 5 scores nothing.
:et the variable X"# represent the score of a particular outcome. The scoring guidelines
outlined in %igure imply
X"AA# $ ;, X"A8# $ X"8A# $ <, X"A7# $ X"88# $ X"7A# $ =, ,,
X"75# $ X"99# $ X"57# $ +, X"95# $ X"59# $ , X"55# $ 0.
7learly X is a discrete random variable, mapping the sample space to scores "real
numbers#.
The probability that an arrow hits a target region is directly proportional to the area of the
region. The regions A to 5 are annuli with inner and outer radii as shown in %igure . The
probabilities of hitting A to 5 are >+?, 3>+?, ?>+?, <>+? and @>+? respectively. The mass
function of X, fX"x#, is then
fX"0# $ P"X $ 0# $ P"Ait 5#P"Ait 5# $ ;>=+?,
fX"# $ P"X $ # $ + . P"Ait 9#P"Ait 5# $ +=>=+?,
fX"+# $ P"X $ +# $ + . P"Ait 7#P"Ait 5# B P"Ait 9#P"Ait 9# $ 3@>=+? and so on.
%rom "#, the expected value of X is E"X# $ 0.;>=+? B .+=>=+? B +.3@>=+? B
3.+4>=+? B , $ +.4. %rom "3#, the variance of X is 0ar"X# $ "+.4
+
#;>=+? B
".4
+
#+=>=+? B "0.4
+
#3@>=+? B "0.=
+
#+4>=+? B , $ +.<+. The distribution function of
X, FX"x#, is then
FX"0# $ P"X 0# $ fX"0#,
FX"# $ P"X # $ fX"# B fX"0#,
FX"+# $ P"X +# $ fX"+# B fX"# B fX"0# and so on.
The distribution function FX"x# is shown in %igure +.
Figure 2: The distribution function FX of X for the archery target.
Continuous random variables
The random variable X is continuous if its distribution function can be expressed as
"?#
for some integrable function fX : [0, #. /n this case, fX is called the "probability#
density function of X. The fundamental theorem of calculus and "?# imply
Joint distributions (Results are so!n "or discrete random variables# but te$
old "or continuous random variables as !ell%
%or a pair of discrete random variables, the .oint probability mass function can be written
as Cr"X $ x D Y $ y#. This is
2ince these are probabilities, we have
Joint distribution o" inde&endent variables
/f for discrete random variables
for all x and y, then E and 6 are
independent.
E'am&le
:et us consider the random variables associated to color blindness and gender "associate
0 if male, if female#, we can tabulate the probabilities of all 4 possible pairs of
outcomes as:
2o that from this table of .oint distribution we read:
/n general, when we build the .oint distribution of two random variables we can ma)e
such a two&way table, of course, for more variables this is impossible to draw on paper.
The row&sums and column&sums produce the complete distribution functions for the
individual random variables, they are called the marginal probabilities, here for instance
we have:
/n general, given the .oint distribution on the pairs "x,y# for two random variables X and
Y: P"x,y# we have the marginal distributions
(ome general results
Pro&ert$ 1
%or some constant c and random variable X,
E"cX# $ cE"X#. "#
Proof:
for X discrete
for X continuous
Pro&ert$ 2
%or discrete or continuous random variables X and Y,
E"X B Y# $ E"X# B E"Y#. "+#
Proof:
2uppose X and Y have .oint mass function fX,Y :
+
[0, ! given by fX,Y"x, y# $ P"X $ x
and Y $ y#. Then, for X and Y discrete, an extension of Cart &"# gives
for X and Y continuous the proof begins
where fX,Y"x, y# :
+
[0, # is the .oint density function of X and Y. The proof then
proceeds in a similar way to the discrete case with summations replaced by integrations.
Pro&ert$ )
%or discrete or continuous independent random variables X and Y,
E"XY# $ E"X#E"Y# "3#
Proof:
The proof of "3# is first presented for discrete random variables X and Y. :et X and Y have
.oint mass function fX,Y"x, y# :
+
[0, ! given by fX,Y $ P"X $ x and Y $ y#. /f X and Y
are independent, then "by definition# the probability of Y occurring is not affected by the
occurrence or non&occurrence of X. %or X and Y independent,
P"X $ x and Y $ y# $ P""X $ x# "Y $ y## $ P"X $ x#P"Y $ y#,
so that fX,Y"x, y# $ fX"x#fY"y#. Therefore,
%or X and Y continuous, the proof begins
where fX,Y :
+
[0, # is the .oint density function of X and Y. The proof then proceeds
in a similar way to the discrete case with summations replaced by integrations.
Pro&ert$ *
%or the discrete or continuous random variable X,
"4#
Proof:
The proof of "4# holds for X discrete or continuous. As a shorthand notation, let $ E"X#.
Then,
Pro&ert$ +
%or the discrete or continuous random variable X and the constant c ,
0ar"cX# $ c
+
0ar"X#. "?#
Proof:
The proof of "?# holds for X discrete or continuous. Again, let $ E"X#. Then,
0ar"cX# $ E""cX & c#
+
# $ E"c
+
"X & #
+
# $ c
+
E""X & #
+
# $ c
+
0ar"X#.
Pro&ert$ ,
%or discrete or continuous independent random variables X and Y,
0ar"X B Y# $ 0ar"X# B 0ar"Y#. "=#
Proof:
The proof of "=# holds for X and Y discrete or continuous. As a shorthand notation, let X
$ E"X# and Y $ E"Y#. Then,
Aowever, from "3#, if X and Y are independent random variables, then
Re"ernces:
tt&:--!!!.eas$measure.co.u/-randomvariables1.as&'
tt&:--!!!0stat.stan"ord.edu-1susan-courses-s11,-node,+.tml

Potrebbero piacerti anche