# 2004 年 11 月 11 日作成 rep.no<-100000 ell.largest<-rep(0,rep.no) ell.2nd<-rep(0,rep.no) ell.3rd<-rep(0,rep.no) ell.smallest<-rep(0,rep.no) ell.1d<-ell.1;ell.2d<-ell.2 #ell.1; ell.2 for (i in 1:rep.no){ xw.1<-rnorm(10,0,1) xw.2<-rnorm(10,0,1) xw.3<-rnorm(10,0,1) xw.4<-rnorm(10,0,1) xw<-matrix(c(xw.1,xw.2,xw.3,xw.4),10,4) #xw w<-t(xw)%*%xw #w eigen.w<-eigen(w) #eigen.w lam<-c(eigen.w$values) hmat<-matrix(eigen.w$vectors,4,4) #lam; hmat #ell.largest[i]<-lam[1]/10; ell.2nd[i]<-lam[2]/10; ell.3rd[i]<-lam[3]/10; ell.sm#allest[i]<-lam[4]/10 ell.largest[i]<-lam[1]/13; ell.2nd[i]<-lam[2]/11; ell.3rd[i]<-lam[3]/9; ell.smallest[i]<-lam[4]/7 #ell.largest[i]<-lam[1]/10; ell.smallest[i]<-lam[4]/10 } plot(density(ell.largest),xlim=c(0,4),ylim=c(0,3.0),xlab="",ylab="",main="density of eigenvalues of Dey(dim=4,n=10)") par(new=T) plot(density(ell.2nd),xlim=c(0,4),,xlab="",ylab="",ylim=c(0,3.0),main="") par(new=T) plot(density(ell.3rd),xlim=c(0,4),,xlab="",ylab="",ylim=c(0,3.0),main="") par(new=T) plot(density(ell.smallest),xlim=c(0,4),,xlab="",ylab="",ylim=c(0,3.0),main="") mean(ell.1d);mean(ell.2d) var(ell.1d); mean(ell.2d) mean(ell.1);mean(ell.2) var(ell.1); mean(ell.2)