Pré-visualização parcial do texto
Baixe intuitive probability and random processes using matlab e outras Notas de estudo em PDF para Eletrônica, somente na Docsity!
2) O ram à Card, Lace bus que sich 193 . ; - o L Z 3/ Teor ada d123 450 €) CL GG SJ LT! mes pra up GLS E Taro [A Ã Tp qn Ia alrpue averaga) AZ: map rr an 9216 ua /abrvt Ef &) ho, /ro0o 1000000 Prot > o . at já 5 A : Ss A = = — oa une E Ed pretty Fred rd Fei Pi LU puHH HHHT, HHTH HHTT HTM HIBT ATrrhM., HTIr, TT7IT, ILTh, TTHT, TTHH ed J gem THTT THRIH THAT THU) + Quieres pom 3 fenda. IN fls j= the= df A Aya. (14) F t Z J 4) der =) ( J' e! Em =— 4 u 2! hj = - /F é tis 14 2 / ZE . = Em E . - hz Ê - L 0) PLk=g 2 =) to : á =) IX 14) es E o 9772 O.oj À o 9973 0.00) OD T9I3 $ probprobl 14.m $ clear all Delta=[0.1 0.01 0.001]'; for 1=1:3 n=[round(-3/Delta(i))j:rcund(3/Delta(ij)]'; arg=(1/sgrt (2*pi))*exp(-0.5*(n*Delta(i))."2)*Delta(i); I(i,1)=sumfarg); end [Delta I] $ probprobl 15.m $ clear all rand('state',0) for k=1:1000 for i=l:4 if rand(1,1)<0.,5 ati, lj=l; else x(i,1)-=0; end end heads (k, l)=sumix):; end count=0; for k=1:1000 if neads (k)== count=count+1; end end probheads-=count/1000 16) LIS) = (2) CID) or)! = 6,249 PL3) = o wméo % probprobl 16.m 5 clear all rand('state!,0) for k=1:1000 for ja=l:4 if rand(1,1)<0.75 & change this x(i, 1)=1; else x(1,1)=0; end end heads (k, 1)=sum (x); end count=0; for k=1:1000 if heads (k)== count=count+1; end end probheads=count/1000 IN * probprob2 2.m & clear all rand('state!,0) count=D; for 1=1:1000 ul=rand(1l,1); if ul<=1/6 x1=1; eiseif ul>1/6Gaul<=2/6 ul=2; elseif ul>2/6&ul<=3/6 x1=3; elseif ul>3/6&aul<=4/6 xl1=4; elseif ul>4/6&ul<=5/6 xl=5; else x1=6; end ul=rand(1,1); if u2<=1/6 x2=1; elseif u2>1/6&u2<=2/6 Keº2; elseif u2>2 /6&u2<=3/6 x2=3: elseif u2>3/6au2<=4/6 x2=d; elseif uZ>4 /64u2<=5/6 x2=5; else x2=6; end if xl==16x2== count=count+1; end end prob=count/1000 3 probprob2 3.m 8 tlear all randn(!'state',0) count=0; For i=1:10000 x=randn (1,1); end H o LESS FÉ xD=01 & x<=1 per count=count+1; . E , end Probest=count/10000 x=[-1:0,01:1]'; pa=(1/sgrt(2*pi))*exp(-0.5*x."2); probtrue=sum(px)*0.01 a r Í I I | I | A) 7 7 - 7 - : Orr ec pote eocctaccctr ports cata ttcascss potente secs a E Ã a — u [| ÉL — 4 & pdf.m & % probprob2 4.m $ This function subprogram computes and plots the a — & PDF of a set of data. clear all $ randt'state',0) $ Input parameters: x=zeros (1000,1); é for i=1:1000 $ X - Nxl data array for j=1:12 $ N — number of data points x(i,1)=x(i,1)+(rand(1,1)-0.5); & hbins — number of bins (0,1 & u<=0.3 n(i,1l)=2; else x(i,1)=3; end end countl=0;count2=0; count3=0D; for 1=1:1000 if x(i,lj== countl=counti+l; elseif x(i,1)--2 count2=count2+1; else count3=count3+1; end end plest=counti/1000 pZest=count2/1000 p3est=count3/1000 o.sSo 24 Í rumo sstilias Ja. Gg) Mato = 0.95€7 % probprob2 8.m $ clear all rand('state!,0) meanest=0; for 1=1:1000 meanest=meanest+(1/1000)*rand(1,1); end meanest Tae Aralus % probprob2 9,m E clear all randn ('state",0) meanest=0); for i=1:1000 yti,1l)=i+randn(1,1); meanest=meanest+(1/1000)*y(ij; end meanest % probprob2 13.m % clear all randn ('state!,0) meanest=); for 1=1:1000 Riti,1l)j=sgrt (randn(1,1)“2+randntl,1)º2); meanest=meanest+(1/1000)*R(ãi); end meanest EA Mo. gene fd = - (Pirsaram ques 0.50 73) E Aetlguar 24 ( precquao gaisem Fo,5077 =D, 74 2s> From prrmpae mtanef VD = o 65549 ad . $ probprob2 14.m $ clear all rand('state!',0) meanuvest=0;meansqrtuest=); for 1=1:1000 uti,l)=rand(1,1); sgrtu(i,l)=sgrt (rand(1,1)); meanuest-meanuest+(1/1000)*u(i); meansqrtuest=meansgrtuest+(1/1000)*sgrtu(i); end meanvest meansgrtuest % prcbprob2 16.m % clear all randí('state",0) for i=1:10000 ul=rand(1,1);aZ=rand(1,1); xl(i,1i)j-ul; x2(1,1)-ul+u2Z; end plot(xl,x2,'*"3 grid 12 as AS = CART, Bt =fnx:mx>as LA ABL TfTi-mextajo q ANnB=ÍKIex ea) €) AB = (XX: %>a) BoA zfx:xes) =) a o A< =x: 04X £4) Be = [Xin >a) 49] AVR = (XI mesh= ar AnBE=ÊKI ARES) cj) Apa lg go) pp=friocaask 3) “pci dao, duto vibe Frau é LB Aga — Madbey Lrcard Get Jud EE Pude E ALPEÍ Dim Lados ) dida Yoko "Aobtey fit Fal Brad 3 CET) deza FIEEÍ Luigi) BmAaR | D tmpemgdrto preste ET e É nte quh = 43) (36, 2), c=tdtg rs: Aê ue made es As t > 3) p=êss, Cc) é 2 4 Pd Q Sa Lt 30 a É 2 408) 2) Pelas rs a A am eta PAD: Ro <É 2 ;60 d/ 4 — É + Ao < f «tos = (e: fo «+ eso om Co 2) — Thom AF pd - f / CE] = pve) VE mes) (Ogoreredoss ) Ar = ? (UE) + lena)