0% found this document useful (0 votes)
3 views

Lecture 03

The document covers joint probability mass functions for discrete random variables, providing examples and solutions to problems involving the selection of batteries and family compositions. It also introduces continuous random variables, probability density functions, and cumulative distribution functions, explaining their properties and calculations. Additionally, it discusses joint probability density functions and the independence of random variables with relevant examples and calculations.
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)
3 views

Lecture 03

The document covers joint probability mass functions for discrete random variables, providing examples and solutions to problems involving the selection of batteries and family compositions. It also introduces continuous random variables, probability density functions, and cumulative distribution functions, explaining their properties and calculations. Additionally, it discusses joint probability density functions and the independence of random variables with relevant examples and calculations.
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/ 21

CE 207

Applied Mathematics for Engineers


Course Teacher: Dr. Md. Hadiuzzaman
Room No. 544, Civil Building
(Lecture 3)
Joint Probability Mass Function
p(xi , y j ) = PX = xi , Y = y j 
• X an Y are both discrete random variables whose possible
values are, respectively, x1, x2, x3, ...... etc. and y1, y2, y3,
......etc.
• Individual probability mass functions of X and Y are easily
obtained from Joint probability mass function

P( X = xi ) =  PX = xi , Y = y j  =  p(xi , y j )
j j

P(Y = y j ) =  PX = xi , Y = y j  =  p(xi , y j )


i i
Problem 1
Q. 3 batteries are chosen from a group of 3 new, 4 used but working, 5
defective batteries. Determine probabilities of different combinations.

Soln:
Let X and Y denote respectively the number of new batteries and used but
working batteries that are chosen. Then probable values of X are 0, 1, 2, 3
and probable values of Y are 0, 1, 2, 3
x1,x2,x3,x4 y1,y2,y3,y4
p(xi,yj) denotes joint probability that xi no. new batteries and yj no. used
but working batteries will be chosen.

p(0,0) = 5C3 12
C3 = 10 220
( )( C )
p(0,1) = 5C2 4
1
12
C3 = 40 220
Problem 1 (Contd….)

p ( 0, 2 ) = ( 5C1 )( 4C2 ) 12
C3 = 30 220
p ( 0,3) = 4C3 12
C3 = 4 220
p (1, 0 ) = ( 3C1 )( 5C2 ) C3 = 30 220
12

p (1,1) = ( 3C1 )( 4C1 )( 5C1 ) C3 = 60 220


12

p (1, 2 ) = ( 3C1 )( 4C2 ) 12


C3 = 18 220
p (1,3) = 0
Problem 1 (Contd….)

p ( 2, 0 ) = ( 3C2 )( 5C1 ) 12
C3 = 15 220
p ( 2,1) = ( 3C2 )( 4C1 ) C3 = 12 220
12

p ( 3, 0 ) = ( 3C3 ) C3 = 1 220
12

Also p ( 2, 2 ) = p ( 2,3) = p ( 3,1) = p ( 3, 2 ) = p ( 3,3 ) = 0


Problem 1 (Contd….)
Probability that no new batteries will be chosen is:
P ( X = 0 ) =  P  X = 0,Y = y j  =  p ( 0, y j )
j j

= p ( 0 ,0 ) + p ( 0 ,1) + p ( 0 , 2 ) + p ( 0 ,3 )
= (10 + 40 + 30 + 4 ) 220 = 84 220
Similarly, probability that one/two/three new batteries will be chosen is:
P ( X = 1) = p (1, 0 ) + p (1,1) + p (1, 2 ) + p (1,3) = 108 220
P ( X = 2 ) = p ( 2, 0 ) + p ( 2,1) + p ( 2, 2 ) + p ( 2,3) = 27 220
P ( X = 3) = p ( 3, 0 ) + p ( 3,1) + p ( 3, 2 ) + p ( 3,3) = 1 220
Note, sum of all these probabilities i.e., P(X=0,1,2,3)=1
Problem 2
Q. 15% of families have no children, 20% have 1 children, 35% have 2
children, 30% have 3 children. Girl or boy is equally likely. What will be the
joint probability mass function of a family if it is chosen at random from
this community?

Soln:
Let B and G denote respectively the number of boys and girls respectively
in a family randomly chosen. Then probable values of B are 0, 1, 2, 3 and
probable values of G are 0, 1, 2, 3
b1,b2,b3,b4 g1,g2,g3,g4
p(bi,gj) denotes joint probability that bi no. boys and gj no. girls.

p(0,0 ) = P{B = 0, G = 0} = 0.15


p(0,1) = P{B = 0, G = 1} = P1 child P1 girl | 1 child  = 0.2(0.5) = 0.1
Problem 2 (contd….)
p(0,2) = P{B = 0, G = 2} = P2 childrenP2 girl | 2 children
= 0.35(0.5)(0.5) = 0.0875
p(0,3) = P{B = 0, G = 3} = P3 childrenP3 girl | 3 children
= 0.3(0.5)(0.5)(0.5) = 0.0375

Probability that family has no boy i.e.,


P(B=0) = p(0,0)+p(0,1)+p(0,2)+p(0,3)=0.375

Similarly, probability that family has one girl i.e.,


P(G=1) = p(0,1)+p(1,1)+p(2,1)+p(3,1)=0.3875
where, p(3,1)=0
Joint Probability Mass Function

j 0 1 2 3 Row sum
= P(B=i)
i

