01.09.2014 Views

Solution - Classes

Solution - Classes

Solution - Classes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ECE353: Probability and Random Processes<br />

Winter 2011 - Dr. Thinh Nguyen<br />

Homework 2 <strong>Solution</strong><br />

1. Genetics.<br />

(a) The basic rules of genetics were discovered in mid-1800s by Mendel, who found that<br />

each characteristics of a pea plant, such as whether the seeds were green or yellow, is<br />

determined by two genes, one from each parent. Each gene is either dominant d or<br />

recessive r. Mendel’s experiment is to select a plant and observe whether the genes are<br />

both dominant d, both recessive r, or one of each (hybrid) h. In this pea plants, Mendel<br />

found that yellow seeds were a dominant trait over green seeds. A yy pea with two yellow<br />

genes has yellow seeds; a gg pea with two recessive genes has green seeds; a hybrid gy or<br />

yg pea has yellow seeds. In one of Mendel’s experiments, he started with a parental<br />

generation in which half the pea plants were yy and half the plants were gg. The two<br />

groups were crossbred so that each pea plant in the first generation was gy. In the second<br />

generation, each plant was equally likely to inherit a y or a g gene from each first<br />

generation parent. What is the probability P(Y ) that a randomly chosen pea plant in the<br />

second generation has yellow seeds?<br />

<strong>Solution</strong>:<br />

P(Y) = 1 – P(G) = 1 – P(gg) = 1 – 1/4 = 3/4<br />

(b) One of Mendel’s most significant results was the conclusion that genes determining<br />

different characteristics are transmitted independently. In pea plants, Mendel found that<br />

round peas are a dominant trait over wrinkled peas. Mendel crossbred a group of (rr, yy)<br />

peas with a group of (ww, gg) peas. In this notation, rr denotes a pea with two “round”<br />

genes and ww denotes a pea with two “wrinkled” genes. The first generation were either<br />

(rw, yg), (rw, gy), (wr, yg), or (wr, gy). plants with both hybrid shape and hybrid color.<br />

Breeding among the first generation yielded second-generation plants in which genes for<br />

each characteristics were equally likely to be either dominant or recessive. What is the<br />

probability P(Y ) that a second-generation pea plant has yellow seeds? What is the<br />

probability P(R) that a second-generation plant has round peas? Are R and Y independent<br />

events? How many visibly different kinds of pea plants would Mendel observe in the<br />

second generation? What are the probabilities of each of these kinds?<br />

<strong>Solution</strong>:


Similar to part (a), P(Y) = 3/4 and P(R) = 3/4<br />

R and Y are independent events.<br />

P(G) = 1/4 and P(W) = 1/4<br />

There are 4 kind of visibly different pea plants: (R, Y) (R,G) (W,Y) (W,G) with<br />

probability as follow<br />

P<br />

P<br />

P<br />

P<br />

3 3<br />

, = × =<br />

4 4<br />

( R Y )<br />

3 1<br />

, = × =<br />

4 4<br />

( R G)<br />

1 3<br />

, = × =<br />

4 4<br />

( W Y )<br />

1 1<br />

, = × =<br />

4 4<br />

( W G)<br />

9<br />

16<br />

3<br />

16<br />

3<br />

16<br />

1<br />

16<br />

2. Medical Test. Suppose that for the general population, 1 in 5000 people carries the<br />

human immunodeficiency virus (HIV). A test for the presence of HIV yields either a<br />

positive (+) or negative (-) response. Suppose the test gives the correct answer 99% of the<br />

time.<br />

(a) What is P(−|H), the conditional probability that a person tests negative given that the<br />

person does have the HIV virus?<br />

P<br />

( − | H ) = P( incorrect test) = 0. 01<br />

(b) What is P(H|+), the conditional probability that a randomly chosen person has the<br />

HIV virus given that the person tests positive?<br />

P<br />

( H | + )<br />

=<br />

P<br />

( H,<br />

+ )<br />

