Re: [R] Variance Computing - HELP

2003-08-19 Thread Thomas W Blackwell
The variance of Xbar decreases as 1/n; the sample variance of X does not. - tom blackwell - u michigan medical school - ann arbor - On Tue, 19 Aug 2003, Padmanabhan, Sudharsha wrote: I am running a few simulations for clinical trial anlysis. I want some help regarding the following.

Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Jonathan Baron
On 08/19/03 17:42, Padmanabhan, Sudharsha wrote: Hello, I am running a few simulations for clinical trial anlysis. I want some help regarding the following. We know trhat as the sample size increases, the variance should decrease, but I am getting some unexpected results. SO I ran a code

RE: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Liaw, Andy
First of all, your subscripting is wrong. The first index is for row, and the second for column. Thus large[i,] refers to the i-th row of large, rather than the i-th column. Also, the code as you provided contain syntax error. Try: set.seed(311) ## Always a good idea to set seed for

Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread James MacDonald
I think you are confused. As sample size increases, the variance of an estimate based on that sample will decrease asymtotically to zero (e.g., the standard error of the mean will go to zero). However the variance of the sample itself will not change. Any difference you see in your data is simply

Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Tony Plate
Perhaps you were trying for as sample size increases, variance *of the mean* decreases (a least when variance is finite). If you swap mean and var in your code, I think you will get what you are looking for. -- Tony Plate At Tuesday 05:42 PM 8/19/2003 +, Padmanabhan, Sudharsha wrote:

RE: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Wiener, Matthew
Hi. There is no reason the variance of a normal should decrease as you take larger samples. Indeed, in your call itself, you say that you want a sample from a normal with a standard deviation of 3, and so a variance of 9. As expected, both of your estimates of variance are close to 9. What

Re: [R] Variance Computing- - HELP!!!!!!!!!!!!!!!!!!

2003-08-19 Thread Richard A. O'Keefe
Padmanabhan, Sudharsha [EMAIL PROTECTED] We know trhat as the sample size increases, the variance should decrease, Should it? I can paraphrase his test case thus: v100 - sapply(1:100, function(i) var(rnorm(100, 0, 3))) # We expect the elements of v100 to cluster