basic concepts of discrete random variables solved problems

5
3.1.6 Solved Problems: Discrete Random Variables Problem 1 Let be a discrete random variable with the following PMF a. Find , the range of the random variable . b. Find . c. Find . d. Find . Solution a. The range of can be found from the PMF. The range of consists of possible values for . Here we have b. The event can happen only if is or . Thus, c. Similarly, we have d. This is a conditional probability problem, so we can use our famous formula . We have Problem 2 I roll two dice and observe two numbers and . a. Find and the PMFs of and . b. Find . c. Find . d. Let . Find the range and PMF of . e. Find . Solution a. We have . Assuming the dice are fair, all values are equally likely so Similarly for ,

Upload: moumita-dey

Post on 13-Apr-2016

2 views

Category:

Documents


0 download

DESCRIPTION

Basic Concepts of Discrete Random Variables Solved Problems

TRANSCRIPT

Page 1: Basic Concepts of Discrete Random Variables Solved Problems

3.1.6 Solved Problems:Discrete Random Variables

Problem 1

Let be a discrete random variable with the following PMF

a. Find , the range of the random variable .b. Find .c. Find .d. Find .

Solutiona. The range of can be found from the PMF. The range of consists of possible values for . Here we have

b. The event can happen only if is or . Thus,

c. Similarly, we have

d. This is a conditional probability problem, so we can use our famous formula . We have

Problem 2

I roll two dice and observe two numbers and .

a. Find and the PMFs of and .b. Find .c. Find .d. Let . Find the range and PMF of .e. Find .

Solutiona. We have . Assuming the dice are fair, all values are equally likely so

Similarly for ,

X

(x) =PX

⎩⎨⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪

0.10.20.20.30.20

for x = 0.2for x = 0.4for x = 0.5for x = 0.8for x = 1otherwise

RX XP(X ≤ 0.5)P(0.25 < X < 0.75)P(X = 0.2|X < 0.6)

X X X

= 0.2, 0.4, 0.5, 0.8, 1.RX

X ≤ 0.5 X 0.2, 0.4, 0.5P(X ≤ 0.5) = P(X ∈ 0.2, 0.4, 0.5)

= P(X = 0.2) + P(X = 0.4) + P(X = 0.5)= (0.2) + (0.4) + (0.5)PX PX PX

= 0.1 + 0.2 + 0.2 = 0.5

P(0.25 < X < 0.75) = P(X ∈ 0.4, 0.5)= P(X = 0.4) + P(X = 0.5)= (0.4) + (0.5)PX PX

= 0.2 + 0.2 = 0.4

P(A|B) =P(A∩B)

P(B)

P(X = 0.2|X < 0.6) =P((X=0.2) and (X<0.6))

P(X<0.6)

=P(X=0.2)

P(X<0.6)

=(0.2)PX

(0.2)+ (0.4)+ (0.5)PX PX PX

= = 0.20.10.1+0.2+0.2

X Y

,RX RY X YP(X = 2, Y = 6)P(X > 3|Y = 2)

Z = X + Y ZP(X = 4|Z = 8)

= = 1, 2, 3, 4, 5, 6RX RY

(k) =PX

⎧⎩⎨

160

for k = 1, 2, 3, 4, 5, 6

otherwise

Y

(k) =PY

⎧⎩⎨

160

for k = 1, 2, 3, 4, 5, 6

otherwise

X Y

Page 2: Basic Concepts of Discrete Random Variables Solved Problems

b. Since and are independent random variables, we can write

.

c. Since and are independent, knowing the value of does not impact the probabilities for ,

.

d. First, we have . Thus, we need to find for . We have

;

;

.

We can continue similarly:;

;

;

;

;

;

;

.

It is always a good idea to check our answers by verifying that . Here, we have

.

e. Note that here we cannot argue that and are independent. Indeed, seems to completely depend on , . To find theconditional probability , we use the formula for conditional probability

.

Problem 3

I roll a fair die repeatedly until a number larger than is observed. If is the total number of times that I roll the die, find , for .

SolutionIn each trial, I may observe a number larger than with probability . Thus, you can think of this experiment as repeating a Bernoulliexperiment with success probability until you observe the first success. Thus, is a geometric random variable with parameter ,

. Hence, we have

Problem 4