P( + )<br />

=<br />

P<br />

( + | H ) P( H )<br />

( + | H ) P( H ) + P( + | H ) P( H )<br />

0.99×<br />

0.0002<br />

=<br />

= 0.019<br />

0.99×<br />

0.0002 + 0.01×<br />

0.9998<br />

P<br />

3. Cards. Shuffle a deck of cards and pick two cards at random. Observe the sequence of<br />

the two cards in the order in which they were chosen.<br />

(a) How many outcomes are in the sample space?<br />

52<br />

P<br />

2<br />

= 52 × 51 = 2652


(b) How many outcomes are in the event that two cards are the same type but different<br />

suits?<br />

4<br />

13× P<br />

2<br />

= 13×<br />

12 = 156<br />

(c) What is the probability that the two cards are the same type but different suits?<br />

P = 156 / 2652 = 0.059<br />

(d) Suppose the experiment specifies observing the set of two cards without considering<br />

the order in which they are selected, and redo parts (a)-(c)<br />

Without considering card order, we have:<br />

52<br />

52 2<br />

i. C<br />

2<br />

= P = 1326<br />

2<br />

4<br />

4 P2<br />

ii. 13×<br />

C<br />

2<br />

= 13×<br />

= 78<br />

2<br />

78<br />

iii. P = = 0. 059<br />

1326<br />

4. Basketball. A basketball team has three pure centers, four pure forwards, four pure<br />

guards, and one swingman who can play either guard or forward. A pure position player<br />

can play only the designated position. If the coach must start a lineup with one center,<br />

two forwards, and two guards, how many possible lines can the coach choose?<br />

⎛3⎞⎡⎛4⎞⎛<br />

4⎞<br />

⎛4⎞⎛4⎞<br />

⎛4⎞⎛<br />

4⎞⎤<br />

⎜ ⎟⎢⎜<br />

⎟⎜<br />

⎟ + ⎜ ⎟⎜<br />

⎟ + ⎜ ⎟⎜<br />

⎟⎥<br />

= 3 36<br />

⎝1<br />

⎠⎣⎝2⎠⎝<br />

2⎠<br />

⎝1<br />

⎠⎝2⎠<br />

⎝2⎠⎝1<br />

⎠⎦<br />

( + 24 + 24) = 252<br />

5. Football. There is a collection of field goal kickers, which can be divided into two<br />

groups 1 and 2. Group i has 3i kickers. On any kick, a kicker from group i will kick a<br />

field goal with probability 1/(i+1), independent of the outcome of any other kicks by that<br />

kicker or any other kicker.<br />

(a) A kicker is selected at random from among all the kickers and attempts one field goal.<br />

Let K be the event that a field goal is kicked. Find P(K).<br />

Let G i is the event that a selected kicker belongs to group i, then<br />

P(<br />

K ) = P( K | G1<br />

) P( G1<br />

) + P( K | G2<br />

) P( G2<br />

)<br />

1 3 1 6 7<br />

= × + × =<br />

2 3 + 6 3 3 + 6 18


(b) Two kickers are selected at random. For j = 1, 2, let Kj be the event that kicker j kicks<br />

a field goal. Find P(K 1 ∩ K 2 ). Are K 1 and K 2 independent events?<br />

P<br />

Now P ( )<br />

Let<br />

( K1<br />

∩ K<br />

2<br />

) = P( K1<br />

∩ K<br />

2<br />

| G1,<br />

G1<br />

) P( G1,<br />

G1<br />

) + P( K1<br />

∩ K<br />

2<br />

| G1,<br />

G2<br />

) P( G1,<br />

G2<br />

)<br />

+ P( K ∩ K | G , G ) P( G , G ) + P( K ∩ K | G , G ) P( G , G )<br />

K 1 =<br />

7<br />

18<br />

1<br />

2<br />

2<br />

1 1 3 2 1 1 3 6 1<br />

= × × × + × × × + ×<br />

