You are on page 1of 3

#EJERCICIO 1

#APARTADO A

dbinom(5,15,0.6)

[1] 0.02448564

pbinom(8,15,0.6)

[1] 0.3901868

dbinom(10,15,0.6) + pbinom(10,15,0.6,lower.tail=FALSE)

[1] 0.4032156

>1-pbinom(9,15,0.6)

[1] 0.4032156

qbinom(0.75,15,0.6,lower.tail=TRUE)

#APARTADO B

dchisq(5,10)

[1] 0.06680094

pchisq(8,15,0.6)

[1] 0.06435897

dchisq(10,15,0.6) + pchisq(10,15,0.6,lower.tail=FALSE)

[1] 0.9001833

qchisq(0.75,15,0.6,lower.tail=TRUE)

[1] 18.97378

#APARTADO C

pnorm(5,mean=5,sd=3,lower.tail=TRUE)-pnorm(3,mean=5,sd=3,lower.tail=TRUE)

[1] 0.2475075

pnorm(8,mean=5,sd=3,lower.tail=TRUE)

[1] 0.8413447

dnorm(10,5,3)+pnorm(10,5,3,lower.tail=FALSE)
[1] 0.0809494

qnorm(0.75,5,3,lower.tail=TRUE)

[1] 7.023469

#EJERCICIO 2

#Apartado A

g=0.6

x<-seq(0,g,length=k+1)

curve(pgeom(x,0.6),xlim=c(-1,g),las=1,col="red",add=TRUE)

n=100

plot.ecdf(x=rgeom(n,g),xlim=c(-1,k),las=1,col="blue",add=TRUE)

n=1000

plot.ecdf(x=rgeom(n,g),xlim=c(-1,k),las=1,col="green",add=TRUE)

#Apartado B

b=4.2

x<-seq(0,b,length=k+1)

curve(pbeta(x,4.2),xlim=c(-1, b),las=1,col="red",add=TRUE)

You might also like