You take an exam that contains multiple­choice questions. Each question has possible options. You know the answer to questions, but you have no ideaabout the other questions so you choose answers randomly. Your score on the exam is the total number of correct answers. Find the PMF of . What is

X YP(X = 2, Y = 6) = P(X = 2)P(Y = 6)

= ⋅ =16

16

136

X Y X YP(X > 3|Y = 2) = P(X > 3)

= (4) + (5) + (6)PX PX PX

= + + =16

16

16

12

= 2, 3, 4, . . . , 12RZ (k)PZ k = 2, 3, . . . , 12(2)PZ = P(Z = 2) = P(X = 1, Y = 1)

= P(X = 1)P(Y = 1) (since X and Y are independent)= ⋅ =1

616

136

(3)PZ = P(Z = 3) = P(X = 1, Y = 2) + P(X = 2, Y = 1)= P(X = 1)P(Y = 2) + P(X = 2)P(Y = 1)= ⋅ + ⋅ =1

616

16

16

118

(4)PZ = P(Z = 4) = P(X = 1, Y = 3) + P(X = 2, Y = 2) + P(X = 3, Y = 1)= 3 ⋅ =1

36112

(5)PZ = =436

19

(6)PZ = 536

(7)PZ = =636

16

(8)PZ = 536

(9)PZ = =436

19

(10)PZ = =336

112

(11)PZ = =236

118

(12)PZ = 136

(z) = 1∑z∈RZPZ

(z)∑z∈RZPZ = + + + + +1

36236

336

436

536

636

+ + + + +536

436

336

236

136

= 1

X Z Z X Z = X + YP(X = 4|Z = 8)

P(X = 4|Z = 8) =P(X=4,Z=8)

P(Z=8)

=P(X=4,Y =4)

P(Z=8)

= (since X and Y are independent)P(X=4)P(Y =4)

P(Z=8)

⋅16

16

536

= 15

4 N P(N = k) k = 1, 2, 3, . . .

4 =26

13

p = 13 N p = 1

3N ∼ Geometric( )1

3

(k) =PN

⎧⎩⎨ (

13

23

)k−1

0

for k = 1, 2, 3, . . .

otherwise

20 4 1010 X X

P(X > 15)

Page 3: Basic Concepts of Discrete Random Variables Solved Problems

?

SolutionLet's define the random variable as the number of your correct answers to the questions you answer randomly. Then your total score will be

. First, let's find the PMF of . For each question your success probability is . Hence, you perform independent trials and is the number of successes. Thus, we conclude , so

Now we need to find the PMF of . First note that . We can write

;

.

So, you get the idea. In general for ,

.

To summarize,

Problem 5

Let and be two independent random variables. Define a new random variable as . Find the PMF of .

SolutionThis problem is very similar to Example 3.7, and we can solve it using the same methods. We will show that . To see this,consider a sequence of s and s that is the result of independent coin tosses with , (Figure 3.2). If we define the random variable asthe number of coin tosses until the th heads is observed, then . Now, if we look at the rest of the sequence and count thenumber of heads until we observe more heads, then the number of coin tosses in this part of the sequence is . Looking from thebeginning, we have repeatedly tossed the coin until we have observed heads. Thus, we conclude the random variable defined as

has a distribution.

Fig.3.2 ­ Sum of two Pascal random variables.

In particular, remember that . Thus, we have shown that if and are two independent random variables, then is a random variable. More generally, we can say that if are independent random variables, then the random variable defined by has a distribution.

Problem 6

P(X > 15)

Y 10X = Y + 10 Y 1

4 10Bernoulli( )1

4 Y Y ∼ Binomial(10, )14

(y) =PY

⎧⎩⎨⎪⎪

( )( (10y

14

)y 34

)10−y

0

for y = 0, 1, 2, 3, . . . , 10

otherwise

X = Y + 10 = 10, 11, 12, . . . , 20RX

(10)PX = P(X = 10) = P(Y + 10 = 10)

= P(Y = 0) = ( ) =100 ( )1

4

0 ( )34

10−0 ( )34

10

(11)PX = P(X = 11) = P(Y + 10 = 11)

= P(Y = 1) = ( ) = 10101 ( )1

4

1 ( )34

10−114 ( )3

4

9

k ∈ = 10, 11, 12, . . . , 20RX

