16.01.2013 Views

ECE 316 – Probability Theory and Random Processes

ECE 316 – Probability Theory and Random Processes

ECE 316 – Probability Theory and Random Processes

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.

Problems<br />

<strong>ECE</strong> <strong>316</strong> <strong>–</strong> <strong>Probability</strong> <strong>Theory</strong> <strong>and</strong> R<strong>and</strong>om <strong>Processes</strong><br />

Chapter 4 Solutions (Part 2)<br />

Xinxin Fan<br />

20. A gambling book recommends the following “winning strategy” for the game of roulette. It<br />

recommends that a gambler bet $1 on red. If red appears (which has probability 18<br />

38 ), then the<br />

gambler should take her $1 profit <strong>and</strong> quit. If the gambler loses this bet (which has probability<br />

20<br />

38 of occurring), she should make additional $1 bets on red on each of the next two spins of<br />

the roulette wheel <strong>and</strong> then quit. Let X denote the gambler’s winnings when she quits.<br />

(a) Find P {X > 0}.<br />

(b) Are you convinced that the strategy is indeed a “winning” strategy? Explain your answer!<br />

(c) Find E[X].<br />

Solution. (a) The event that X > 0 denotes that the gambler wins the first bet or he loses<br />

the first bet <strong>and</strong> wins the next two bets. Therefore, we get<br />

P {X > 0} = P {win first bet} + P {lose, win, win} = 18 20<br />

+<br />

38 38 ·<br />

� �2 18<br />

≈ 0.5981.<br />

38<br />

(b) The strategy described above is not a “winning” strategy because if the gambler wins<br />

then he or she wins $1. However, a loss would either be $1 or $3.<br />

(c) We first note that the r<strong>and</strong>om variable X can take on 1, −1 <strong>and</strong> −3, where “<strong>–</strong>” denotes<br />

that the gambler loses money. Then we obtain<br />

P {X = 1} = P {win first bet} + P {lose, win, win} = 18 20<br />

+<br />

38 38 ·<br />

� �2 18<br />

,<br />

38<br />

P {X = −1} = P {lose, lose, win} + P {lose, win, lose} = 2 · 18<br />

38 ·<br />

� �2 20<br />

,<br />

38<br />

� �3 20<br />

P {X = −3} = P {lose, lose, lose} = .<br />

38<br />

Therefore, we can compute the expectation as follows:<br />

E[X] = 1 · P {X = 1} + (−1) · P {X = −1} + (−3) · P {X = −3} ≈ −0.108.<br />

25. A typical slot machine has 3 dials, each with 20 symbols (cherries, lemons, plums, oranges,<br />

bells, <strong>and</strong> bars). A typical set of dials is shown in Table 1. According to this table, of the<br />

20 slots on dial 1, 7 are cherries, 3 are oranges, <strong>and</strong> so on. A typical payoff on a 1-unit<br />

1


Table 1: Slot machine dial setup<br />

Dial 1 Dial 2 Dial 3<br />

Cherries 7 7 0<br />

Oranges 3 7 6<br />

Lemons 3 0 4<br />

Plums 4 1 6<br />

Bells 2 2 3<br />

Bars 1 3 1<br />

20 20 20<br />

Table 2: Typical payoff on a 1-unit bet<br />

Dial 1 Dial 2 Dial 3 Payoff<br />

Bar Bar Bar 60<br />

Bell Bell Bell 20<br />

Bell Bell Bar 18<br />

Plum Plum Plum 14<br />

Orange Orange Orange 10<br />

Orange Orange Bar 8<br />

Cherry Cherry Anything 2<br />

Cherry No cherry Anything 0<br />

Anything else -1<br />

bet is shown in Table 2. Compute the player’s expected winnings on a single play of the slot<br />

machine. Assume that each dial acts independently.<br />

Solution. Let X denote the payoff on a 1-unit bet. Then we get<br />

