# Maximum normalniho rozdeleni #################################### plot(dnorm,-5,5,ylim=c(0,1.2)) #hustota normalniho rozdeleni N(0,1) # hustota maxima nahodneho vyberu z N(0,1) o rozsahu n ind=c(2,5,10,100,1000) for (i in ind){ f=function(x){ f=i*dnorm(x)*pnorm(x)^(i-1)} plot(f,-5,5,add=T,col=i) } legend("topleft",legend=c(1,ind),col=c(1,ind),lty=1,lwd=2,title="n") #################################### # Maximum exponencialniho rozdeleni #################################### plot(dexp,0,15,ylim=c(0,1)) #hustota exponencialniho rozdeleni Ex(1) # hustota maxima nahodneho vyberu z Ex(1) o rozsahu n ind=c(2,5,10,100,1000,10000) for (i in ind){ f=function(x){ f=i*dexp(x)*pexp(x)^(i-1)} plot(f,-5,15,add=T,col=i) } legend("topright",legend=c(1,ind),col=c(1,ind),lty=1,lwd=2,title="n") #################################### # Maximum exponencialniho - standardizovane #################################### plot(dexp,-5,5,ylim=c(0,1)) col=2:7 ind=c(2,5,10,100,1000,10000) for (i in col){ n=ind[i-1] f=function(x){ f=n*dexp(x+log(n))*pexp(x+log(n))^(n-1)} plot(f,-5,5,add=T,col=i) } g=function(x){ g=exp(-(x+exp(-x))) } plot(g,-5,20,add=T,col=8) legend("topleft",legend=c(1,ind,Inf),col=1:8,lty=1,lwd=2,title="n") ######################################## # Rozdeleni extremnich hodnot ######################################## library(evd) curve(dgumbel,-10,10,col=1,ylab="g0(x)",main="Gumbel distribution") abline(v=0) ind=c(-5,-1,3,7) col=2:5 for (i in col){ curve(dgumbel(x,loc=ind[i-1]),-10,10,col=i,add=T)} legend("topleft",legend=c(0,ind),col=c(1,col),lty=1,lwd=2,title=expression(mu)) curve(dgumbel,-10,10,col=1,ylab="g0(x)",main="Gumbel distribution") ind=c(2,3,5,10) col=2:5 for (i in col){ curve(dgumbel(x,scale=ind[i-1]),-10,10,col=i,add=T)} legend("topright",legend=c(1,ind),col=c(1,col),lty=1,lwd=2,title=expression(sigma)) abline(v=0) curve(dfrechet(x,shape=10),0,5,col=10,ylab="g1(x)",main="Frechet distribution") ind=c(1,3,5,8) for (i in ind){ curve(dfrechet(x,shape=i),0,5,col=i,add=T)} legend("topright",legend=c(ind,10),col=c(ind,10),lty=1,lwd=2,title=expression(alpha)) curve(drweibull(x,shape=5),-5,0,col=5,ylab="g2(x)",main="Weibull distribution") ind=c(1,2,3,4) for (i in ind){ curve(drweibull(x,shape=i),-5,0,col=i,add=T)} legend("topleft",legend=c(-ind,-5),col=c(ind,5),lty=1,lwd=2,title=expression(alpha)) curve(dgev(x,shape=0),-7,7,col=1,ylim=c(0,1),ylab="g(x)",main="GEV distribution") ind=c(-1,-0.5,0.5,1) col=2:5 for (i in col){ curve(dgev(x,shape=ind[i-1]),-7,7,col=i,add=T)} abline(v=0) legend("topright",legend=c(0,ind),col=c(1,col),lty=1,lwd=2,title=expression(gamma))