Let $Y=wX$, where $X$ is a random variable with mean $\mu$ and variance $\sigma^2$, and $w$ is the weight which could change for every realization of $Y$. In other words, $N$ realizations of $Y$ are given as $y_n$ = $w_n x_n,~n=1,...,N$. The weights $w_n,~\forall n$, are assumed to be $N$ uniformly spaced samples of a positive continuous function $W(t),~0<t<T$.
I wonder how can we express the population mean $E[Y]$?
My guess is that $E[Y]$ is defined as $E[Y]=\bar{w}E[X]=\bar{w}\mu$, where $\bar{w}=\frac{1}{T}\int^T_0 W(t) dt$.
Does that reasoning make sense?
The Expectation of $Y$ is conditioned with the numbers of samples $n$ so
$$E(w|n) = \bar{w} = \frac{1}{n}\sum_{i=1}^{n}w_{n}$$
and so just use it in
$$E(Y|n) = E(w|n)E(X)$$.
You don't need the average of W because some values are irrelevant given a number $n$. Your calculation might only be APPROXIMATELY true if $w_{n}$ is near $W(T)$ and $n$ must be very large too.