Hi, All: 

      Is there a function in R to compute the expected range of a sample 
of size n from some distribution?  I ask, because I was recently asked 
about the control chart constant 'd2', which is the expected range for a 
sample of size n from a standard normal. 

      There is a fairly simple formula for the expected value of the 
range, given, e.g., in Kendall and Stuart (1969) The Advanced Theory of 
Statistics, vol. 1, Distribution Theory, 3rd ed. (Hafner, expression 
(14.82), sec. 14.25:  The exact distribution of the range, p. 339).:

     E(R) = integral{-Inf to Inf of [1 - (F(x))^n - (1-F(x))2] dx.


      Thanks,
      Spencer Graves

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to