Estimate $E[X_1 | X_1>X_2>\cdots>X_k]$ with simulation Suppose Random variables $(X_1,X_2,\cdots,X_k)$ are mutually independent, but not identically distributed. I want to estimate $E[X_1|X_1>X_2>\cdots>X_k]$ with simulation. I am wondering if what I do is correct or not.
$$E[X_1|X_1>X_2>\cdots>X_k] = \frac{\int x_1 1\{x_1>x_2>\cdots>x_k\} dF(x)}{\int 1\{x_1>x_2>\cdots>x_k\} dF(x)},$$
where $F(x) = \prod_{i=1}^k F_i(x_i)$ is distribution of $X = (X_1,X_2,\cdots,X_k)$. I attempt to generate random variables $x^s_1,\cdots,x^s_k$ such that $x^s_1>x^s_2>\cdots>x^s_k$ using GHK algorithm. Superscirpt $s$ denotes simulation s.
First I attempted to estimate the conditional expectation by
$$\hat{E}[X_1|X_1>X_2>\cdots>X_k] = \frac{\sum_s x_1^s GHK(x^s)}{\sum_s GHK(x^s)}, $$
where $GHK(\cdot)$ is a weigting function that is used for GHK algorithm.
The above estimator works fine when $k$ is small, but when $k$ gets larger, what I have
$$\hat{E}[X_1|X_1>X_2>\cdots>X_k] = \frac{\sum_s x_1^s GHK(x^s)}{\sum_s GHK(x^s)} \approx x^{s^*}_1 $$
for some $s^*$. This means that
$$\frac{GHK(x^{s^*})}{\sum_s GHK(x^s)} \approx 1.$$
I highly doubt that $x^{s^*}_1$ is a reasonable estimation of the conditional expectation. So What I did to estimate the conditional expectation is that I repeat $R$ times and obtain a set of $(x^{s^*_1}_1,\cdots,x^{s^*_r}_1,\cdots,x^{s^*_R}_1)$. Then, define
$$\hat{E}[X_1|X_1>X_2>\cdots>X_k] = \frac{1}{R}\sum_r x^{s^*_r}_1.$$
Ultimately, I wonder what I did to estimate the conditional expectation is correct. Otherwise is there anyway to estimate the conditional expectation with reasonable accuracy?
 A: I have never heard of this algorithm by Geweke et al. but since it is a special case of importance sampling the fact that a single weight takes all the mass is indicative that the importance function is poorly suited for the target.  Given that the integral is over the set$$\mathfrak H=\{x\in\mathbb R^k;~x_1>x_2>\cdots>x_k\}$$the importance function $G$ should be concentrated on that set, i.e., $G(\mathfrak H)=1$, in which case$$\mathbb E[X_1|X_1>X_2>\cdots>X_k] \approx
\sum_{s=1}^S x_1^s \dfrac{\text dF}{\text dG}(x^s)\Big/\sum_{s=1}^S \dfrac{\text dF}{\text dG}(x^s)$$
Here is a toy implementation in R, using the product of Normal $\prod_{i=1}^k\mathcal{N}(i,1/i^2)$ as the target and the product of Normal $\mathcal N(1,1)\times\prod_{i=2}^k\mathcal N^-(x_{i-1},1/i)$ as importance distribution (where $\mathcal N^-(x_{i-1},1/i)$ denotes the half-normal truncated to the left of its mean, $x_{i-1}$):
# target density
tgt=function(x,k=length(x)) sum(dnorm(x,mean=1:k,sd=1/(1:k),log=TRUE))
# importance density
imp=function(x,k=length(x)) dnorm(x[1],mean=1,log=TRUE)+sum(         
    dnorm(x[2:k],mean=x[-k],sd=1/(2:k),log=TRUE))
# importance simulation with S iid k-dim vectors
rtr=function(S,k){
  X=matrix(0,S,k)
  X[,1]=rnorm(S)+1
  for(i in 2:k)X[,i]=X[,i-1]-abs(rnorm(S,sd=1/i))#truncated Normal
  X}
# importance weight
wt=function(X){
  w=1:(dim(X)[1])
  for(i in 1:length(w))w[i]=tgt(X[i,])-imp(X[i,])
  w}
# mean approximation
mn=function(S,k=2){
  w=wt(X<-rtr(S,k))
  print(c(sum(X[,1]*(p<-exp(w-max(w))))/sum(p),
           round(sum(p)^2/sum(p^2))),digits=4) #ESS
}
# verification for k=2
vf=function(S){
  X=rbind(rnorm(S)+1,rnorm(S)/2+2)
  sum(X[1,X[1,]>X[2,]])/sum(X[1,]>X[2,])}

While the importance approximation is variable (as shown by the effective sample size check), it returns a value in the same range as the sheer Monte Carlo approximation
> vf(1e7)
[1] 2.289312
> mn(1e7,2)
[1] 2.276 48689

The attempt running R independent importance runs and taking
$$\mathbb E[X_1|X_1>X_2>\cdots>X_k] \approx \frac{1}{R}\sum_r x^{s^*_r}_1$$is incorrect because the take-it-all realisations $x^{s^*_r}$ are not realisations from the target distribution.
