[go: up one dir, main page]

0% found this document useful (0 votes)
15 views51 pages

Discrete Random Variables - 2 & 3

The document presents an overview of discrete random variables and their probability distributions, including examples of experiments such as tossing coins and spinning a spinner. It discusses probability functions, cumulative distribution functions, and provides solutions to various problems related to calculating probabilities. The content is structured as a lecture by Prof. Dr. Myint Swe, aimed at teaching the concepts of discrete random variables.

Uploaded by

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

Discrete Random Variables - 2 & 3

The document presents an overview of discrete random variables and their probability distributions, including examples of experiments such as tossing coins and spinning a spinner. It discusses probability functions, cumulative distribution functions, and provides solutions to various problems related to calculating probabilities. The content is structured as a lecture by Prof. Dr. Myint Swe, aimed at teaching the concepts of discrete random variables.

Uploaded by

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

DISCRETE

RANDOM
VARIABLES (2 & 3)

Presented By

Prof: Dr Myint Swe

Prof: Dr Myint Swe


2

Experiment Tossing 2 coins

Sample space { HH, HT, TH, TT }

Random Variable : X the number of Heads Obtained.


{ HH, HT, TH, TT }
X
X=2 X=1 X=1 X=0
P(X = 2) = P(X = 1) = P(X = 0) =
3

Probability Function

1. P(X = ) 0 = 0, 1, 2

2. ∑ P ( X=𝑥 )=1
𝑥
Discrete Random Variable (2)
4

# Marie says that a random variable X has a probability


distribution defined by the following probability function:

P(X = x) = x = 2, 3, 4

(a) Explain how you know that Marie’s function does not
describe a probability distribution.

(b) Given that the correct probability function is in the


form :

P(X = x) = x = 2, 3, 4

where k is a constant,Prof:find the exact value of k.


Dr Myint Swe
Solution:
5

(a) P(X = 2 ) + P(X = 3) + P(X = 4) = + +


= 2(+ + )
=

(b) P(X = 2) + P(X = 3) + P(X =


4) = k ( + + )
= k
P(X = 2) + P(X = 3) + P(X
= 4) = 1
k =1
Prof: Dr Myint Swe
6

for x = 2, 3, 4 is the correct probability function


when k =
# The independent random variables, X and Y have probability
distributions
P( X = x ) = x = 1, 2, 3, 4, 5, 6, 7, 8
P( Y = y ) = y = 2, 3, 6
Find P ( X > Y )

Prof: Dr Myint Swe


Solution : P (X > Y) = P (X =3, Y =2) + P (X =4, Y =2)
7

+ P (X =5, Y =2) + P (X =6, Y =2)


P (X =3, Y =2) + P (X =7, Y =2) + P (X =8, Y =2)
+ P (X =4, Y =3) + P (X =5, Y =3)
P (X =3)  P(Y =

+ P (X =6, Y =3) + P (X =7, Y =3)


2)
= 

+ P (X =8, Y =3)
P (X =4, Y =3)

+ P (X =7, Y =6) + P (X =8, Y =6)


P (X =4)  P(Y =3)
= 

=6 +5× 
= +
P (X =7, Y =6)
P (X =7)  P(Y = 6)

=
= 

Prof: Dr Myint Swe


# A fair five-sided spinner is spun. Given that
8

the sp- inner is spun five times, write down, in R


Y
R
table form, the probability distribution of the
B B
following random variables:
(a) X, the number of times red appears
(b) Y, the number of times yellow appears
The spinner is now spun until it lands on
blue, or until it has been spun five times. The
random variable Z is defined as the number of
spins in this experiment. Prof: Dr Myint Swe
Solution : (a) The spinner is spun 5 times
X = the number of times red appears
9

 X=0 X =5
n n
n n n
r R R R R R
r r r r

not
red
P(X = 0) = ( ) = 0.07776 P(X = 5) = ( ) =
5 5

