Hi  R users,



 I’d like to get an expected value for  a minimum value from order
statistics of sample size, say, 5 for standard normal distribution, and the
formula would be 5* Integral (from -inf  to Inf) x*f(x)* (1-F(x))^4,where
f(x) and F(x) are a standard normal density  and a cumulative distribution
function respectively. After searching R posts, I applied the following
double integral formula which gave an error message saying “the integral is
probably divergent.”



 integrate(function(y){



+ sapply(y,function(y){



+
integrate(function(x)5*y*(1/sqrt(2*pi))*exp(-y^2/2)*(1-(1/sqrt(2*pi))*exp(-x^2/2))^4,-Inf,y)$value})



+ },-Inf,Inf)



I’m  not sure whether the syntax  is correct or not. Appreciate your help.



Kyong

	[[alternative HTML version deleted]]

