Displaying 1 result from an estimated 1 matches for "tp23645919p23646590".
2009 May 21
3
Problems with sample variance
Dear R users,
I am a beginner to R. I generated 1000 samples with 15 data in each sample
I tried finding the variance for each sample
I used the code:
m=1000;n=15
> r<-rnorm(15000)
> for(i in 1:m){
x=data[,i]
v=var(x)}
what I got was just the variance for the last sample i.e. the 1000th sample
but what I want is 1000 variance.
Does anyone know what I did wrong?
Thanks
Chloe Smith