This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: EE 5375/7375 Random Processes Homework #1 Solutions September 2, 2003 Problem 1. textbook problem 2.37 In how many ways can 10 students occupy 10 desks? 12 desks? Imagine the sequence of students selecting desks. When there are 10 desks, the ﬁrst student has 10 choices, the second student 9 choices, and so on. Therefore 10 students can ﬁll 10 desks in 10! = 3, 628, 800 ways. If there are 12 desks, the ﬁrst student has 12 choices, the second student has 11 choices, and so on. Therefore 10 students can ﬁll 12 desks in 12 × 11 × · · · × 3 = 239, 500, 800 ways. Problem 2. textbook problem 2.43 You win a lottery if you correctly predict the numbers of 6 balls drawn from an urn containing balls numbered 1, 2,..., 49, without replacement and without regard to ordering. What is the probability of winning if you buy one ticket? There are 469 = 13, 983, 816 ways of choosing 6 balls randomly out of 49 balls. Each of these ways is equally likely, so the chance of winning the lottery with one ticket is 1/13, 983, 816 = 7.2 × 10−8 . Problem 3. textbook problem 2.53 In each lot of 100 items, 2 items are tested, and the lot is rejected if either of the tested items is found defective. (a) Find the probability of accepting a lot with 5 defective items. Repeat for 10 defective items. (b) Recompute the probabilities in part (a) if 3 items are tested, and a lot is accepted when at most 1 of the 3 tested items is found defective. (a) Deﬁne A1 as the event that the ﬁrst item is nondefective and A2 as the event that the second item is nondefective. P (lot accepted) = P (A1 ∩ A2 ) = P (A2 A1 )P (A1 ) With 5 defective items and 95 nondefective items in the lot, P (A1 ) = 95 100 Given that the ﬁrst item is nondefective, there are only 94 nondefective items left in the lot for the second test. Hence 94 P (A2 A1 ) = 99 Combining, P (lot accepted) = (95)(94) = 0.902 (100)(99) If there are 10 defective and 90 nondefective items in the lot, similar reasoning leads to P (lot accepted) = P (A1 ∩ A2 ) = P (A2 A1 )P (A1 ) 89 90 = = 0.809 99 100 (b) Deﬁne the additional event A3 as the event that the third item is nondefective. If a lot is accepted when at most 1 of the 3 tested items is defective, then the lot is accepted in any of 4 events: (A1 ∩ A2 ∩ A3 ) or (Ac ∩ A2 ∩ A3 ) or (A1 ∩ Ac ∩ A3 ) or (A1 ∩ A2 ∩ Ac ). 1 2 3 P (lot accepted) = P (A1 ∩ A2 ∩ A3 ) + P (Ac ∩ A2 ∩ A3 ) + P (A1 ∩ Ac ∩ A3 ) + P (A1 ∩ A2 ∩ Ac ) 1 2 3 1 We can use conditional probabilities to write P (A1 ∩ A2 ∩ A3 ) = P (A3 A1 ∩ A2 )P (A2 A1 )P (A1 ) Similarly, P (Ac ∩ A2 ∩ A3 ) = P (A3 Ac ∩ A2 )P (A2 Ac )P (Ac ) 1 1 1 1 P (A1 ∩ Ac ∩ A3 ) = P (A3 A1 ∩ Ac )P (Ac A1 )P (A1 ) 2 2 2 P (A1 ∩ A2 ∩ Ac ) = P (Ac A1 ∩ A2 )P (A2 A1 )P (A1 ) 3 3 With 5 defective items and 95 nondefective items in the lot, 95 100 94 P (A2 A1 ) = 99 93 P (A3 A1 ∩ A2 ) = 98 P (A1 ) = Filling in the other probabilities in a similar way, P (lot accepted) = 5 95 94 95 5 94 95 94 5 95 94 93 + + + 100 99 98 100 99 98 100 99 98 100 99 98 (5)(95)(94) (93)(94)(95) +3 = (98)(99)(100) (100)(99)(98) If there are 10 defective and 90 nondefective items in the lot, P (lot accepted) = (10)(90)(89) (88)(89)(90) +3 (98)(99)(100) (100)(99)(98) Problem 4. textbook problem 2.57 A nonsymmetric binary communications channel is shown in Fig. P2.2. Assume the inputs are equiprobable. (a) Find the probability that the output is 0. (b) Find the probability that the input was 0 given that the input is 1. Find the probability that the input is 1 given that the output is a 1. Which input is more probable? (a) We can use the theorem on total probability to write P (Y = 0) = P (Y = 0X = 0)P (X = 0) + P (Y = 0X = 1)P (X = 1) 1 1 = (1 − 1 ) + 2 2 2 (b) We can use Bayes’ rule P (X = 0Y = 1) = = = P (Y = 1X = 0)P (X = 0) P (Y = 1X = 0)P (X = 0) = P (Y = 1) 1 − P (Y = 0)
1 21 1 − 1 (1 − 2
1 1) − 1 22 1+ 1− 2 P (Y = 1X = 1)P (X = 1) P (X = 1Y = 1) = P (Y = 1) 1 2 (1 − 2 ) = 1 1 − 1 (1 − 1 ) − 2 2 2 1− 2 = 1+ 1− 2 2 Comparing the two probabilities, input 1 is more likely given Y = 1 if 1 − 2 > 1. Problem 5. textbook problem 2.70 In the binary communication system in Example 2.26, ﬁnd the value of for which the input of the channel is independent of the output of the channel. Can such a channel be used to transmit information? (note a typo in the book says “Example 2.23” but Example 2.26 is the correct one.) In Example 2.26, the a posteriori probabilities are given as P (A0 B1 ) = = P (input=0output=1) P (A1 B1 ) = 1 − = P (input=1output=1)
1 These will be the same P (A0 B1 ) = P (A1 B1 ) = 2 when = 1 . In this case, either input is equally likely 2 after observing the output. The receiver can make no useful decision about the input; the channel conveys no useful information about the input to the channel. Problem 6. textbook problem 2.71 A block of 100 bits is transmitted over a binary communciation channel with probability of bit error p = 10−3 . Find the probability that the block contains 3 or more errors. The number of errors in a block has a binomial probability with n = 100 and p = 10−3 . P (3 or more errors) = 1 − P (2 or less errors) =1− 100 0 100 1 100 2 p (1 − p)100 + p (1 − p)99 + p (1 − p)98 0 1 2 (100)(99) 2 p (1 − p)98 = 1 − (1 − p)100 + 100p1 (1 − p)99 + 2 = 1 − 0.99985 = 1.5 × 10−4 Problem 7. textbook problem 2.73 A student needs 10 chips of a certain type to build a circuit. It is known that 5% of these chips are defective. How many chips should he buy for there to be a greater than 90% probability of having enough chips for the circuit? Suppose the student buys n > 10 chips. With probability p = 0.95, each chip will be not defective. Let k be the number of not defective chips out of n, which will have a binomial probability. The number n should be chosen such that n nk P (k ≥ 10) = p (1 − p)n−k ≥ 0.9 k
k=10 First try n = 11: P (k ≥ 10) = 0.89811. This is not quite 0.9, so second try is n = 12. For n = 12, P (k ≥ 10) = 0.98093. This is more than 0.9, so n = 12 chips is enough. Problem 8. textbook problem 2.78 A runlength coder segments a binary information sequence into strings that consist of either a “run” of k “zeros” punctuated by a “one”, for k = 0, . . . , m − 1, or a string of m “zeros.” The m = 3 case is string runlength k 1 01 001 000 0 1 2 3 3 Suppose that the information sequence is produced by a sequence of independent Bernoulli trials with P (one) = P (success) = p. (a) Find the probability of runlength k in the m = 3 case. (b) Find the probability of runlength k for general m. (a) A runlength of k corresponds to k zeros followed by a one. P (k = 0) = p P (k = 1) = (1 − p)p P (k = 2) = (1 − p)2 p P (k = 3) = 1 − P (k = 0) − P (k = 1) − P (k = 2) = (1 − p)3 (b) For general m, P (k ) = (1 − p)k p for 0 ≤ k < m
m−1 P (m) = 1 −
k=0 m−1 P (k ) (1 − p)k p
k=0 =1− =1−p 1 − (1 − p)m = (1 − p)m 1 − (1 − p) Problem 9. textbook problem 2.92 Suppose that in Example 2.40, computer A sends each message to computer B simultaneously over two unreliable telephone lines. Computer B can detect when errors have occured in either line. Let the probability of message transmission error in line 1 and line 2 be q1 and q2 respectively. Computer B requests retransmissions until it receives an errorfree message on either line. (a) Find the probability that more than k transmissions are required. (b) Find the probability that in the last transmission, the message on line 2 is received free of errors. (a) The probability that both messages on the two lines are errored is q1 q2 , so the probability that at least one message on the two lines is errorfree is (1 − q1 q2 ). The probability that exactly j transmissions are required is the probability of j − 1 errored transmission followed by a transmission with at least one errorfree messsage: P (j transmissions) = (q1 q2 )j −1 (1 − q1 q2 ) For geometric probabilities, we have the general result that P (more than k transmissions) = (q1 q2 )k (b) Suppose m transmissions are required, then conditional probability that line 2 was errorfree is P (line 2 errorfreem transmissions) = P (line 2 errorfree and m transmissions) P (m transmissions) m−1 (q1 q2 ) (1 − q2 ) = (q1 q2 )m−1 (1 − q1 q2 ) 1 − q2 = 1 − q1 q2 Problem 10. textbook problem 3.2 4 An information source produces symbols at random from a 5letter alphabet: S = {a, b, c, d, e}. The probabilities of the symbols are p(a) = 1 1 1 1 , p(b) = , p(c) = , p(d) = p(e) = 2 4 8 16 A data compression system encodes the letters into binary strings as follows: a→1 b → 01 c → 001 d → 0001 e → 0000 Let the random variable Y be equal to the length of the binary string output by the system. Specify the sample space of Y , SY , and the probabilities of its values. Clearly, Y can take values from the discrete set SY = {1, 2, 3, 4}. 1 2 1 P (Y = 2) = P ({b}) = 4 1 P (Y = 3) = P ({c}) = 8 P (Y = 1) = P ({a}) = P (Y = 4) = P ({d, e}) = 2 1 = 16 8 Problem 11. textbook problem 3.32 Let X be a binomial random variable that results from the performance of n Bernoulli trials with probability of success p. (a) Suppose that X = 1. Find the probability that the single event occurred in the kth Bernoulli trial. (b) Suppose that X = 2. Find the probability that the two events occurred in the jth and kth Bernouli trials, where j < k . (c) In light of your answers to parts (a) and (b), in what sense are successes distributed “completely at random” over the n Bernoulli trials? (a) Given that X = 1, there are n possibilities where the single success occurred: eg, in the 1st trial, 2nd trial, up to the nth trial. Each of these possibilities is equally likely. Therefore the conditional probability that the single success occurred in the kth trial is 1/n. (b) There are n possibilities that include exactly 2 successes. Each of these is equally likely. Therefore the 2 1 conditional probability that the two successes occurred in the jth and kth trials is n . (2) (c) Given X = k or k successes, there are n possibilities. Each of these is equally likely. Or in other words, k the locations of the successes are equally likely among the n permutations. k Problem 12. textbook problem 3.33 (optional for EE 5375) Let X be a binomial random variable. (a) Show that pk (n − k + 1)p (n + 1)p − k = =1+ pk−1 kp kp (b) Show that part (a) implies that (1) P (X = k ) is maximum at kmax = [(n + 1)p], where [x] denotes the largest integer that is smaller than or equal to x; and (2) when (n + 1)p is an integer, then the maximum is achieved at kmax and kmax − 1. 5 (a) By direct substitution, pk pk−1 = =
n k n k−1 pk q n−k (n − k + 1)p = k−1 q n−k+1 kq p (n + 1)p − k (1 − q ) (n + 1)p − k =1+ kq kq (b) Suppose that (n + 1)p is not an integer, then we have the relation [(n + 1)p] < (n + 1)p. First consider the integer k within the range 0 ≤ k ≤ [(n + 1)p]. For k in this range, pk pk−1 =1+ (n + 1)p − k >1 kq so pk is increasing with k . Next consider the integer k in the range k > (n + 1)p. For k in this range, pk pk−1 =1+ (n + 1)p − k <1 kq so pk is decreasing with k . These two observations imply that pk attains its maximum at kmax = [(n + 1)p]. If kmax = (n + 1)p, or in other words (n + 1)p is an integer, then the above implies that pkm ax =1 pkm ax−1 or in other words, pkm ax = pkm ax−1 . Problem 13. combinations In a packetswitched network, large data messages are divided into packets that can travel diﬀerent routes to the same destination. If the packets arrive at the destination in a diﬀerent order, they are resequenced in the correct order to reassemble the original data message. Suppose that a data message is divided into N packets, which can arrive in any random order with equal likelihood. What is the probability that they will arrive in the correct order? With N packets, there are N ! permutations (the ﬁrst packet might be any of N possibilities, the second packet any of N − 1 possibilities, and so on). Each of the N ! permutations are equally likely, so the probability of the packets being in the correct order is 1/N !. Problem 14. binomial In a hypothetical military scenario, suppose there are 6 incoming ballistic missiles (BMs) and 12 antimissile missiles (AMMs) are ﬁred against them. 2 AMMs are targeted at each BM. Assume there is no interference between AMMs and an AMM can only destroy the BM that it is ﬁred at. The probability that an AMM destroys a BM is 0.8. (a) Find the probability that all BMs are destroyed. (b) Find the probability that at least one BM gets through. (c) Find the probability that exactly one BM gets through. (a) A BM is destroyed if either of the 2 AMMs aimed at it is successful. The probability that both AMMs fail and the BM gets through is (0.2)(0.2) = 0.04. The probability that at least one of the 2 AMMs is successful is 1 − 0.04 = 0.96. The probability that all 6 BMs are destroyed is a binomial probability (0.96)6 = 0.783. (b) P (at least one BM gets through) = 1 − P (no BM gets through) = 1 − 0.783 = 0.217 (c) The probability that exactly one BM gets through is a binomial probability P (one BM gets through) = 10 (0.04)1 (0.96)9 1 = 0.277 6 Problem 15. Matlab (optional for EE 5375) Log into one of the SEAS computers and start Matlab (a general purpose mathematical analysis software package). After Matlab starts up, it will present a prompt where you can type input (followed by a carriage return). To get online information about any particular command, type “help command.” At the prompt, try to get information about a uniform random number generator rand by typing: > help rand Rand is used to generate numbers uniformly distributed between 0 and 1. Next, try to generate 100 uniform numbers by typing: > x=rand(100,1); The arguments (100,1) tell rand to generate a vector of 100 random numbers. These are assigned to the vector x (the semicolon tells Matlab not to display the numbers on the screen). Look at the histogram of the numbers by typing: > hist(x,10) This histogram should appear to be roughly ﬂat because the numbers should be uniformly distributed. If you want to see what the function hist does, type: > help hist Next, get information about the function binornd by typing: > help binornd Binornd is a function to generate binomially distributed random numbers. Generate some binomial(5,0.5) numbers by typing: > x=binornd(5,0.5,500,1); > hist(x,10) Notice the shape of the histogram. Generate some binomial(50,0.5) numbers and then some binomial(500,0.5) numbers by typing: > x=binornd(50,0.5,500,1); > hist(x,10) > x=binornd(500,0.5,500,1); > hist(x,10) Does the last histogram look roughly bell shaped? The binomial distribution should look approximately Gaussian (bell shaped) for large n by the DeMoivreLaplace theorem. 7 Input 0 e1 e2 1 1e1 Output 0 1e2 1 Fig. P2.2 ...
View
Full
Document
This note was uploaded on 11/29/2009 for the course EE 131A taught by Professor Lorenzelli during the Fall '08 term at UCLA.
 Fall '08
 LORENZELLI

Click to edit the document details