=========================preview======================
(ELEC210)a97283 - Quiz1_sol.pdf
Back to ELEC210 Login to download
======================================================
ELEC210 Quiz1 Solution 30/09/09
1. Suppose that an information source produces symbols from the set
S= a,b,c,d,e , with the following probabilities: P a =0.06,P b =0.55,P c =0.04,P d =0.15,P e =0.2 . A data compression system encodes the letters as strings of binary digits as follows: Find the sample space and pmf of the following random variables.
letter
string
a
1100
b
0
c
1101
d
111
e
10
(a) X = first digit of string
(b) Y = length of string
(c) Z = sum of digits in string
Solutions:
(a) sample space of X: {0, 1}
pmf of X:
pX(0) = P{X = 0} = P[b] = 0.55
pX(1) = P{X = 1} = 1 - P{X = 0} = P[a] + P[c] + P[d] + P[e] = 0.45 (b) sample space of Y: {1, 2, 3, 4} pmf of Y: pY(1) = P{Y = 1} = P[b] = 0.55 pY(2) = P{Y = 2} = P[e] = 0.2 pY(3) = P{Y = 3} = P[d] = 0.15 pY(4) = P{Y = 4} = P[a] + P[c] = 0.06 + 0.04 = 0.1 (c) sample space of Z: {0, 1, 2, 3} pmf of Z: pZ(0) = P{Z = 0} = P[b] = 0.55 pZ(1) = P{Z = 1} = P[e] = 0.2 pZ(2) = P{Z = 2} = P[a] = 0.06 pZ(3) = P{Z = 3} = P[c] + P[d] = 0.04 + 0.15 = 0.19
2. Suppose that a discrete random variable X assumes values from the set SX= 0,1,2,,8 . Suppose that the pmf of X has the form,
pX k =a.k for k=0,1,2,,8 and zero otherwise.
(a) Find the value of a.
(b) Find the probability that X4 .
Solutions:
(a) From , we get, ..801Xkpk...
0123456781aaaaaaaa.........
Thus, (b) 136a.
......40154012343618XkPXpk...........
3. A competition match will test its athletes for drug use. Let D be the event of being a drug user and N indicates being a non-user. Let + be the event of a positive drug test. Assume 0.5% of the athletes use the drug, namely, the probability P[D] that an athlete is a drug user is 0.005. The probability that the test is positive given that the athlete is a drug user, P[+|D] = 0.99, and given that the athlete is not a drug user P[+|N] = 0.01. This means that this test is 99% accurate. Given all of the information above, what is the posterior probability P[D|+] of an athlete who tested positive actually being a drug user?
Solution:
4. A hiker leaves the point O shown in Figure 1, choosing one of the roads OB1, OB2, OB3, OB4 at random. At each subsequent crossroads he again chooses a road at random. What is the probability of the hiker arriving at the point A?
Figure 1 Solution: The probability of different routes from O to A are as follows: OB3B2B4B1A
OB1A: 1413
OB2A: 1412
OB3A: 141
OB2A: 1425 Therefore , the probability of the hiker arriving at point A is :
p=14 13+12+1+25 =67120