MATH F113 - Chapter-3 PDF
MATH F113 - Chapter-3 PDF
MATH F113 - Chapter-3 PDF
presentation
BITS Pilani
Pilani Campus
Dr RAKHEE
Department of Mathematics
BITS Pilani
Pilani Campus
Chapter 3
Discrete Distribution
Random variables
Random variables are variables
whose values are determined by a
chance.
(This can be thought as a sample
space of a random experiment
whose
outcomes
are
real
numbers).
BITS Pilani, Pilani Campus
Random variables
The outcomes of random experiment may be
numerical or non-numerical (descriptive).
For example, when we throw a die, we get
the outcomes as 1, 2, 3, 4, 5, 6 which is a
numerical value, whereas when we toss a
coin we get either a head or a tail. This is a
non-numerical values. Instead of dealing the
non-numerical values, we can assign some
numerical value to them, say 1 for head and
0 for tail.
BITS Pilani, Pilani Campus
Random Variable
Random variable is a real valued function
which maps the numerical or nonnumerical sample space (domain) of the
random experiment to a real values (co
domain or range)
It should be mapped such that an
outcome of an event should correspond
to only one real value.
BITS Pilani, Pilani Campus
Random Variable
Random variable is a real valued function
which is also a single valued function and
not a multi-valued.
That means it can be one-to- one or manyto-one but never be one-to-many mapping.
Example
Suppose that we toss three coins and
consider the sample space associated with
the experiment
S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
X: number of tails obtained in the toss
of three coins
Hence, X(HHH) = 0, X(TTT) = 3,
X(THT) = 2, X(HTT) = 2, X(TTH) = 2,
X(THH) = 1, X(HHT) = 1, X(HTH) = 1
BITS Pilani, Pilani Campus
Random Variable
Definition:
Let E be a random
experiment and S a sample space
associated with it. A function X assigning
to every element s S, a real number
X(s) is called random variable. Though,
X is a function yet we call it a random
variable. S
X
X(s)
s
BITS Pilani, Pilani Campus
Random variable
Examples
Let E be the experiment of rolling two fair
dice Let X be the random variable that is
defined as the sum of numbers shown then
X takes values 2, 3, 4,, 10, 11, 12
P[X=2]= P[(1,1)] = 1/36
P[X=3]= P[(2,1),(1,2)] = 2/36
P[X=4]= P[(2,2),(3,1),(1,3)] = 3/36
P[X=5]= P[(2,3),(3,2),(1,4),(4,1)] =
4/36
Example
Let Z = the time of peak demand for
electricity at a power plant. Time is measured
continuously, and Z can conceivably assume
any value in the interval [0,24),
0: means mid night one day
24: means 12 mid night next day.
In this case, the set of real numbers is neither
finite nor countably infinite and hence Z is not
discrete random varable.
BITS Pilani, Pilani Campus
Example
P ( A) =
f ( x)
x A is a value of X
f ( x) = 1
all x
The
cumulative
distribution
function F of a discrete random
variable X, is defined by
F(x) = P(X x) =
f(k)
kx
distribution
function) of a discrete random variable
X then
is
CDF
(cumulative
Exercise 8
The density for X, the number
be drilled per bit while drilling
given by the following table :
x
1
2
3
4
5
f(x) 0.02 0.03 0.05 0.2 0.4
7
8
0.07 ?
Example
If CDF F(x) for a r.v. is given as
x
-1
1/3
1/2 2/3 1
3
1.0
-1
F(x)
(i)
1/3
1/3
1/2 2/3 1
-1
1/2
2/3
f(x)
0.3 0.2
-1
1/3
1/2 2/3 1
F(x)
Exercise 10 :
It is known that the probability of being able to
log on to a computer from a remote terminal at
any given time is 0.7. Let X denote the number
of attempts that must be made to gain access to
the computer.
(a)Find the first 4 terms of the density table.
(b)Find a closed form expression for f(x).
(c)Find a closed form expression for F(x).
(d)Use F to find the probability that at most 4
attempts are required to access the computer.
BITS Pilani, Pilani Campus
Expectation
The density function of a random variable
completely describe the behavior of the
random variable.
Random variables can also be characterized
by the knowledge of numerical values of
three parameters, Mean(), Variance (2)
and Standared deviation ().
Example
Consider the roll of a single fair die,
and X denote the number that is obtain.
The possible values for X are 1, 2, 3, 4,
5, 6, and since the die is fair, the
probability associated with each value
is 1/6. So the density function for X is
given by
1
f ( x) = ,
6
x = 1, 2, 3, 4, 5, 6
BITS Pilani, Pilani Campus
Expectations
Definition : Let X be a discrete random
variable and H(X) be a function of X. Then
the expected value of H(X), denoted by
E(H(X)), is defined by
E ( H ( X )) =
H ( x) f ( x)
x any value of X
| H ( x) | f ( x) is finite
x
Notes :
1) E[H(X)] can be interpreted as the weighted
average value of H(X).
2) If all x|H(x)|f(x) diverges then E[H(X)] does not
exist
irrespective
of
convergence
of
all xH(x)f(x), see Ex. 22.
3) E[X] measures average value of X and is
called the mean of X and denoted by X or
4) Distribution is scattered around . Thus it
indicates location of center of values of X and
hence called a location parameter.
BITS Pilani, Pilani Campus
Notes :
1) Note that Var(X) is always nonnegative, if it
exists.
2) Variance measures the dispersion or variability
of X. It is large if values of X away from have
large probability, i.e. values of X are more likely
to be spread. This indicates inconsistency or
instability of random variable.
Properties of Mean
Theorem : If X is a random variable and c is a
real number then :
E[c] = c and E[cX] = cE[X].
Proof : E[c] = c f(x) = c f(x) = c(1) = c.
E[cX] = c xf (x) = c xf (x)= cE[X].
Ex.: Prove for reals a, b, E[aX + b] = aE[X] + b.
BITS Pilani, Pilani Campus
Properties of Variance
Theorem : Var [X] = E[X2] (E[X])2.
Theorem : For a real number c,
Var [c] = 0 and Var [cX] = c2Var[X].
0.4
0.2
0.07 0.03
(1 / 3) ( 2 / 3), x = 1,2,3....
f ( x) =
0, otherwise
x 1
Find E(X).
Sol.
(1 / 3) (2 / 3), x = 1,2,3....
f ( x) =
0, otherwise
x 1
1 | x|
f ( x) = 2 , x = 1, 2, 3,...
2
a) Verify that this is the density function for a
discrete r.v.
b) Let
2| x |
g ( x) = (1)
| x|1
.
2 | x | 1
c) Show that
converges.
m X (t ) = E[e ]
tX
k
d m X (t )
k
dt
k
= E[ X ]
t =0
Proof : e
tX
= 1 + tX + t X / 2!+... + t X / n!+...
2
Hence m X (t ) = E[e ]
tX
Differentiating k times,
k
d m X (t )
k
k +1
nk
n
=
E
X
+
tE
X
+
+
t
E
X
[
]
[
]
...
[
] / k!+...
k
dt
Now put t = 0 to get the result.
BITS Pilani, Pilani Campus
( x 3)
f ( x) =
,
5
2
x = 3, 4, 5
Bernoulli trials
A trial which has exactly 2 possible
outcomes, success s and failure f, is
called Bernoulli trial.
For any random experiment, if we are
only interested in occurrence or not of a
particular event, we can treat it as
Bernoulli trial.
Thus if we toss a dice but are interested
in whether top face has even number or
not, we can treat it as a Bernoulli trial.
BITS Pilani, Pilani Campus
Geometric distribution
If we perform a series of identical and
independent trials,
X = number of trials required to get the
first success is a discrete random
variable, which is known as geometric
random variable.
Its probability distribution is called
Geometric distribution.
BITS Pilani, Pilani Campus
P ( X = i ) = (1 p )
i 1
p for i = 1,2,...
BITS Pilani, Pilani Campus
(1 p ) x 1 p; x = 1,2,3,..
f ( x) =
0;
otherwise.
(Verify it is a density of a discrete random variable)
We write q = 1- p.
BITS Pilani, Pilani Campus
Theorem 3.4.1
The m.g.f. of geometric random
variable with parameter p, 0 < p < 1, is
t
pe
m X (t ) =
;
for
t
ln
q
;
<
t
1 qe
where q = 1 p.
BITS Pilani, Pilani Campus
Proof:
The density of a geometric distribution
q x 1 p;
f ( x) =
0;
By def.
x = 1,2,3,..
otherwise.
m X (t ) = E[e ] = e f ( x) = pq
tX
tx
x =1
(qe )
t x
x =1
pe
m X (t ) =
; where q = 1 p.
t
1 qe
Provided | r | < | qet | < 1.
Since
the
exponential
function
is
nonnegative and 0 < q < 1, this restriction
implies that (qet) < 1, implies that et < (1/q)
1
ln(e ) < ln , t < (ln 1 ln q ) t < ln q
q
t
Theorem 3.4.3
Proof
t
pe
m X (t ) =
; where q = 1 p.
t
1 qe
t
d
pe
m X (t ) =
2
t
dt
1 qe
1
p
d
=
E[ X ] = m X (t ) t =0 =
2
dt
(1 q ) p
d
pe (1 + qe )
=
m
(
t
)
X
3
2
t
dt
1 qe
2
p (1 + q ) (1 + q )
d
=
E[ X ] = 2 m X (t ) t =0 =
3
2
dt
p
(1 q )
2
1
(1 + q )
2
E[ X ] =
and E[ X ] =
2
p
p
Thus,
(1 + q ) 1
q
Var[ X ] =
2 = 2
2
p
p
p
x =1
x =1
E[ X ] = xf ( x) = xpq
= p xq
x 1
x 1
= p 1 + 2q + 3q + 4q + ...
2
x =1
Sum of AGP is
S = 1+ 2q + 3q + 4q + . ..
2
qS =
q + 2q + 3q + . ..
2
(1 q ) S = 1+ q + q + q + . ..
1
S=
2
(1 q )
2
1
=
E[ X ] = p
2
(1 q )
1 1
p 2 =
p p
BITS Pilani, Pilani Campus
E[ X ] = x f ( x) = x pq
2
x =1
x 1
x =1
= p x q
2
x 1
= p 1 + 4q + 9q + 16q + ...
2
x =1
1+ q
=
= p
3
(1 q)
1+ q 1+ q
p 3 = 2
p
p
BITS Pilani, Pilani Campus
Var[ X ] = E[ X ] E[ X ]
2
1+ q 1 q
= 2 = 2
p
p p
Exercise 25
The zinc phosphate coating on the threads of
steel tubes used in oil and gas wells is critical
to their performance. To monitor the coating
process, an uncoated metal sample with known
outside area is weighed and treated along with
the lot of tubing. This sample is then stripped
and reweighed. From this it is possible to
determine whether or not the proper amount of
coating was applied to the tubing.
BITS Pilani, Pilani Campus
Example
In a Video game the player attempts to
capture a treasure lying behind one of
five doors. The location of treasure
varies randomly in such a way that at
any given time it is just as likely to be
behind one door as any other. When
the player knocks on a given door, the
treasure is his if it lies behind that door.
BITS Pilani, Pilani Campus
Binomial Distribution
Let an experiment consist of fixed number
n of Bernoulli trials.
Assume all trials are identical and
independent.
Thus p = probability of success is same for
each trial.
X = number of successes in these n trials.
What is P(X = x)?
BITS Pilani, Pilani Campus
Example
Consider a case in which n = 3 then its the
sample space is
S = {fff, sff, fsf, ffs, ssf, sfs, fss, sss}
Since trials are independent, the probability
assigned to each sample point is found by
multiplying. For instance the probability
assigned to the sample points are as follows:
(1-p)(1-p)(1-p) = (1-p)3 and p(1-p)(1-p) = p(1-p)2
BITS Pilani, Pilani Campus
It is evident that x = 0, 1, 2, 3
P[X = x] = c(x) px(1-p)3-x
3
where c( x) =
x
3 x
3 x
f ( x) =
p
p
(
1
)
x
BITS Pilani, Pilani Campus
n x
n
x
; x = 0,1,2,..., n
p (1 p)
f ( x) = x
0
otherwise.
1) The m.g.f. of X is
t
n
m X (t ) = (q + pe ) with q = 1 p.
2) E[ X ] = np and
Var[ X ] = npq.
BITS Pilani, Pilani Campus
Proof :
n x
n x tx
1) m X (t) = E[e ] = p (1 p ) e
x =0 x
n
n
n x
t x
= (1 p ) ( pe )
x =0 x
n
tX
= (q + pe ) where q = 1 p.
t n
2) m X (t ) = (q + pe t ) n .
dm X (t )
t
t n 1
= npe (q + pe )
Thus E[X] =
t =0
dt t =0
= np (q + p ) = np.
t n 1
d m X (t )
d [npe (q + pe ) ]
=
Also E[ X ] =
2
dt
dt
t =0
t =0
2
t n2
= [n(n 1) p e (q + pe )
2 2t
t n 1
+ npe (q + pe ) ]
t
t =0
Var[ X ] = E[ X 2 ] E[ X ]2 = n 2 p 2 + np np 2 n 2 p 2
= np(1 p) = npq.
BITS Pilani, Pilani Campus
n x
n x
E[X] = x p (1 p)
x =0 x
n
n!
x n x
p q
=x
x!(n x)!
x =0
n
n!
x n x
p q
=x
x( x 1)!(n x)!
x =0
BITS Pilani, Pilani Campus
n!
x n x
E[X] =
p q
x = 0 ( x 1)!( n x )!
Since the term x = 0 is zero
n(n 1)!
x 1 ( n 1) ( x 1)
E[X] =
pp q
x =1 ( x 1)!(( n 1) ( x 1))!
n 1
n(n 1)!
s n 1 s
pp q
E[X] =
s = 0 s!( n 1 s )!
n 1
n(n 1)!
s n 1 s
E[X] =
pp q
s = 0 s!( n 1 s )!
n 1
n 1 s ( n 1) s
p q
= np
s =0 s
n 1
n 1
= np ( p + q ) = np ( p + 1 p ) = np
n 1
Expectation of X2 by Definition
n x
n x
E[X ] = x p (1 p)
x =0
x
n
n!
x n x
p q
= [ x( x 1) + x]
x!(n x)!
x =0
n
n!
x n x
p q
= x( x 1)
x!(n x)!
x =0
n
n!
x n x
p q
+x
x!(n x)!
x =0
n!
x n x
E[X ] =
p q + np
x = 0 ( x 2)!( n x )!
2
n 2 s ( n2) s
p q
= n(n 1) p
+ np
s =0 s
n2
2
= n(n 1) p ( p + q ) + np
n 1
= n(n 1) p ( p + 1 p )
2
= n(n 1) p + np
n2
+ np
Var(X) by definition
Var[ X ] = E[ X ] E[ X ]
2
= n(n 1) p + np (np )
2
= np np = np (1 p ) = npq
2
Example 3.5.3
Let X represent the number of signals properly
identified in a 30 minute time period in which 10
signals are received. Assuming that any signal is
identified
with
probability
p=1/2
and
identification of signals is independent of each
other.
(i) Find the probability that at most seven signals
are identified correctly.
(ii) Find the probability that at most 7 and at least
2 signals are identified correctly.
BITS Pilani, Pilani Campus
i) *----*-----*-----*----*----*----*----*------------0
10
(ii) ----------*---*--*--*--*--*----------------0
10
Example
From a usual pack of 52 cards, 10 cards
are picked randomly with replacement.
Find the probability that they will contain
at least 4 and at most 7 spades. Identify
Bernoulli trials and success and random
variable X together with its distribution.
n = 10, p = 13/52 = 0.25.
Required probability = F(7) - F(3)
BITS Pilani, Pilani Campus
n x
10 0
1
2
3
4
5
6
7
8
.01
0.90438
0.99573
0.99989
1.00000
1.00000
1.00000
1.00000
1.00000
1.00000
.05
0.59874
0.91386
0.98850
0.99897
0.99994
1.00000
1.00000
1.00000
1.00000
p
.10
0.34868
0.73610
0.92981
0.98720
0.99837
0.99985
0.99999
1.00000
1.00000
.15
0.19687
0.54430
0.82020
0.95003
0.99013
0.99862
0.99987
0.99999
1.00000
.20
0.10737
0.37581
0.67780
0.87913
0.96721
0.99363
0.99914
0.99992
1.00000
.25
0.05631
0.24403
0.52559
0.77588
0.92187
0.98027
0.99649
0.99958
0.99997
Hypergeometric distribution
If
we
are
choosing
without
replacement a sample of size n from N
objects of which r are favorable, and
X = number of favorable objects in the
sample, then
r N r
x n x
P[ X = x] =
N
n
N objects
r have trait (success)
n objects
(N - r) do not have trait (failure)
Properties:
The experiment consists of drawing a
random sample of size
n without
replacement and without regard to order
from a collection of N objects.
Of the N objects, r have a trait of interest
to us; the other (N r) do not have the
trait.
The random variable X is the number of
objects in the sample with the trait.
BITS Pilani, Pilani Campus
r N r
x n x
f ( x) =
;
N
n
if max[0, n - (N - r)] x min(n, r)
BITS Pilani, Pilani Campus
r N r N n
Var ( X ) = n
N N N 1
BITS Pilani, Pilani Campus
x n x
f ( x) =
N
n
Hypergeometric
binomial
Example 3.7.3
During a course of an hour, 1000 bottles of
beer are filled by a particular machine. Each
hour a sample of 20 bottles is randomly
selected and number of ounces of beer per
bottle is checked. Let X denote the number of
bottles selected that are underfilled. Suppose
during a particular hour, 100 underfilled
bottles are produced. Find the probability that
at least 3 underfilled bottles will be among
those sampled.
BITS Pilani, Pilani Campus
0 20 1 19 2 18
= 1
1000
1000
1000
20
20
20
= 0.3224
BITS Pilani, Pilani Campus
Using Binomial
Approximation with
n = 20, p = 100/1000 = 0.1
(n/N = 20/1000 = 0.02 < 0.05)
P[X 3] = 1 - F(2) = 1 - 0.6769 = 0.3231.
Poisson Distribution
This distribution is named on the
French mathematician Simeon Denis
Poisson.
Let k > 0 be a constant and, for any
real number x,
e kk x
=
;
for
x
0
,
1
,
2
,...
f ( x ) = x!
0
otherwise
f ( x) =
x =0
k
x
e k
x!
k
k
= e e =1
x =0
k k
k
= e 1 + + + ...
1! 2!
Theorem
The m.g.f. of a Poisson random
variable X with parameter k > 0 is
m X (t ) = e
t
k (e 1)
Proof:
tx k
e e k
m X (t ) = E[e ] =
x!
x =0
tX
=
x =0
(e k )
t
x!
(
)
ke
(
1
)
k
e
t
k
= e 1 + ke +
+ ..... = e
2!
t 2
k ( e t 1)
t
E[ X ] = (m X (t ) = e
(ke ) t =0 = k
dt
t =0
d
E[ X ] = 2 (m X (t )
dt
t =0
2
= e
k ( e t 1)
(ke ) + e
t
k ( e t 1)
t 2
(ke )
t =0
=k +k
2
Hence, Var ( X ) = E[ X ] ( E[ X ]) = k
2
x 1
e k
e k
k
k
E[ X ] = x
=
= e k
x!
x =0
x = 0 ( x 1)!
x = 0 ( x 1)!
Let x 1 = y
2
k
k
k
k
E[ X ] = e k
= e k 1 + k + + .....
2!
y = 0 y!
k
k
= e ke = k
e k
e k
= {x( x 1) + x}
E[ X ] = x
x!
x!
x =0
x =0
2
e k
e k
= x( x 1)
+x
x!
x!
x =0
x =0
k
e k
= x( x 1)
+k
x( x 1)( x 2)!
x =0
x2
k
e k
k 2
=
+ k =e k
+k
x = 0 ( x 2)!
x = 0 ( x 2)!
BITS Pilani, Pilani Campus
Let x 2 = y
k
E[ X ] = e k + k
y = 0 y!
2
k
= e k 1 + k + + ..... + k
2!
2
k 2 k
=e k e +k =k +k
2
Var[ X ] = E[ X ] E[ X ]
2
= k +k k = k
2
e s ( s ) x
for x = 0,1,2,...
f ( x) =
x!
0
otherwise
Poisson approximation to
Binomial
Exercise 63
Geophysicists determine the age of a zircon by
counting the number of uranium fission tracks
on a polished surface. A particular zircon is of
such an age that the average number of tracks
per square centimeter is five. What is the
probability that a 2 centimeter-square sample
of this zircon will reveal at most 3 tracks, thus
leading to an underestimation of the age of the
Material?
BITS Pilani, Pilani Campus
Example:
A large microprocessor chip contains
multiple copies of circuits . If a circuit fails,
the chip knows how to select the proper
logic to repair itself. Average number of
defects per chip is 300. Find the
probability that 10 or fewer defects will be
found in a randomly selected region that
comprises 5% of the total surface area?
BITS Pilani, Pilani Campus
Ex.64 :
California is hit by approximately 500
Earthquakes that are large enough to be felt
every year. However those of destructive
magnitude occur on an average once a
year. Find the probability that at least one
earthquake of this magnitude occurs during
a 6 month period. Would it be unusual to
have 3 or more earthquakes of destructive
magnitude on a 6 month Period? Explain.
BITS Pilani, Pilani Campus
Thank You