0% found this document useful (0 votes)
24 views14 pages

Class Notes 4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views14 pages

Class Notes 4

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Chapter 4 RANDOM

VARIABLES

Experiments whose outcomes are


numbers

EXAMPLE:
Select items at random from a batch of size
N until the first defective item is found.
Record the number of non-defective items.
Sample Space: S = {0, 1, 2, . . . , N }

The result from the experiment becomes a


variable; that is, a quantity taking different
values on different occasions. Because the
experiment involves selection at random, we
call it a random variable.

Abbreviation: rv

Notation: capital letter, often X.


DEFINITION:
The set of possible values that a random
variable X can take is called the range of X.

EQUIVALENCES

Unstructured Random
Experiment Variable

E X
Sample space range of X
Outcome of E One possible value x for X
Event Subset of range of X
Event A x ∈ subset of range of X
e.g., x = 3 or 2 ≤ x ≤ 4
Pr(A) Pr(X = 3), Pr(2 ≤ X ≤ 4)
REMINDER:
The set of possible values that a random
variable (rv) X can take is called the range
of X.

DEFINITION:
A rv X is said to be discrete if its range
consists of a finite or countable number of
values.

Examples: based on tossing a coin repeatedly


No. of H in 1st 5 tosses: {0, 1, 2, . . . ., 5}
No. of T before first H: {0, 1, 2, . . . .}

Note: although the definition of a discrete rv


allows it to take any finite or countable set of
values, the values are in practice almost
always integers.
Probability Distributions

or ‘How to describe the behaviour of a rv’

Suppose that the only values a random


variable X can take are x1, x2, . . . , xn. That
is, the range of X is the set of n values
x1, x2, . . . xn.
Since we can list all possible values, this
random variable X must be discrete.

Then the behaviour of X is completely


described by giving the probabilities of all
relevant events:

Event Probability
X = x1 Pr(X = x1)
X = x2 Pr(X = x2)
... ...
X = xn Pr(X = xn)

In other words, we specify the function


Pr(X = x) for all values x in the range of X.
DEFINITION:

The Probability Function of a discrete


random variable X is the function p(x)
satisfying

p(x) = Pr(X = x)
for all values x in the range of X.

Abbreviation: pf

Notation: p(x) or pX (x). We use the pX (x)


form when we need to make the identity of
the rv clear.

Terminology: The pf is sometimes given the


alternative name of probability mass function
(pmf).
EXAMPLE:
Let the probability of a head on any toss of a
particular coin be p. From independent
successive tosses of the coin, we record the
number X of tails before the first head
appears.

Range of X : {0, 1, 2, . . .}

Pr(X = 0) = p
Pr(X = 1) = (1 − p)p
...
Pr(X = x) = (1 − p)xp
...

The probability function for the random


variable X gives a convenient summary of its
behaviour; the pf pX (x) is given by:

pX (x) = (1 − p)xp, x = 0, 1, 2, . . . .

X is said to have a Geometric Distribution.


Properties of a pf

If pX (x) is the pf of a rv X, then

• pX (x) ≥ 0, for all x in the range of X.



P
pX (x) = 1, where the sum is taken
over the range of X.

Informal ‘definition’ of a distribution:


The pf of a discrete rv describes how the
total probability, 1, is split, or distributed,
between the various possible values of X.

This ‘split’ or pattern is known as the


distribution of the rv.

Note: The pf is not the only way of


describing the distribution of a discrete rv.
Any 1–1 function of the pf will do.
DEFINITION:
The cumulative distribution function of a
rv X is the function FX (x) of x given by
FX (x) = Pr(X ≤ x),
for all values x in the range of X.
Abbreviation: cdf
Terminology: The cdf is sometimes given the
alternative name of distribution function.
Notation: F (x) or FX (x). We use the FX (x)
form when we need to make the identity of
the rv clear.
Relationship with pf: For a discrete rv X,
X
FX (x) = pX (y)
y≤x
Example: If a rv has range {0, 1, 2, . . .},
FX (3) = pX (0) + pX (1) + pX (2) + pX (3)
and
px(2) = FX (2) − FX (1).
EXAMPLE: Discrete Uniform Distribution

The rv X is equally likely to take each integer


value in the range 1, 2, . . . , n.

Probability function:

 1 , x = 1, 2, . . . , n ,
pX (x) = n
 0 elsewhere.
Cumulative distribution function:




 0, x < 1,


[x]
FX (x) = n , 1 ≤ x ≤ n,




 1, x ≥ n,

where [x] is the integer part of x.

Note: The cdf is defined for all values of x,


not just the ones in the range of X.
1 for all values
For this distribution, the cdf is n
of x in the range 1 ≤ x < 2, then jumps to n 2,

and so on.
Properties of cdfs:

All cdfs

• are monotonic non-decreasing,


• satisfy FX (−∞) = 0 ,
• satisfy FX (∞) = 1 .

Any function satisfying these conditions can


be a cdf.

A function not satisfying these conditions


cannot be a cdf.

For a discrete rv the cdf is always a step


function.

Reminder: Properties of cdfs: Any function


satisfying the following conditions can be a
cdf:
• It is monotonic non-decreasing,
• It satisfies FX (−∞) = 0 ,
• It satisfies FX (∞) = 1 .

DEFINITION: A random variable is said to


be continuous if its cdf is a continuous
function (see later).
This is an important case, which occurs
frequently in practice.
EXAMPLE: The Exponential Distribution
Consider the rv Y with cdf

 0, y < 0,
FY (y) =
 1 − e−y , y ≥ 0 .

This meets all the requirements above, and is


not a step function.
The cdf is a continuous function.
Types of random variable

Most rvs are either discrete or continuous,


but
• one can devise some complicated
counter-examples, and
• there are practical examples of rvs
which are partly discrete and partly
continuous.

EXAMPLE: Cars pass a roadside point, the


gaps (in time) between successive cars being
exponentially distributed.
Someone arrives at the roadside and crosses
as soon as the gap to the next car exceeds 10
seconds. The rv T is the delay before the
person starts to cross the road.

The delay T may be zero or positive. The


chance that T = 0 is positive; the cdf has a
step at t = 0. But for t > 0 the cdf will be
continuous.
Mean and Variance

The pf gives a complete description of the


behaviour of a (discrete) random variable. In
practice we often want a more concise
description of its behaviour.
DEFINITION: The mean or expectation of
a discrete rv X, E(X), is defined as
X
E(X) = x Pr(X = x).
x
X
Note: Here (and later) the notation means
x
the sum over all values x in the range of X.
The expectation E(X) is a weighted average
of these values. The weights always sum to 1.
Extension: The concept of expectation can
be generalised; we can define the expectation
of any function of a rv. Thus we obtain, for a
function g(·) of a discrete rv X,
X
E{g(X)} = g(x) Pr(X = x) .
x
Measures of variability

Two rvs can have equal means but very


different patterns of variability. Here is a
sketch of the probability functions p1(x) and
p2(x) of two rvs X1 and X2.

p1(x)

x
6
mean

p2(x)

x
6
mean

To distinguish between these, we need a


measure of spread or dispersion.

You might also like