- Statistical simulation of the Covariance matrix with R-Project
> x1<- c(rep(15,4),rep(20,3),rep(25,1),rep(15,1),rep(20,4),rep(25,7));
> y1<- c(rep(5,4),rep(5,3),rep(5,1),rep(10,1),rep(10,4),rep(10,7));
> x2<- (x1-15)/5;
> y2<- (y1-5)/5;
> ni<- table(x1);
> n<-sum(ni);
> xt1<-cbind(x1,y1);
> xt2<-cbind(x2,y2);
> cov(xt1)*(n-1)/n
x1 y1
x1 15.6875 5.25
y1 5.2500 6.00
> cov(xt2)*(n-1)/n
x2 y2
x2 0.6275 0.21
y2 0.2100 0.24
|