2 2 9 8 2 3 9 8 3<br />

195<br />

= = 0.226<br />

864<br />

'<br />

G<br />

i<br />

is the event that the second kicker belongs to group i, then<br />

P<br />

Therefore,<br />

P<br />

' '<br />

' '<br />

( K2<br />

) = P( K2<br />

| G1<br />

) P( G ) + P( K2<br />

| G ) P( G )<br />

1<br />

2<br />

2<br />

' '<br />

'<br />

= P( K2<br />

| G1<br />

)( P( G | G1<br />

) P( G1<br />

) + P( G | G2<br />

) P( G2<br />

))<br />

1<br />

1<br />

' '<br />

'<br />

+ P( K | G )( P( G | G ) P( G ) + P( G | G ) P( G ))<br />

2<br />

2<br />

2<br />

1<br />

1<br />

1<br />

2<br />

1<br />

1<br />

2<br />

1<br />

2<br />

2<br />

6 3 1 1 6 5<br />

× × + × × ×<br />

9 8 3 3 9 8<br />

1 ⎛ 2 3 3 6 ⎞ 1 ⎛ 6 3 5 6 ⎞<br />

= ⎜ × + × ⎟ + ⎜ × + × ⎟<br />

2 ⎝ 2 + 6 3 + 6 3 + 5 3 + 6 ⎠ 3⎝<br />

2 + 6 3 + 6 3 + 5 3 + 6 ⎠<br />

1 ⎛ 2 3 3 6 ⎞ 1 ⎛ 6 3 5 6 ⎞ 1<br />

= ⎜ × + × ⎟ + ⎜ × + × ⎟ =<br />

2 ⎝ 8 9 8 9 ⎠ 3 ⎝ 8 9 8 9 ⎠ 3<br />

( K ) P( K ) × = ≠ P( K ∩ K )<br />

1<br />

2<br />

2<br />

7 1 7<br />

=<br />

1 2<br />

, K 1 and K 2 are NOT independent.<br />

18 3 48<br />

2<br />

2<br />

2<br />

2<br />

2<br />

(c) A kicker is selected at random and attempts 10 field goals. Let M be the number of<br />

misses. Find P(M = 5).<br />

P<br />

( M = 5) = P( M = 5 | G ) P( G ) + P( M = 5 | G ) P( G )<br />

5<br />

1<br />

1<br />

5<br />

⎛10⎞⎛<br />

1 ⎞ ⎛ 1 ⎞ 3 ⎛10⎞⎛<br />

1 ⎞<br />

= ⎜ ⎟⎜<br />

⎟ ⎜1<br />

− ⎟ + ⎜ ⎟⎜<br />

⎟<br />

⎝ 5 ⎠⎝<br />

2 ⎠ ⎝ 2 ⎠ 9 ⎝ 5 ⎠⎝<br />

3 ⎠<br />

10<br />

10 6<br />

⎛10⎞⎛<br />

1 ⎞ 1 ⎛10⎞⎛<br />

1 ⎞ 2<br />

= ⎜ ⎟⎜<br />

⎟ + ⎜ ⎟⎜<br />

⎟<br />

⎝ 5 ⎠⎝<br />

2 ⎠ 3 ⎝ 5 ⎠⎝<br />

3 ⎠ 3<br />

6<br />

1 ⎛10⎞⎡<br />

1 2 ⎤<br />

= ⎜ ⎟ = 0.173<br />

10 10<br />

3 5<br />

⎢ + ⎥<br />

⎝ ⎠⎣2<br />

3 ⎦<br />

5<br />

2<br />

⎛ 1 ⎞<br />

⎜1<br />

− ⎟<br />

⎝ 3 ⎠<br />

2<br />

5<br />

6<br />

9


6. System reliability. A particular operation has six components. Each component has a<br />

failure probability q, independent of any other component. The operation is successful if<br />

both 1) Components 1, 2, and 3 all work, or component 4 works and 2) Either component<br />