(k)PX = P(X = k) = P(Y + 10 = k)

= P(Y = k − 10) = ( )10k−10 ( )1

4

k−10 ( )34

20−k

(k) =PX

⎧⎩⎨⎪⎪

( )( (10

k − 1014

)k−10 34

)20−k

0

for k = 10, 11, 12, . . . , 20

otherwise

X ∼ Pascal(m, p) Y ∼ Pascal(l, p) Z = X + YZ

Z ∼ Pascal(m + l, p)H T P(H) = p X

m X ∼ Pascal(m, p)l Y ∼ Pascal(l, p)

m + l ZZ = X + Y Pascal(m + l, p)

Pascal(1, p) = Geometric(p) X Y Geometric(p)X + Y Pascal(2, p) , , , . . . ,X1 X2 X3 Xm m

Geometric(p) X X = + +. . . +X1 X2 Xm Pascal(m, p)

10 X

Page 4: Basic Concepts of Discrete Random Variables Solved Problems

The number of customers arriving at a grocery store is a Poisson random variable. On average customers arrive per hour. Let be the number of customersarriving from to . What is ?

SolutionWe are looking at an interval of length hours, so the number of customers in this interval is . Thus,

Problem 7

Let and be two independent random variables. Define a new random variable as . Find the PMF of .

SolutionFirst note that since and , we can write . We have

.

Thus, we conclude that .

Problem 8Let be a discrete random variable with the following PMF

I define a new random variable as .

a. Find the range of .b. Find the PMF of .

SolutionHere, the random variable is a function of the random variable . This means that we perform the random experiment and obtain , and thenthe value of is determined as . Since is a random variable, is also a random variable.

a. To find , we note that , and

.

b. Now that we have found , to find the PMF of we need to find , and :

;

;

;

10 X10am 11 : 30am P(10 < X ≤ 15)

1.5 X ∼ Poisson(λ = 1.5 × 10 = 15)P(10 < X ≤ 15) = (k)∑15

k=11 PX

= ∑15k=11

e−1515k

k!

= [ + + + + ]e−15 1511

11!1512

12!1513

13!1514

14!1515

15!

= 0.4496

X ∼ Poisson(α) Y ∼ Poisson(β) Z = X + Y Z

= 0, 1, 2, . . RX = 0, 1, 2, . . RY = 0, 1, 2, . . RZ

(k)PZ = P(X + Y = k)

= P(X + Y = k|X = i)P(X = i)∑ki=0 (law of total probability)

= P(Y = k − i|X = i)P(X = i)∑ki=0

= P(Y = k − i)P(X = i)∑ki=0 (since X and Y are independent)

= ∑ki=0

e−ββ k−i

(k−i)!e−α αi

i!

= e−(α+β) ∑ki=0

αi β k−i

(k−i)!i!

= e−(α+β)

k! ∑ki=0

k!(k−i)!i!

αiβk−i

= ( )e−(α+β)

k! ∑ki=0

ki

αiβk−i

= (α + βe−(α+β)

k! )k (by the binomial theorem)

Z ∼ Poisson(α + β)

X

(k) =PX

⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪⎪

14181814140

for k = −2

for k = −1

for k = 0

for k = 1

for k = 2

otherwise

Y Y = (X + 1)2

YY

Y X X = x

Y Y = (x + 1)2X Y

RY = −2, −1, 0, 1, 2RX

RY = y = (x + 1 |x ∈ )2RX

= 0, 1, 4, 9

= 0, 1, 4, 9RY Y (0), (1), (4)PY PY PY (9)PY

(0)PY = P(Y = 0) = P((X + 1 = 0))2

= P(X = −1) = 18

(1)PY = P(Y = 1) = P((X + 1 = 1))2

= P((X = −2) or (X = 0))(−2) + (0) = + =PX PX

14

18

38

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

Page 5: Basic Concepts of Discrete Random Variables Solved Problems

;

.

Again, it is always a good idea to check that . We have

← previousnext →

(4)PY = P(Y = 4) = P((X + 1 = 4))2

= P(X = 1) = 14

(9)PY = P(Y = 9) = P((X + 1 = 9))2

= P(X = 2) = 14

(y) = 1∑y∈RYPY

(y) = + + + = 1.∑y∈RY

PY

18

38

14

14