Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Exercise 1 - solution KTHICT/COS/RST: IK2507 Göran Andersson, goeran@kth.se Problem 1 Consider the combined experiment consisting of four statistically independent flips of a coin. Suppose that on each flip a head and a tail are equally likely outcomes. a. Determine the probability that at most two heads occur in a single performance of the combined experiment, and b. determine the probability that at least two heads occur in a single performance of the combined experiment. Solution a. Let be the number of flips that results in a head. Then œ BinI4, 2 M. 1 4 PH § 2L = ‚PH = kL = ‚ k 2 k=0 2 k=0 1 2 k 1- 1 4-k = 2 1 2 ‚ 4 2 k=0 11 4 = k 16 b. By symmetry the answer here is the same as in a. PH ¥ 2L = ‚PH = kL = 2 k=0 1 2 ‚ 4 4 k=2 1 4 = k 2 ‚ 4 4 k=2 1 4 = 4-k 2 ‚ 4 2 i=0 11 4 = i 16 2 IK2507_Ex1_solution.nb Problem 2 Suppose that a random variable X has a uniform probability density f X HxL = 1 b-a a§x§b 0 otherwise a. Calculate the probability that X§ 2a+b 3 b. Let a = -1 and b = 2. In this case, calculate the probability that †X § § c for c = 1 ê 2 and c = 3 ê 2. Solution a. f X HxL 1 b-a a x b Assume that a < b (the pdf would not make sense otherwise). Notice that want to cover 1 3 of the distance to b. This means that P X§ 2a+b = 3 1 3 2 a+b 3 We can also use an integral. Notice that a < b fl a < P X§ = 2a+b 3 =‡ 2 a+b 3 -¶ 1 2a+b b-a 3 f X HxL dx = ‡ -a = a 1 3 2 a+b 3 < b. 1 b-a dx 2 a+b 3 =a+ b-a . 3 The density f X HxL is constant and we IK2507_Ex1_solution.nb b. We have a = -1 Ï b = 2 fl b - a = 3 so f X HxL = With c = 1 ê 2: P †X § § 1 1 3 -1 § x § 2 0 otherwise =P - 1 §X§ 1 2 2 2 3 3 3 = ‡ f X HxL dx = ‡ 1ê2 1ê2 -1ê2 -1ê2 With c = 3 ê 2: P †X § § =P - ‡ 0 dx + ‡ -1 = 2 -3ê2 3ê2 -1 2 1 3 §X§ 2 dx = 0 + = ‡ f X HxL dx 3ê2 -3ê2 1 3 3 2 - H-1L = 5 6 1 3 dx = 1 1 3 2 - - 1 2 = 1 3 3 4 IK2507_Ex1_solution.nb Problem 3 Let R be a random variable with the Rayleigh density fR HrL = r b - e r2 0§r 2b 0 otherwise a. Determine the corresponding probability distribution function and plot your results. b. Calculate (in terms of the parameter b) the radius R0 such that the probability that R > R0 is e-1 . c. Calculate the probability density of R2 . Solution a. The cdf is (assuming that r ¥ 0) PHR § rL = ‡ fR HtL dt = ‡ r r -¶ 0 t - e b u= t2 2b dt du = t2 2b t dt b r2 = ‡ e-u du = 1 - e 2b - r2 2b 0 The cdf is therefore FR HrL = - 1-e 0 FR HrL r2 2b 0§r otherwise 1 1- 1 ‰ R0 r IK2507_Ex1_solution.nb b. PHR > R0 L = e-1 ñ 1 - FR HR0 L = e-1 - ñe R20 = e-1 ñ - 2b R20 = -1 R0 ¥0 2b R0 = 2b c. Set A = R2 and assume that t ¥ 0 F A HtL = PHA § tL = PIR2 § tM = PIR § tM R¥0 - = 1-e t 2b fl fA HtL = d dt F A HtL = d dt K1 - e - t 2b This means that R2 œ expHlL with l = 1 ê H2 bL. O= 1 2b - e t 2b 5 6 IK2507_Ex1_solution.nb Problem 4 Let X be a random variable with a probability density f X HxL which exists everywhere. Let Y be a new random variable defined as Y =aX +b where a and b are real constants and a is nonzero. Determine the probability density fY HyL of the random variable Y . Solution The cdf FY HyL is assuming that a > 0 FY HyL = PHY § yL = PHa X + b § yL = P X § fY HyL = d dy FY HyL = y-b d dy FX a = a = FX y-b a y-b 1 a y-b fX a a < 0: FY HyL = PHY § yL = PHa X + b § yL = P X ¥ y-b fY HyL = 1 d dy FY HyL = The pdf fY HyL is therefore fY HyL = dy y-b 1 †a§ d fX a 1 - FX y-b a =- a a = 1 - FX y-b fX a y-b a IK2507_Ex1_solution.nb Problem 5 Consider a binomial random variable Yn , n = 1, 2, 3, …, which has the probability density PHYn = kL = Determine EHYn L n! k ! Hn - kL ! pk H1 - pL n-k Solution The expectation value is according to the definition with q = 1 - p EHYn L = ‚k PHYn = kL = ‚k The expression k k n n k=0 k=0 n k n n k n-k n k n-k p q = ‚k p q k k k=1 can be rewritten in a smart manner: n! n ÿHn - 1L ÿ… ÿHn - k + 1L n =k =k k k ! Hn - kL ! k! = n Hn - 1L ÿ … ÿ HHn - 1L - Hk - 1L + 1L \ EHYn L = ‚n n k=1 = n p‚ n-1 i=0 Hk - 1L ! =n n-1 k-1 n n - 1 k n-k n - 1 k-1 n-1-Hk-1L p q =n p‚ p q k-1 k-1 k=1 n - 1 i n-1-i p q = n p H p + qLn-1 = n p ÿ1n-1 = n p i Alternative The partial derivative is powerful tool in this case. n ∑ pk ∑ n n n k n-k n qn-k = p p q =‚ p pk qn-k ‚ ‚k k k k ∑ p ∑ p k=0 k=0 k=0 n = p ∑ ∑p H p + qLn = p n H p + qLn-1 = n p 7 8 IK2507_Ex1_solution.nb Problem 6 Consider a sine wave process 8Xt , 0 § t<, where Xt = V cosHw tL Show whether this is a stationary process in the strict sense. Solution We assume that w is a constant. The first moment or expectation value is E@Xt D = E@V cosHw tLD = E@V D cosHw tL Since E@Xt D is time dependent (if E@V D ∫ 0) this is not a strict stationary process. Another way to see this is to look at the distribution: F X Hx, tL = PHXt § xL = PHV cosHw tL § xL F X Hx, t + tL = PHXt+t § xL = PHV cosHw Ht + tLL § xL ∫ PHV cosHw tL § xL = F X Hx, tL Since cos Hw Ht + tLL ∫ cosHw tL this is not a strict stationary process. In other words: time shift influence the cdf. IK2507_Ex1_solution.nb Problem 7 Let 8Xt , -¶ < t < ¶< be a strictly stationary real random process. Show that a. R X H-tL = R X HtL, i.e. the autocorrelation function of a stationary real random process is an even function of its argument. b. †R X HtL§ § EIXt2 M = R X H0L, i.e. the autocorrelation function of stationary, real random, process has its maximum magnitude at the origin in t. Solution a. We use the fact that Xt is (wide-sense) stationary then R X Ht, t + tL = R X HtL. R X HtL = E@Xt Xt+t D = E@XHt+tL-t Xt+t D h E@XT-t XT D = E@XT XT+H-tL D = R X H-tL b. 2 HXt ≤ Xt+t L2 ¥ 0 ñ Xt2 + Xt+t ¥ ¡ 2 Xt Xt+t Using the fact that Xt is (wide-sense) stationary and forming the expectation value gives 2 EAXt2 + Xt+t E = 2 EAXt2 E ¥ ≤2 E@Xt Xt+t D This means that R X H0L ¥ †R X HtL§ QED 9 10 IK2507_Ex1_solution.nb Problem 8 Wide-sense stationary. Let the random process 8Zt , -¶ < t < ¶< be such that ó Zt = Y cosHtL + X sinHtL for all values of t, where X and Y are independent binary random variables each of which assumes the values -1 and +2 with probabilities 2 3 and 1 3 respectively. 1. Calculate E@Zt D and RZ Ht1 , t2 L. 2. Show that this process is stationary in the wide sense but not in the strict sense. (Hint: Consider EAZt3 E.) Solution 1. E@X D = E@Y D = H-1L ÿ 2 3 + 2ÿ 1 3 = 0, EAX 2 E = EAY 2 E = H-1L2 ÿ 2 3 + 22 ÿ 1 3 =2 Using the independence we have: E@X Y D = E@X D E@Y D = 0 Expansion of Zt1 Zt2 gives Zt1 Zt2 = HY cosHt1 L + X sinHt1 LL HY cosHt2 L + X sinHt2 LL h X 2 sinHt1 L sinHt2 L + X Y HsinHt1 L cosHt2 L + cosHt1 L sinHt2 LL + Y 2 cosHt1 L cosHt2 L Now forming the expectation values gives E@Zt D = E@X cosHtL + Y sinHtLD = E@X D cosHtL + E@Y D sinHtL = 0 RZ Ht1 , t2 L = E@Zt1 Zt2 D = E@HX cosHt1 L + Y sinHt1 LL HX cosHt2 L + Y sinHt2 LLD 0 0 h EAX 2 E sinHt1 L sinHt2 L + E@X Y D H…L + EAY 2 E cosHt1 L cosHt2 L 0 h 2 sinHt1 L sinHt2 L + 2 cosHt1 L cosHt2 L = HcosHt1 - t2 L - cosHt1 + t2 LL + HcosHt1 - t2 L + cosHt1 + t2 LL 2 h 2 cosHt1 - t2 L 2 IK2507_Ex1_solution.nb 2. From 1. we have that E@Zt D = 0, independent of t. Setting t1 = t and t2 = t + t gives RZ Ht, t + tL = 2 cosHt - Ht + tLL = 2 cosHtL independent of t. This shows that Zt is wide sense stationary. Using the hint we have: EAX 3 E = EAY 3 E = H-1L3 ÿ 2 3 + 23 ÿ 1 3 = 2, EAX 2 Y E = E@X D2 E@Y D = 0, EA X Y 2 E = 0 EAZt3 E = EAHY cosHtL + X sinHtLL3 E h EAX 3 E sin3 HtL + 3 EAX 2 Y E sin2 HtL cosHtL + 3 EAX Y 2 E sinHtL cos2 HtL + EAY 3 E cos3 HtL h 2 Isin3 HtL + cos3 HtLM Since the 3rd moment EAZt3 E clearly is time-dependent the process cannot be strict sense stationary. 11 12 IK2507_Ex1_solution.nb Problem 9 Consider a wide sense stationary process 8Xt , -¶ < t < ¶<, with E@Xt D = 0, " t, and a periodic function f HtL = f Ht + TL. Prove that Y HtL = f HtLÿ Xt is cyclostationary with period T. Solution The autocorrelation is RY Ht, t + tL = E@Y HtL Y Ht + tLD = E@ f HtL ÿ Xt ÿ f Ht + tL ÿ Xt+t D h f HtL f Ht + tL E@Xt Xt+t D = f HtL f Ht + tL Rx HtL Since f HtL is periodic we have RY Ht + T, t + T + tL = f Ht + TL f Ht + T + tL Rx HtL = f HtL f Ht + tL Rx HtL = RY Ht, t + tL This means that RY Ht, t + tL is periodic in t with period T, i.e. Y HtL is wide sense cyclostationary. IK2507_Ex1_solution.nb 13 Problem 10 Suppose that 8Xt , -¶ < t < ¶< is a zero mean, wide-sense stationary random process whose spectral density S X H f L = 0, " f > f0 . The process Xt is input in a modulator characterized by the sinusoidal random process 8Wt , -¶ < t < ¶<, which Wt = cosH p t + ZL ó where f p = p 2p p f0 , Z œ U@0, 2 pD and Xt and Z are independent random variables for all t. The modulator output is such that Yt = Xt Wt = Xt cosH p t + ZL. 1. Show that Yt is wide sense stationary and that its auto correlation function is given by RY HtL = 1 R X HtL cosH p t L 2 2. Show that the spectral density of the output process is SY H f L = 1 SX I f - f pM + SX I f + f pM 4 4 3. Assuming that S X is rectangular, sketch SY as function of the frequency. 1 Solution 1. E@Yt D = E@Xt Wt D = E@Xt D E@Wt D = E@Xt Dÿ 0 = 0 indep RW HtL = E@Wt Wt+t D = E@cosH p t + ZL cosH p Ht + tL + ZLD h 1 2 E@cosH p tL + cosH p H2 t + tL + 2 ZLD = 1 cosH p tL 2 RY HtL = E@Yt Yt+t D = E@Xt Wt Xt+t Wt+t D = E@Xt Xt+t D E@Wt Wt+t D indep h R X HtL RW HtL = 1 2 R X HtL cosH p tL = This shows that Yt is wide sense stationary. 1 2 R X HtL cosI2 p f p tM 14 IK2507_Ex1_solution.nb 2. SY H f L = 't @RY HtLD H f L = ‡ ¶ -¶ h 1 h 1 h 1 h 1 2 4 4 4 ‡ ¶ -¶ K‡ RY HtL ‰-i 2 p f t dt R X HtL cosI2 p f p tM ‰-i 2 p f t dt = ¶ -¶ R X HtL ‰-i 2 p I f - f p M t dt + ‡ ¶ -¶ 1 4 ‡ ¶ -¶ R X HtL I‰i 2 p f p t + ‰-i 2 p f p t M ‰-i 2 p f t dt R X HtL ‰-i 2 p I f + f p M t dtO I't @R X HtLD I f - f p M + 't @R X HtLD I f + f p MM IS X I f - f p M + S X I f + f p MM 3. SX H f L - f0 - fp f SY H f L f0 f p - f0 f p + f0 f