0.01024 not
red
P(XX= 1)== 5((
1 )() 4 R N N
R (OR) R
N
R
N
R

= 0.2592 N
R
R N N
R
N
R R
(OR)
N N R N N
R R R R
(OR)
N N N R N
R R (OR) R R

N N N N R
R R R R Myint Swe
Prof: Dr
X =4
10
N R R R R
R (OR)
R N R R R
R
(OR)
R R N R R
R
(OR)
R R R N R
R
(OR)
R R R R N
R

P(X = 4) = 5  () () = 0.0768
4

X =2 R R N
(OR) R
N
R
N
R

R N R N N
R R R
(OR)
R N N R N
R R R
(OR)
R N N N R
R R R
(OR)
N R R N N
R R R

Prof: Dr Myint Swe


11

N R N R N
R (OR) R R

N R N N R
R R R
(OR)
N N R R N
R R R
(OR)
N N R N R
R R R
(OR)
N N N R R
R R R

P(X = 2) = 10  () () = 0.3456
2 3

Similarly we obtain P(X = 3) = 10  () () = 0.2304


3 2

Prof: Dr Myint Swe


(b)
12

P (X = y P (Y = y)

H.W
x
x) 0 0.32768
0 0.7776 1 0.4096
1 0.2592 2 0.2048
2 0.3456 3 0.0512
3 0.2304 4 0.0064
4 0.0768 5 0.00032
(c) The spinner is now spun until it lands on blue, or
5 0.01024
until it has been spun 3 times
Z = the number of spins
Prof: Dr Myint Swe
Z=1 B
13

P (Z = 1) = = 0.4
Z=2 n B

P (Z = 2) = = 0.24
B

Z=3
P (Z = 3) = = 0.144
n n B
B B

Z=4
P (Z = 4) = = 0.864
n n n B

P (Z = 5) = 1 – {P (Z = 1) + P (Z = 2) + P (Z = 3) + P (Z =
B B B

4)} = 0.1296

Prof: Dr Myint Swe


14

Cumulative Distribution Function (c . d. f)


If a particular value of X is x, the probability that X is less
than or equal to x, is written as F(x). F(x) is found by adding
together all the probabilities for those outcome that are
equal to or less than x. P(X
F(x) = Thisis written as:
P(X = x) x)
P(X = ) P(X = )
P(X = )
P(X = )
+ + +
x1 x2 x3 x4 x xn

Prof: Dr Myint Swe


15

Example Two fair coins are tossed. X is the number of


heads showing on the two coins.
H H H T T H T T

, , ,
X= X= X= X=
2 1 1 0
P(X = 0) = = 0.25
P(X = 1) = = 0.5
P(X = 2) = = 0.25

Prof: Dr Myint Swe


16

P(X = x)

0.2 0.5 0.2


50 1 5 2

F(x) = P(X  x)
F(0) = P(X  0) = P(X = 0) = 0.25
F(1) = P(X  1) = P(X = 0 or 1)
= P(X = 0) + P(X = 1) = 0.75
F(2) = P(X  2) = P(X = 0) + P(X = 1) + P(X = 2)
=1
Prof: Dr Myint Swe
17

x 0 1 2
P(X =
0.25 0.5 + 0.25
x) +
F(x) 0.25 0.75 1
Note : X x1 , x2 ----------xn
xi x1 x2 x3 xn

P(X = P(X = P(X = P(X = P(X =


+ +
x i) x1) x2) x3) xn )
F(xi) F(x1F(x
) i) F(x
= F(x
2) i - 1) +
F(x3) P(X = F(xn)

Prof: Dr Myint Swe


xi)
18

P(X = xi) = F(xi) - F(xi - 1)

Eg P(X = 5) = F(5) – F(4)


P(X = 10) = F(10) – F(9)
Supose F(x) x = x1, x2, --------, xn
Eg

(1) F(x) = 0 x < x1


(2) F(x) = 1 x  xn

Prof: Dr Myint Swe


19

# The discrete random variable X has a cumulative


distribution function F(x) defined by
x = 1 , 2 and 3
(a) Find the value of k.
(b) Draw the distribution table for the cumulative
distribution function.
(c) Write down F(2.6).
(d) Find the probability distribution of X.

Prof: Dr Myint Swe


Solution: (a) F(3) = 1 20

=1

(b) F(1) = = , F(2) = = , F(3) = 1

x 1 2 3
F(x) 1
(c) F(2.6) = P(X  2.6) = P(X  2) = F(2) =
(d) P(X = 1) = F(1) P(X = 2) = F(2) - F(1)
P(X = 3) = F(3) - F(2)

x 1 2 3
P(X=x)
Prof: Dr Myint Swe
21

# A discrete random variable X has probability distribution


X 0 1 2 3 4 5

P(X = x) 0.1 0.1 0.3 0.3 0.1 0.1

(a) Find the probability that X < 3.


(b) Find the probability that X > 3.
(c) Find the probability that 1 < X < 4.
Solution: (a) P(X < 3) = P(X = 0) + P(X = 1) + P(X = 2)
= 0.5
(b) P(X > 3) = P(X = 4) + P(X = 5) = 0.2
Prof: Dr Myint Swe
22
# A discrete random variable X has a probability
distributionx 1 2 3 4 5 6
P(X =
0.1 0.1 0.15 0.25 0.3 0.1
x)

(a) Draw up a table to show the cumulative distribution


function F(x).
(b) Write
x down
1 F(5).
2 3 (c) 4 Write
5 down6 F(2.2)
Solution: P(X =
0.1 0.1 0.15 0.25 0.3 0.1
x) +
Cumulative (a) F(x) 0.1 0.2 0.35 0.6 0.9 1
distribution
function Prof: Dr Myint Swe
23

(b)F(5) = (c) F(2.2) = P(X  2.2)


0.9 = P(X  2)
= F(2)
= 0.2
Discussion
F(x)
F(2.5) = 0.2 , F(2.99)
1
0.9
= 0.2
0
0.6
* Step 0.5
0.35
function 0.2

x
0.1

0 1 2 3 4 5 6
* Right
continuous Prof: Dr Myint Swe
24

# A discrete random variable X has a cumulative


distribution function F(x) given in the table.
x 0 1 2 3 4 5 6

F(x) 0 0.1 0.2 0.45 0. 5 0.9 1

(a) Draw up a table to show the probability


distribution of X.
(b) Write down P(X < 5 ). (c) Find P(2
* P(X = k) = F(k) –
Solution:
X 0
F(k-1)
1 2 3 4 5 6
(– (–
F( x) 0 ) 0.1 ) 0.2 0.45 0.5 0.9 1
probabilit
y P(X=x
0.1 0.1 0.25 0.05 0.4 0.1
distributi )
on of Prof: Dr Myint Swe
25
(b) P(X < 5) = P(X 4) (or) P(X = 1) + P(X = 2)
= F(4) + P(X = 3) + P(X = 4)
= 0.5 = 0.5
(c) P(2 < 5)
= P(2 4)
1 2 3
= P(X 4) - P(X 1) 4 5
= F(4) – F(1) = 0.5 – 0.1 = 0.4
(OR)
P(2 < 5) = P(X = 2 (or) 3 (or) 4 )
= P(X = 2) + P(X = 3) + P(X = 4)
= 0.1 Prof:
+Dr 0.25
Myint Swe + 0.05 = 0.4
Probability Function
26

(i) P(X = )  0 , = 1, 2, 3 … , n
(ii)
∑ P ( X =𝑥𝑖 )=1
𝑥𝑖
y = P(X= x)

P(X = ) P(X = ) P(X = )


P(X = )
0 x1 x2 x3 xn x
Cumulative Distribution function(c.d.f)
y = P(X= x)
F() = P( X
27

1
P(X = ) P(X = )
P(X = )
P(X = )
∑ P ( X =𝑥 𝑗 ) =1 0 x1
+
x2
+
x3
+
x4 x x

Suppose F() for = 0, 1, 2, 3, . . .


𝑥 𝑗≤ 𝑥

(1) 0  F()  1
(2) F() = 0 when < 0

(3) F() = P(X = )


(4) F() = 1 when  )
Finding c.d.f by using Probability Function 28

F() = F() + P(X = )

Eg: F(10) = F(9) + P(X = 10) F(5) = F(4) + P(X


= 4)
Finding probability function by using c.d.f
F()

P(X = )= F() F() F() P(X = )

𝑥𝑖 −1 𝑥𝑖

Eg: P(X = 5) = F(5) F(4)


P(X = 10) = F(10) F(9)
# The random variable X has a probability function
29

P( X = x ) = kx x = 1, 3, 5
k(x – 1) x = 2, 4, 6
where k is a constant.
(a) Find the value of k.
(b) Draw a table giving the probability distribution of
X.
(c) Find P(2  X < 5).
(d) Find F(4).
(e) Find F (1.6).
(a)P(X = 1) + P(X = 3) + P(X = 5) + P(X = 2) + P(X = 4) + P(X
30

= 6) = 1
k + 3k + 5k + k + 3k + 5k =
1
18k = 1
= (0.0556)
(b) P(X = 1) = k = P(X = 2) = k =
P(X = 3) = 3k = P(X= 4) = 3k =
P(X = x5) = 5k
1 =
2 3 4P(X =5 6) =
6 5k =
P(X = x)

(c) P(2  X < 5) = P(X = 2) + P(X = 3) + P(X = 4)


=
(d) F(4) = P(X  4)
31

= P(X = 1) + P(X = 2) + P(X = 3) +P(X = 4)


= =
(e) F(1.6) = P(X  1.6)
= P(X  1)
= P(X = 1)
=
# The discrete random variable X has a cumulative
distribution F(x) defined by
0 x=0
F(x) = x = 1, 2 and 3
1 x>3
(a) Find the value of k
(b) Find the
probability
Solution (a) F(3) = 1
=1
32

= 16
(3 + k ) = 4
k =1
F(0) = 0
(b) F(1) = = =
F(2) = =
F(3) = 1
P(X = 1) =
= -0=
x 1 2 3
P(X = 2) = =
P(X = 3) = = P(X = x)
33

# The discrete random variable X has the probability


0.1 x = -2, -1
function P(X = x) = x = 0, 1
0.3 x=2

(a) Find the value of


(b) Draw a table giving the probability distribution of X.
(c) Write down the value of F(0.3).
Solution: (a) P(X = -2) + P(X = -1) + P(X = 0) + P(X = 1) + P(X = 2)
=1

0.1 + 0.1 + + + 0.3 = 1


(b) x -2 -1 0 1 2
34

P(X = x)

(c) F(0.3) = P(X  0.3)


= P(X  0) = P(X = -2) + P(X = -1) + P(X = 0)
= 0.45
# Mean or Expected Value of a discrete random
variable
* The expected value of X is defined as:
Expected value of X = E(X) =  x P(X = x)
* If you have a statistical experiment:
a practical approach results in a frequency
distribution is a mean value, a theoretical approach
results in a probability distribution is an expected value.
# The number of television sets per house hold in
35

a survey of 100 houses in a town gave the following


frequency distribution: Number
of Sets
0 1 2 3

(a) Find the mean of this set ofFrequen


data 10
cy
(b) Draw up the probability distribution
table for the variable X where X is the
number of TV sets in a house picked at random
in the town.
(c) Find the expected value for X.
Solution: (a) fi = 100
mean = =
= 1.1
(b)
36

Number
of Sets 0 1 2 3
Fequen
10
cy

(c) E(X) = xi P(X = xi )


= 0  P(X = 0) + 1  P(X = 1) + 2  P(X = 2) + 3
 P(X = 3)
= (0  0.1) + 1  0.75 + 2  0.1 + 3  0.05
= 1.1
# The random variable X hasx a probability
1 2 3 4 5

distribution
P(X
=x) 0.1 p 0.3 q 0.2
(a) Given that E(X) = 3,
write down two equations
Solution: (a) 0.1 + p + 0.3 + q + 0.2 = 1
37

p + q = 0.4 . . . . . . . Eq: (1)


E( X ) =3
P=3
1  0.1 + 2  p + 3  0.3 + 4  q + 5 
0.2 = 3
2p + 4q = 1 . . . . . . . Eq:
(2)
By solving Eq: (1) and Eq:(2) , we get
p = 0.3 and q = 0.1
Finding an expected value for X and Xn
2

* E(X2) = x2p(X=x) (or) P


# A discrete random variable X has a probability
38

distribution
x 1 2 3 4
P(X = x)

Find E(X) and E(X2).


Solution: E(X) =xP(X = x)
= 1 + 2 + 3 + 4 = 1.92
E(X2) =x2P(X = x) =
3.6864
= 12 + 2 2 + 3  + 4  = 4.8
E(X ) ≠
2 2 2

Notice
Finding the variance of a random variable
39

The variance of X is usually written as Var(X).


The formula for Var(x): Var(X) = E ( X - E(X)) 2

Var(X) = E(X2) – (E(X))2


Standard deviation of X =
# For the following probability distribution
x -1 0 1 2 3
P(X =
x)

Write down E(X) and find Var(X).


Solution: E(X) = xP(X=x)
40

= (-1)  + 0  + 1  + 2  + 3 
=1
E(X2) = x2P(X=x)
= (-1)2  + 02  + 12  + 22  + 32 
=3
Var(X) = E(X2) – (E(X))2
=3-1 2

=2
41

# Given that Y is the score when a single unbiased die is


rolled, Find E(Y) and Var(Y).
Solution : Y = The score when a single die is rolled.
The possible value of Y are 1, 2, 3, 4, 5, 6.
The probability distribution is
y 1 2 3 4 5 6
P(Y =
y)
E(Y) = 1  + 2  + 3  + 4  + 5  + 6 
= = = 3.5
E(Y ) = 1  + 2  + 3  + 4  + 5  + 6 
2 2 2 2 2 2 2
42

=
= E(Y2)
= - (3.5) 2
= = 2.917
# Two fair cubical dice are thrown: one is red
and one is blue. The random variable M represents the
score on the red die minus the score on the blue die.
(a) Find the probability distribution of
M.
(b) Write down E(M).
(c) Find Var(M).
Solution
43

Blue
Red 1 2 3 4 5 6

1 0 -1 -2 -3 -4 -5

2 1 0 -1 -2 -3 -4

3 2 1 0 -1 -2 -3

4 3 2 1 0 -1 -2

5 4 3 2 1 0 -1

(M = -1)
P(M = -1) =
6 5 4 3 2 1 0

The possible values of M are -5,- 4,- 3,- 2, -1, 0,


1, 2, 3, 4, ,5.
The probability distribution of M is
44

m -5 -4 -3 -2 -1 0 1 2 3 4 5
P(M =
m)
E(M) = m P(M=m)
=.....
=0
E(M2) = m2 P(M=m)
= (-5)2  + (-4)2  + (-3)2  + (-2)2  + (-1)2 
+ 02  + 12  + 22  + 32  + (4)2  + 52 
= . . . . . .=
E(M2) – E(M)2 =
# Two fair cubical dice are rolled and S is the sum of
45

their scores.
(a) Find 2the distribution of S.
Solution (b) Find E(S) and
Var(S)
+
(sum)
nd

dice
st
1 dice 1 2 3 4 5 6

1 2 3 4 5 6 7

2 3 4 5 6 7 8

+
3 4 5 6 7 8 9

4 5 6 7 8 9 10 (sum)
5 6 7 8 9 10 11

(S =7)
6 7 8 9 10 11 12

P(S = 7) =
Possible values of S :
2 , 3 , 4 , … … , 12
The probability distribution of S
46

S 2 3 4 5 6 7 8 9 10 11 12

P(S = s)

E(S) = s P(S = s)
= 2  + 3  + 4 + 5  + 6  + 7 
+ 8  + 9  + 10  + 11  + 12 
= (2 + 6 + 12 + 20 + 30 + 42 + 40 + 36 + 30 + 22 +
12)
=
=7
47

(b) E(S2) = s2 P(S = s)


= 22  + 32  + 42  + 52  + 62  + 72 
+ 82  + 92  + 102  + 112  + 122 
= (4 + 18 + 48 + 100 + 180 + 294 + 320 + 324 + 300 +
242 + 144)
=

= = 5.833
# A fair coin is tossed repeatedly until a head
appears or three tosses have been made. The random
variable T represents the number of tosses of the coin.
48

(a) Show that the distribution of T is


t 1 2 3
P(T = t)

(b) Find the expectation and variance of T.


Solution:
T=1 H
T=2 T H
The P(T = 1) = , P(T = 2) = 
distribution
of T
P (T =3) = 1 –( P (T = 1) + P (T = 2) )
(b) E(T) = tP(T = t)
49

=1 +2 +3


= = 1.75
E(T2) = t2P(T = t)
= 12  + 22  + 32 
=

=
= = 0.6875
# The random variable X has the following distribution:
50

x 1 2 3

P(X = x) a b a

Where a and b are constants.


(a) Write down E(X)
(b) Given that Var(X) = 0.75, find the values of a
and b.
Solution: a+b+a=1

E(X)2a
=+a+b=2b1+ 3a Var(X) =
= 4a + 2b = (a + 4b + 9a) – 4
= 2(2a + b) 10a + 4b =
=21=2
Thank You

Prof: Dr Myint Swe

You might also like