chapter 07

50
A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-1 Probability, Statistics, and Random Processes for Electrical Engineering Chapter 7: Sums of Random Variables and Long-Term Averages 7.1 Sums of Random Variables 7.1 7.2

Post on 26-Oct-2015

774 views

Category:

Documents


2 download

DESCRIPTION

probability statistics and random processes for electrical engineering 2th solution.pdf

TRANSCRIPT

Page 1: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-1 Probability, Statistics, and Random Processes for Electrical Engineering

Chapter 7: Sums of Random Variables and Long-Term Averages

7.1 Sums of Random Variables

7.1

7.2

Page 2: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-2 Probability, Statistics, and Random Processes for Electrical Engineering

7.3

7.4

7.5

7.7

Page 3: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-3 Probability, Statistics, and Random Processes for Electrical Engineering

7.6

7.8

7.7

7.5, 4.34

Page 4: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-4 Probability, Statistics, and Random Processes for Electrical Engineering

7.9

7.10

7.11

Page 5: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-5 Probability, Statistics, and Random Processes for Electrical Engineering

7.12

Page 6: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-6 Probability, Statistics, and Random Processes for Electrical Engineering

7.13

7.14

Page 7: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-7 Probability, Statistics, and Random Processes for Electrical Engineering

7.2 The Sample Mean and the Laws of Large Numbers

7.15

7.16

7.17

8000

0.416

Page 8: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-8 Probability, Statistics, and Random Processes for Electrical Engineering

7.18

7.19

7.20

Page 9: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-9 Probability, Statistics, and Random Processes for Electrical Engineering

7.20

7.21

Page 10: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-10 Probability, Statistics, and Random Processes for Electrical Engineering

7.3 The Central Limit Theorm

7.24

7.23

7.22

Page 11: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-11 Probability, Statistics, and Random Processes for Electrical Engineering

7.25

7.26

Page 12: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-12 Probability, Statistics, and Random Processes for Electrical Engineering

7.27

below:

Page 13: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-13 Probability, Statistics, and Random Processes for Electrical Engineering

7.28

7.29

Page 14: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-14 Probability, Statistics, and Random Processes for Electrical Engineering

7.30

7.31

Page 15: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-15 Probability, Statistics, and Random Processes for Electrical Engineering

7.32

7.33

Page 16: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-16 Probability, Statistics, and Random Processes for Electrical Engineering

7.34

7.35

Page 17: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-17 Probability, Statistics, and Random Processes for Electrical Engineering

7.36

7.37

Page 18: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-18 Probability, Statistics, and Random Processes for Electrical Engineering

7.38

Page 19: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-19 Probability, Statistics, and Random Processes for Electrical Engineering

7.39

Page 20: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-20 Probability, Statistics, and Random Processes for Electrical Engineering

*7.4 Convergence of Sequences of Random Variables

7.40

Page 21: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-21 Probability, Statistics, and Random Processes for Electrical Engineering

Page 22: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-22 Probability, Statistics, and Random Processes for Electrical Engineering

7.41

Page 23: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-23 Probability, Statistics, and Random Processes for Electrical Engineering

7.42

Page 24: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-24 Probability, Statistics, and Random Processes for Electrical Engineering

7.43

7.44

Page 25: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-25 Probability, Statistics, and Random Processes for Electrical Engineering

7.45

Page 26: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-26 Probability, Statistics, and Random Processes for Electrical Engineering

7.46

7.47

Page 27: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-27 Probability, Statistics, and Random Processes for Electrical Engineering

7.48

a)

Page 28: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-28 Probability, Statistics, and Random Processes for Electrical Engineering

7.49

7.50

Page 29: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-29 Probability, Statistics, and Random Processes for Electrical Engineering

*7.5 Long-Term Arrival Rates and Associated Events

7.51

7.52

Page 30: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-30 Probability, Statistics, and Random Processes for Electrical Engineering

7.53

Page 31: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-31 Probability, Statistics, and Random Processes for Electrical Engineering

7.54

7.55

Page 32: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-32 Probability, Statistics, and Random Processes for Electrical Engineering

7.56

7.57

Page 33: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-33 Probability, Statistics, and Random Processes for Electrical Engineering

7.58

Page 34: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-34 Probability, Statistics, and Random Processes for Electrical Engineering

7.59

7.60

Page 35: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-35 Probability, Statistics, and Random Processes for Electrical Engineering

7.61

7.62

Page 36: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-36 Probability, Statistics, and Random Processes for Electrical Engineering

7.63

Page 37: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-37 Probability, Statistics, and Random Processes for Electrical Engineering

7.64

Page 38: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-38 Probability, Statistics, and Random Processes for Electrical Engineering

7.65

Page 39: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-39 Probability, Statistics, and Random Processes for Electrical Engineering

*7.6 Calculating Distributions Using the Discrete Fourier Transform

7.66

7.67

Page 40: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-40 Probability, Statistics, and Random Processes for Electrical Engineering