0 .15 .10 .0875 .0375 .3750

1 .10 .175 .1125 0 .3875

2 .0875 .1125 0 0 .2000

3 .0375 0 0 0 .0375

Column .3750 .3875 .2000 .0375


sum=
P(G=j)
Problem 2 (contd….)
PB = 0, G = 1 0.1 8
P{B = 0 | G = 1} = = =
PG = 1 0.3875 31
PB = 1, G = 1 0.175 14
P{B = 1 | G = 1} = = =
PG = 1 0.3875 31
PB = 2, G = 1 0.1125 9
P{B = 2 | G = 1} = = =
PG = 1 0.3875 31
PB = 3, G = 1 0
P{B = 3 | G = 1} = = =0
PG = 1 0.3875
Hence, conditional probability that family chosen has at least one boy, given
that there is one girl is = (14+9)/31=23/31
Continuous Random Variable
• A continuous random variable X has an infinite (or nearly infinite) set of
possible values in a given interval
• There exists a nonnegative function f(x) defined for all real values of x
having the property that for any set B of real numbers

PX  B =  f (x )dx
B

• f(x) is known as probability density function of X


• In words, the probability that X will be in B may be obtained by integrating
the probability density function over the set B.
• All probability statements about X can be answered in terms of f(x)
• For RVs that map to the integers or the real numbers, the cumulative
density function (cdf) is a useful alternative representation
Probability Density Function (PDF)

f (x)


PX  (− ,  ) =  f ( x ) dx = 1
−

• For RVs that map to the integers or the real numbers, the cumulative
density function (cdf) is a useful alternative representation
Probability Density Function (contd.)
• Considering B={a,b}, we can write

Pa  X  b =  f (x )dx
b

a
• Putting a=b in above equation,

PX = a =  f (x )dx = 0
a

a
Hence, probability that a continuous random variable ‘X’ will
assume a particular value ‘a’ is zero!
Probability Density Function (contd.)
• However, probability that a continuous random variable ‘X’ will be near a
particular value ‘a’ is not zero!

• Putting b=a+dx in above equation, where dx is small

Pa  X  b =  f (x )dx
b

a
a + dx
Pa  X  a + dx =  f (x ) dx  f (a ) dx
a
Problem 1
f(x) = C(4x-2x2) for 0<x<2 

= 0 for other values of x


−
 f ( x)dx = 1
Determine C and P{X>1}


−

0
2
( )
f ( x )dx = C  4 x − 2 x 2 dx = 1 by definition of f(x)
x=2
 2 2x  3
i.e., C 2x −  =1
 3  x =0
3
i.e., C =
8
Now, PX  1 = 

1
(
3 2
8 1
)
f ( x )dx =  4 x − 2 x dx =
2 1
2
Cumulative Distribution Function (CDF)

F (a ) = PX  (− , a ) = P{ X  a} =  f (x ) dx
a

−

d
F (a ) = f (a )
Fundamental
theorem of
da calculus
Cumulative Distribution Function (contd.)
Notes:
• F()=1 and F(-)=0
• F(x) is a continuous function even if f(x) is
discontinuous.
• As x increases F(x) either increases or
remains constant.
• P{c<X<d} = F(d)-F(c)
• P{X>a} = 1-F(a)
Joint Probability Density Function
• Random variables X and Y are jointly continuous if there exists
a function f(x,y) defined for all real x and y having the
following property:

PX  A, Y  B =   f (x, y ) dx dy
B A

• If X and Y are jointly continuous, they are individually


continuous, and their individual probability density functions
f(x) and f(y) can be obtained as:
 

f (x ) = f (y) = 

−
f ( x, y )dy
−
f ( x, y )dx
Problem 1
f(x,y) = 2e-xe-2y for 0<x<, 0<y<
= 0 for other values of x and y
Determine P{X>1, Y<1}, P{X<Y}

PX  1, Y  1 = 
1

0 1

− x −2 y
2e e
1
dxdy =  2e − 2 y − e − x
0
( 
1 )dy
 −2 y
 -1
1
= e -1  2e − 2 y dy = 2e -1 
e 1
(
 = e 1 − e − 2 )
 − 2y
0
0


PX  Y  =
y
 2e e dxdy =  
− x −2 y
2e − x e − 2 y dxdy
0 0
( x , y ): x  y

0

=  2e −2 y
(1 − e ) −y 2 1
dy = 1 − =
3 3
Joint Probability Density Function (contd.)
• Random variables X and Y are independent if :

PX  A, Y  B = PX  APY  B


• In other words, X and Y are independent, if for all A and B, the
events {XA} and {YB} are independent.
• For the jointly continuous case, the condition is equivalent to

f ( x, y ) = f ( x ) f ( y )
• X and Y are independent if knowing the value of one does not
change the distribution of the other.
Problem 2
Q. X and Y are independent random variables with common
density function: f(x) = e-x for x>0
= 0 for x0
Determine density function of X/Y.
FX / Y (a ) = PX Y  a =  f (x, y )dxdy =  f (x ) f ( y )dxdy
x / ya x / ya

 (1-e )e
 ay 
= 
−x − y
e e dxdy = -ay −y
dy
0 0 0
y =
− ( a +1) y
 −y e  1
= - e −  =1 −
 a + 1  y =0 a +1

f X / Y (a ) = (FX / Y (a )) = 1 2
d
da (a + 1)

You might also like