P {X = 60} = P {Bar, Bar, Bar} = 1 3 1 3<br />

· · =<br />

20 20 20 8000 ,<br />

P {X = 20} = P {Bell, Bell, Bell} = 2 2 3 12<br />

· · =<br />

20 20 20 8000 ,<br />

P {X = 18} = P {Bell, Bell, Bar} = 2 2 1 4<br />

· · =<br />

20 20 20 8000 ,<br />

P {X = 14} = P {Plum, Plum, Plum} = 4 1 6 24<br />

· · =<br />

20 20 20 8000 ,<br />

P {X = 10} = P {Orange, Orange, Orange} = 3 7 6 126<br />

· · =<br />

20 20 20 8000 ,<br />

P {X = 8} = P {Orange, Orange, Bar} = 3 7 1 21<br />

· · =<br />

20 20 20 8000 ,<br />

P {X = 2} = P {Cherry, Cherry, Anything} = 7 7 49<br />

· =<br />

20 20 400 ,<br />

2


P {X = 0} = P {Cherry, No cherry, Anything} = 7 13 91<br />

· =<br />

20 20 400 ,<br />

P {X = −1} =<br />

3 + 12 + 4 + 24 + 126 + 21 + 980 + 1820<br />

P {Anything else} = 1 −<br />

8000<br />

= 501<br />

800 .<br />

Therefore, the player’s expected winnings on a single play of the slot machine can be computed<br />

as follows:<br />

E[X] = 60 · P {X = 60} + 20 · P {X = 20} + 18 · P {X = 18} +<br />

= 180 + 240 + 72 + 336 + 1260 + 168 + 1960 − 5010<br />

14 · P {X = 14} + 10 · P {X = 10} + 8 · P {X = 8} +<br />

2 · P {X = 2} + 0 · P {X = 0} + (−1) · P {X = −1}<br />

= −0.09925.<br />

8000<br />

32. To determine whether or not they have a certain disease, 100 people are to have their blood<br />

tested. However, rather than testing each individual separately, it has been decided first to<br />

group the people in groups of 10. The blood samples of the 10 people in each group will be<br />

pooled <strong>and</strong> analyzed together. If the test is negative, one test will suffice for the 10 people;<br />

whereas, if the test is positive each of the 10 people will also be individually tested <strong>and</strong>, in<br />

all, 11 tests will be made on this group. Assume the probability that a person has the disease<br />

is 0.1 for all people, independently of each other, <strong>and</strong> compute the expected number of tests<br />

necessary for each group. (Note that we are assuming that the pooled test will be positive if<br />

at least one person in the pool has the disease.)<br />

Solution. Let T be the number of tests for a group of 10 people. Then we know that T = 1<br />

if the test is negative <strong>and</strong> T = 11 if the test is positive. Therefore, we get<br />

E[T ] = (0.9) 10 + 11[1 − (0.9) 10 ] = 11 − 10 · (0.9) 10 .<br />

33. A newsboy purchases papers at 10 cents <strong>and</strong> sells them at 15 cents. However, he is not allowed<br />

to return unsold papers. If his daily dem<strong>and</strong> is a binomial r<strong>and</strong>om variable with n = 10, p = 1<br />

3 ,<br />

approximately how many papers should he purchase so as to maximize his expected profit?<br />

Solution. Let a be the number of papers the newsboy purchases, X be the daily dem<strong>and</strong>,<br />

<strong>and</strong> Y be the profit the newsboy gets. Then we obtain the relation between r<strong>and</strong>om variables<br />

X <strong>and</strong> Y as follows:<br />

Y =<br />

� 5a X ≥ a<br />

15X − 10a X < a .<br />

Therefore, the expected profit that the newsboy obtains is<br />

E[Y ] = 5a · P (X ≥ a) + (15X − 10a) · P (X < a)<br />

=<br />

10�<br />

i=a<br />

5a ·<br />

� 10<br />

i<br />

� � 1<br />

3<br />

� i � 2<br />

