
###APARTADO 1
n<-c(10,50,100)
for(i in 1:3){
    x<-rnorm(n[i])
    Fn<-ecdf(x)
    windows()
    plot(Fn, do.points=F)
    t<-seq(-3,4,by=0.01)
    F<-pnorm(t)
    lines(F~t,col="red")
}
Fn(0)


### APARTADO 2
y<-rchisq(100,2)
Fn<-ecdf(y)
windows()
plot(Fn, do.points=F)
t<-seq(0,10,by=0.01)
F<-pchisq(t,2)
lines(F~t,col="red")
