x_rnorm(50) x y_rexp(60,3) y summary(y) par(mfrow=c(1,2)) hist(x) hist(y) cdf.compare(x,distr="norm") cdf.compare(x,distr="norm",mean=mean(x),sd=sqrt(var(x))) mean(x) var(x) cdf.compare(y,distr="norm",mean=mean(y),sd=sqrt(var(y))) cdf.compare(x,y) cdf.compare(y,distr="exp",rate=3) qqnorm(y) qqline(y) chisq.gof(x,dist="norm") cut1_(-3:3) cut1 x.chi1_chisq.gof(x,cut.points=cut1,dist="norm") x.chi1$c x.chi1$e x.chi1 cut2_(-2:2) cut2 x.chi2_chisq.gof(x,cut.points=cut2,dist="norm") x.chi2$c x.chi2$e x.chi2 cut3_c(min(x)-0.1,seq(-1.5,1.5,by=.5),max(x)+0.1) cut3 x.chi3_chisq.gof(x,cut.points=cut3,dist="norm") x.chi3$c x.chi3$e x.chi3 y.chin_chisq.gof(y,dist="norm",mean=1/3,sd=1/3) y.chin$c y.chin$e y.chin ks.gof(x,dist="norm") ks.gof(x,dist="norm",mean=0,sd=1)