3<br />

� 10−i<br />

�a−1<br />

+ (15i − 10a) ·<br />

i=0<br />

� 10<br />

i<br />

� � 1<br />

3<br />

�i � �10−i 2<br />

3<br />

To find the approximate value for a, we can use Matlab to draw the following figure to show<br />

the relation between E[Y ] <strong>and</strong> a. From Fig. 1, we note that the newsboy should purchase 3<br />

papers so as to maximize his expected profit.<br />

3


38. If E[X] = 1 <strong>and</strong> Var(X) = 5, find<br />

(a) E[(2 + X) 2 ];<br />

(b) Var(4 + 3X).<br />

E[Y]<br />

10<br />

0<br />

−10<br />

−20<br />

−30<br />

−40<br />

−50<br />

0 1 2 3 4 5<br />

a<br />

6 7 8 9 10<br />

Figure 1: The Expected Profit E[Y ]<br />

Solution. (a) E[(2 + X) 2 ] = Var(2 + X) + (E[2 + X]) 2 = Var(X) + 9 = 14.<br />

(b) Var(4 + 3X) = 9 · Var(X) = 45.<br />

44. A satellite system consists of n components <strong>and</strong> functions on any given day if at least k of<br />

the n components function on that day. On a rainy day each of the components independently<br />

functions with probability p1, whereas on a dry day they each independently function with<br />

probability p2. If the probability of rain tomorrow is α, what is the probability that the satellite<br />

system will function?<br />

Solution. The probability that the satellite system will function can be computed as follows:<br />

P (system functions) = P (rain)P (system functions | rain) + P (dry)P (system functions | dry)<br />

n�<br />

� �<br />

n<br />

= α · p<br />

i<br />

i 1(1 − p1) n−i n�<br />

� �<br />

n<br />

+ (1 − α) · p<br />

i<br />

i 2(1 − p2) n−i .<br />

i=k<br />

48. It is known that diskettes produced by a certain company will be defective with probability 0.01,<br />

independently of each other. The company sells the diskettes in packages of size 10 <strong>and</strong> offers<br />

a money-back guarantee that at most 1 of the 10 diskettes in the package will be defective. If<br />

someone buys 3 packages, what is the probability that he or she will return exactly 1 of them?<br />

Solution. Let p be the probability that a package will be returned. The we obtain<br />

p = 1 − (0.99) 10 − 10 · (0.99) 9 (0.01).<br />

Therefore, if someone buys 3 packages then the probability they will return exactly 1 package<br />

is 3p(1 − p) 2 .<br />

49. When coin 1 is flipped, it l<strong>and</strong>s heads with probability 0.4; when coin 2 is flipped, it l<strong>and</strong>s<br />

heads with probability 0.7. One of these coins is r<strong>and</strong>omly chosen <strong>and</strong> flipped 10 times.<br />

4<br />

i=k


(a) What is the probability that exactly 7 of the 10 flips l<strong>and</strong> on heads?<br />

(b) Given that the first of these ten flips l<strong>and</strong>s heads, what is the conditional probability that<br />

exactly 7 of the 10 flips l<strong>and</strong> on heads?.<br />

Solution. (a) Note that one of two coins will be r<strong>and</strong>omly chosen, we get<br />

P (7 heads) = P (coin 1)P (7 heads | coin 1) + P (coin 2)P (7 heads | coin 2)<br />

= 1<br />

2 ·<br />

� 10<br />

7<br />

�<br />

· (0.4) 7 · (0.6) 3 + 1<br />

2 ·<br />

� 10<br />

7<br />

(b) We can compute the conditional probability as follows:<br />

P (7 heads | 1st heads) =<br />

Theoretical Exercises<br />

=<br />

�<br />

· (0.7) 7 · (0.3) 3 .<br />

�2 i=1 P (coin i)P (7 heads, 1st heads | coin i)<br />

P (1st heads)<br />

1<br />

2 · � � 9<br />

