# Are the sample range and sample variance independent when population is normally distributed?

If a population is normally distributed, the sample mean and sample variance are independent.

What about the sample range and sample variance? Are they independent too?

I am trying to derive Studentized Range Distribution,

and it might be simpler if it is... or not...

• For sample size 2 you could see direct relation of sample range and sample variance. – vinux May 10 '13 at 2:58
• No, they're (plainly) dependent in general. – Glen_b May 10 '13 at 2:59
• I've been trying to derive the Studentized Range as well, did you make any progress? I posted here:stats.stackexchange.com/questions/235785/… – Kevin Nowaczyk Sep 22 '16 at 17:04

Here's a sample of 10000 normal sample range-variance pairs for $n$=30.

Plainly, those aren't independent.

• Thank you. But Studentized Range Distribution assumes the estimated sd and the range is independent. So is it almost independent when we get the range of sample means and the spooled sample sd? It should be. If not, using Studentized range with sample mean range and spooled sample sd from the same samples can't be justified... – KH Kim May 10 '13 at 3:57
• What is the basis for your assertion that they are assumed to be independent? Are you maybe talking about the distribution of the studentized range test? Isn't that based on a different calculation than what you asked about in your question? Finally, what's a 'spooled sample sd'? – Glen_b May 10 '13 at 4:01
• I was talking about the Tukey's Studentized range test. I will post another answer. – KH Kim May 10 '13 at 5:33
• If I remember rightly that test deals with differences in group means divided by an estimate of standard deviation based on residuals from all samples. The numerator and denominator of that should be independent under the usual ANOVA assumptions. – Glen_b May 10 '13 at 5:44

If the sample variance and sample range is calculated from the same sample, it's highly correlated. From the simulation I conducted, I realized that the sample size needs to be over 1000 so that the sample variance and the sample range is independent.

Given that, it's quite interesting that even the range of sample mean of sample size 3 is almost independent from sample variance(spooled sample variance, the estimated population variance from different sample variances assuming each sample is sampled from the same population).

Here's the result from R simulation.

par(mfcol=c(2,3))

sim=1000 # number of simulations
g=3  # number of groups
n=2 # sample size of a group

x<-array(rnorm(sim*g*n), dim=c(g,sim,n))
x2<-array(rnorm(sim*g*n), dim=c(g,sim,n))

# a for sample sd for each grouop
# b for sample mean
if (n>=2) a<-apply(x, c(1,2), sd)
if (n==1) a<-apply(x,c(1,2), c)

if (n>=2) a2<-apply(x2, c(1,2), sd)
if (n==1) a2<-apply(x2,c(1,2), c)

b<-apply(x,c(1,2),mean)

if (n>=2) aa<-apply(a, 2, function(y) {sqrt((n-1)*sum(y^2)/((n-1)*g))})
if (n==1) aa<-apply(a, 2, sd)

if (n>=2) aa2<-apply(a2, 2, function(y) {sqrt((n-1)*sum(y^2)/((n-1)*g))})
if (n==1) aa2<-apply(a2, 2, sd)

if (g>=2) bb<-apply(b, 2, function(y) {range(y)[2]-range(y)[1]})
if (g==1) bb<-apply(b, 2, c)

r<-bb/aa*sqrt(n)
r2<-bb/aa2*sqrt(n)

hist(r, xlim=c(0,10), breaks="Scott", prob=T)

dx=0.1
alpha=sqrt(n)
if (n>=2) curve((ptukey((x+dx),g,g*(n-1))-ptukey(x,g,g*(n-1)))/(dx), xlim=c(0,10))
if (n==1) curve((ptukey((x+dx),g,g-1)-ptukey(x,g,g-1))/(dx*alpha), xlim=c(0,10))
if (n>=2) curve((ptukey((x+dx),g,g*(n-1))-ptukey(x,g,g*(n-1)))/(dx), xlim=c(0,10))
if (n==1) curve((ptukey((x+dx),g,g-1)-ptukey(x,g,g-1))/(dx), xlim=c(0,10))

hist(r2, xlim=c(0,10), breaks="Scott", prob=T)

plot(aa,bb)
plot(aa2,bb)


This is when the sample standard deviation and sample range is from the same sample with size 3

This is when the number of groups is 3, sample size for each group is 2, Notice the range of sample mean and estimated population s.d is almost uncorrelated!