5 or component 6 works.<br />

(a) What is the probability P(W) that the operation is successful?<br />

Let C i is the event that component i works, then<br />

And<br />

W<br />

=<br />

( C C C ∪ C ) ∩ ( C ∪ )<br />

1 2 3 4 5<br />

C6<br />

( ) = ( P( C1C2C3<br />

) + P( C4<br />

) − P( C1C2C3C4<br />

))( P( C5<br />

) + P( C6<br />

) − P( C5C6<br />

))<br />

3<br />

4<br />

2<br />

= ( 1−<br />

q) + ( 1−<br />

q) − ( 1−<br />

q)<br />

)( ( 1−<br />

q) + ( 1−<br />

q) − ( 1−<br />

q)<br />

)<br />

2<br />

2<br />

3<br />

= ( 1+<br />

q)( 1−<br />

q) 1+<br />

( 1−<br />

q) − ( 1−<br />

q)<br />

P W<br />

( )<br />

(b) Suppose we can replace any one of the components with an ultrareliable component<br />

that has a failure probability of q/2. Which component should we replace?<br />

Since C 1 , C 2 , and C 3 are symmetric; C 5 , and C 6 are symmetric. Let consider 3 following<br />

cases:<br />

- Replace C 1 :<br />

P<br />

1<br />

P<br />

- Replace C 4 :<br />

P<br />

P<br />

'<br />

'<br />

( W ) = ( P( C1C2C3<br />

) + P( C4<br />

) − P( C1C2C3C4<br />

)( P( C5<br />

) + P( C6<br />

) − P( C5C6<br />

))<br />

⎛⎛ q ⎞ 2 ⎛ q ⎞ 3 ⎞<br />

2<br />

= ⎜⎜1 − ( 1 − q) + ( 1 − q) − ⎜1<br />

− ⎟( 1−<br />

q) ⎟( 1−<br />

q) + ( 1−<br />

q) − ( 1−<br />

q)<br />

)<br />

⎝⎝<br />

⎟<br />

2 ⎠<br />

⎝<br />

2 ⎠<br />

⎛ q 2 q 3 ⎞ 2 q 2<br />

3 2<br />

( W ) − P( W ) = ⎜ ( 1−<br />

q) − ( 1−<br />

q) ⎟( 1−<br />

q ) = ( 1−<br />

q) − ( 1−<br />

q)<br />

)( − q )<br />

1<br />

1<br />

2<br />

P<br />

⎝ 2<br />

2<br />

'<br />

'<br />

( W ) = ( P( C1<br />

C2C3<br />

) + P( C4<br />

) − P( C1<br />

C2C3C4<br />

) P( C5<br />

) + P( C6<br />

) − P( C5C6<br />

)<br />

⎛ 3 ⎛ q ⎞ ⎛ q ⎞ 3 ⎞<br />

2<br />

= ⎜( 1 − q) + ⎜1<br />

− − ⎜1<br />

− ⎟( 1−<br />

q) ⎟( 1−<br />

q) + ( 1−<br />

q) − ( 1−<br />

q)<br />

)<br />

⎝<br />

⎝<br />

⎟<br />

2 ⎠<br />

⎝<br />

2 ⎠<br />

⎠<br />

⎠<br />

⎠<br />

2<br />

( )<br />

⎛ q q 3 ⎞ 2 q<br />

3 2<br />

( W ) − P( W ) = ⎜ − ( 1−<br />

q) ⎟( 1−<br />

q ) = ( 1−<br />

( 1−<br />

q)<br />

)( − q )<br />

2<br />

1<br />

⎝ 2<br />

q<br />

2<br />

( W ) − P ( W ) = 1−<br />

( 1−<br />

q)<br />

2<br />

2 2<br />

( )( 1−<br />

q ) 0<br />

2 1<br />

><br />

⎠<br />

2


- Replace C 5 :<br />

P<br />

P<br />

3<br />

'<br />

'<br />