6 · (0.4) 7 · (0.6) 3 1 + 2 · � � 9<br />

6 · (0.7) 7 · (0.3) 3<br />

1<br />

2<br />

· 0.4 + 1<br />

2<br />

· 0.7<br />

4. If X has distribution function F , what is the distribution function of e X .<br />

Solution. Let G(x) be the distribution function of e X . Then we need to consider the<br />

following two cases:<br />

• When x ≤ 0, we get<br />

• When x > 0, we obtain<br />

G(x) = P {e X ≤ x} = 0.<br />

G(x) = P {e X ≤ x} = P {X ≤ ln x} = F (ln x).<br />

5. If X has distribution function F , what is the distribution function of the r<strong>and</strong>om variable<br />

αX + β, where α <strong>and</strong> β are constants, α �= 0?<br />

Solution. Let G(x) be the distribution function of e X . Then we need to consider the<br />

following two cases:<br />

• When α > 0, we get<br />

• When α < 0, we obtain<br />

G(x) = P {αX + β ≤ x} = P<br />

G(x) = P {αX + β ≤ x} = P<br />

�<br />

X ≥<br />

5<br />

�<br />

X ≤<br />

�<br />

x − β<br />

α<br />

�<br />

x − β<br />

= F<br />

α<br />

� x − β<br />

α<br />

�<br />

.<br />

� �<br />

x − β<br />

= 1 − lim F − h .<br />

h→0 + α<br />

.


8. Let X be such that<br />

Find c �= 1 such that E[c X ] = 1.<br />

P {X = 1} = p = 1 − P {X = −1}.<br />

Solution. We have known the probability mass function of X: P {X = 1} = p <strong>and</strong> P {X =<br />

−1} = 1 − p. Thus,<br />

E[c X ] = c 1 · +c −1 · (1 − p).<br />

Let E[c X ] = cp + 1−p<br />

c<br />

that E[c X ] = 1.<br />

= 1, it follows that c = p<br />

1−p<br />

or 1. Therefore, except 1, c = p<br />

1−p satisfies<br />

9. Let X be a r<strong>and</strong>om variable having expected value µ <strong>and</strong> variance σ 2 . Find the expected value<br />

<strong>and</strong> variance of Y = X−µ<br />

σ .<br />

Solution. Using the properties of expected value <strong>and</strong> variance, we get<br />

E[Y ] =<br />

� �<br />

X − µ<br />

E =<br />

σ<br />

1<br />

Var(Y ) =<br />

1<br />

· E[X − µ] = · (E[X] − µ) = 0,<br />

σ σ<br />

� � � �2 X − µ 1<br />

Var = · Var(X) =<br />

σ σ<br />

σ2<br />

= 1.<br />

σ2 13. Let X be a binomial r<strong>and</strong>om variable with parameters (n, p). What value of p maximizes<br />

P {X = k}, k = 0, 1, . . . , n? This is an example of a statistical method used to estimate p<br />

when a binomial (n, p) r<strong>and</strong>om variable is observed to equal k. If we assume that n is known,<br />

then we estimate p by choosing that value of p that maximizes P {X = k}. This is known as<br />

the the method of maximum likelihood estimation.<br />

Solution. Note that when P {X = k} achieves the maximum value, log P {X = k} also gets<br />

the maximum value. Therefore, we can first take logarithm <strong>and</strong> then determine the p that<br />

maximizes log P {X = k}. More specifically, we first obtain<br />

� �<br />

n<br />

log P {X = k} = log + k · log p + (n − k) · log(1 − p).<br />

k<br />

Then we can find p by computing the derivative as follows:<br />

Therefore, p = k<br />

n<br />

∂<br />

k n − k<br />

log P {X = k} = −<br />

∂p p 1 − p<br />

maximizes P {X = k} for k = 0, 1, . . . , n.<br />

6<br />

= 0.

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

Saved successfully!

Ooh no, something went wrong!