The following Octave code produces the FFTs: N = 8; P = 1/2; n = [0:N-1]; cms = fft(binomial_pdf(n, N, P), 16); %You can also evaluate the characteristic function directly... %w = 2.*pi.*n./N; %cms = (1-P+P.*e.^(j.*w)).^N; pmf = ifft(cms.*cms); figure; stem([1:16], pmf, "b"); The following Octave code produces the FFTs: N = 5; P = ones(1,10)./10; pmf = ifft(fft(P, 9.*N).^N); stem([0:9.*N-1], pmf); N = 10; P = ones(1,10)./10; pmf = ifft(fft(P, 9.*N).^N); stem([0:9.*N-1], pmf); The following Octave code produces the FFT for evaluating Eq. (7.55): N = 8; P = 1/2; n = [0:N-1]; w = 2.*pi.*n./N; cms = P.*e.^(j.*w)./(1-(1-P).*e.^(j.*w)); pmf = ifft(cms); figure; stem([N-1:-1:0], pmf); ek = (1-P).*P.^n.*(P.^N./(1-P.^N)); N = 16; P = 1/2; n = [0:N-1]; w = 2.*pi.*n./N; cms = P.*e.^(j.*w)./(1-(1-P).*e.^(j.*w)); pmf = ifft(cms); figure; stem([N-1:-1:0], pmf); ek = (1-P).*P.^n.*(P.^N./(1-P.^N));

7.68

7.69

7.70

Page 41: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-41 Probability, Statistics, and Random Processes for Electrical Engineering

The following Octave code produces the FFTs: %N=16 achieves an error percent less than 0.01. This can be found %by simple trial and error using different values for N. N = 16; L = 5; n = [0:N-1]; w = 2.*pi.*n./N; cms = e.^(L.*(e.^(j.*w)-1)); pmf = ifft(cms); figure; stem([N-1:-1:0], pmf); N = 5; L = 5; n = [0:19]; P = poisson_pdf(n, L); pmf = ifft(fft(P, 65).^N); stem([0:64], pmf); The following Octave code produces the FFT to obtain the pdf of Z: function fx = ift(phix, n, N) phixs = [phix((N/2+1):N) phix(1:(N/2))]; fxs = fft(phixs)./(2.*pi); fx = fftshift(fxs); end N = 512; n = [-(N/2):(N/2-1)]; d = 2.*pi.*n./N; alphaX = 1; alphaY = 2; phiX = 1./(1 + alphaX.^2.*n.^2); phiY = 1./(1 + alphaY.^2.*n.^2); phiZ = phiX.*phiY; pdf = ift(phiZ, n, N); figure; plot(d, pdf, "b"); hold on; plot(d, ift(phiX, n, N), "g"); plot(d, ift(phiY, n, N), "r");

7.71

7.74

Page 42: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-42 Probability, Statistics, and Random Processes for Electrical Engineering

The following Octave code produces the FFT to obtain the pdf of a Gaussian random variable: function fx = ift(phix, n, N) phixs = [phix((N/2+1):N) phix(1:(N/2))]; fxs = fft(phixs)./(2.*pi); fx = fftshift(fxs); end N = 512; n = [-(N/2):(N/2-1)]; d = 2.*pi.*n./N; phiX = e.^(-n.^2./2); pdf = ift(phiX, n, N); figure; plot(d, pdf, "b"); hold on; plot(d, normal_pdf(d, 0, 1), "r");

7.75

Page 43: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-43 Probability, Statistics, and Random Processes for Electrical Engineering

The following Octave code produces Figs. 7.2 through 7.4: function stepplot(x, y) xn = zeros(1, 2*length(x)); yn = zeros(1, 2*length(x)); for k = 1:length(x) xn(2*k-1) = x(k); xn(2*k) = x(k) + 1; yn(2*k-1) = y(k); yn(2*k) = y(k); end plot(xn, yn); end %Figure 7.2a N = 5; P = ones(1,2)./2; pmf = ifft(fft(P, N+1).^N); cdf = zeros(size(pmf)); for i = 1:N+1 cdf(i) = sum(pmf(1:i)); end figure; stepplot([0:N], cdf); hold on; x = [0:0.01:N+1]; plot(x, normal_cdf(x, 2.5, 1.25), "r"); %Figure 7.2b N = 25; P = ones(1,2)./2; pmf = ifft(fft(P, N+1).^N); cdf = zeros(size(pmf)); for i = 1:N+1 cdf(i) = sum(pmf(1:i)); end figure; stepplot([0:N], cdf); hold on; x = [0:0.01:N+1]; plot(x, normal_cdf(x, 12.5, 6.25), "r"); %Figure 7.3 N = 5; P = ones(1,10)./10; pmf = ifft(fft(P, 9.*N+1).^N); cdf = zeros(size(pmf)); for k = 1:9.*N+1 cdf(k) = sum(pmf(1:k)); end figure; stepplot([0:9.*N], cdf); hold on; x = [0:0.01:9.*N+1]; plot(x, normal_cdf(x, 22.5, 41.3), "r");

7.76

Page 44: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-44 Probability, Statistics, and Random Processes for Electrical Engineering

Problems Requiring Cumulative Knowledge

7.77

Page 45: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-45 Probability, Statistics, and Random Processes for Electrical Engineering

7.78

Page 46: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-46 Probability, Statistics, and Random Processes for Electrical Engineering

Page 47: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-47 Probability, Statistics, and Random Processes for Electrical Engineering

7.79

Page 48: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-48 Probability, Statistics, and Random Processes for Electrical Engineering

7.80

Page 49: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-49 Probability, Statistics, and Random Processes for Electrical Engineering

Page 50: Chapter 07

A.Leon-Garcia INSTRUCTOR’S SOLUTIONS MANUAL 7-50 Probability, Statistics, and Random Processes for Electrical Engineering

7.81

7.82