( W ) = ( P( C1<br />

C2C3<br />

) + P( C4<br />

) − P( C1<br />

C2C3C4<br />

)( P( C5<br />

) + P( C6<br />

) − P( C5C6<br />

)<br />

3<br />

4 ⎛⎛ q ⎞ ⎛ q ⎞<br />

= ( 1 − q) + ( 1 − q) − ( 1 − q)<br />

) ⎜⎜1<br />

− + ( 1 − q) − ⎜1<br />

− ⎟( 1−<br />

q)<br />

⎞<br />

⎟ ⎟<br />

⎝⎝<br />

2 ⎠ ⎝ 2 ⎠ ⎠<br />

=<br />

2<br />

3<br />

4 ⎛ q<br />

( ) ( ) ( ) ) ⎟ ⎞<br />

1 − q + 1 − q − 1 − q<br />

⎜1<br />

−<br />

⎝ 2 ⎠<br />

2<br />

q<br />

2<br />

( W ) − P ( W ) = ( 1−<br />

q)( 2 − q) 0<br />

2 3<br />

><br />

So we should replace C 4 .<br />

7. King of Hearts (Bonus Problem)<br />

Two identical packs of 52 cards A and B are shuffled thoroughly. One card is picked<br />

from pack A and shuffled with pack B. The top card from packet A is turned up. If this is<br />

the Queen of Hearts, what is the chance that the top card in B will be the King of Hearts?<br />

Ans:<br />

C 1A = card picked first from pack A<br />

C 2A = card picked second from pack A<br />

C B = card picked from pack B<br />

We need P{ C KH | C QH}<br />

B<br />

2 A<br />

{ C<br />

B<br />

= ,<br />

2 A<br />

= }<br />

P{ C = QH}<br />

P KH C QH<br />

= = =<br />

2 A<br />

{ C<br />

B<br />

= ,<br />

2A = } = { C<br />

B<br />

= ,<br />

2A = |<br />

1A = } { 1A<br />

= }<br />

+ P{ C<br />

B<br />

= KH, C2A = QH | C1A = QH} P{ C1A<br />

= QH}<br />

+ P{ C = KH, C = QH | C ≠ KHorQH} P{ C ≠ KHorQH}<br />

P KH C QH P KH C QH C KH P C KH<br />

B 2A 1A 1A<br />

Each of the joint probability in the above equation can be expressed as a product since<br />

they are independent conditional on the value of C 1A .


{ C<br />

B<br />

= ,<br />

2A = } = { C<br />

B<br />

= |<br />

1A = } { 2A = |<br />

1A = } { 1A<br />

= }<br />

+ P{ C<br />

B<br />

= KH | C1A = QH} P{ C2A = QH | C1A = QH} P{ C1A<br />

= QH}<br />

+ P{ C = KH | C ≠ KHor QH} P{ C = QH | C ≠ KHorQH} P{ C ≠ KHorQH}<br />

P KH C QH P KH C KH P C QH C KH P C KH<br />

B 1A 2A 1A 1A<br />

2 1 1 1 1 1 1 5 0<br />

= ⋅ ⋅ + ⋅0⋅ + ⋅ ⋅<br />

53 51 52 53 52 53 51 52<br />

52<br />

=<br />

53⋅52⋅51<br />

P C = QH = P C = QH | C = QH P C = QH<br />

{ 2A } { 2A 1A } { 1A<br />

}<br />

+ P{ C = QH | C ≠QH} P{ C ≠QH}<br />

2A 1A 1A<br />

1 1 51<br />

= 0⋅ + ⋅ 52 51 52<br />

=<br />

1<br />

52<br />

{ C | }<br />

B<br />

2 A<br />

{ C<br />

B<br />

= ,<br />

2 A<br />

= }<br />

P{ C = QH}<br />

P KH C QH<br />

P = KH C = QH =<br />

2 A<br />

52 52<br />

= =<br />

53⋅51<br />

2703

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!