Suppose that $w_1,w_2,\ldots,w_n$ and $x_1,x_2,...,x_n$ are each drawn i.i.d. from some distributions, with $w_i$ independent of $x_i$. The $w_i$ are strictly positive. You observe all the $w_i$, but not the $x_i$; rather you observe $\sum_i x_i w_i$. I am interested in estimating $\operatorname{E}\left[x\right]$ from this information. Clearly the estimator $$ \bar{x} = \frac{\sum_i w_i x_i}{\sum_i w_i} $$ is unbiased, and can be computed given the information at hand.
How might I compute the standard error of this estimator? For the sub-case where $x_i$ takes only values 0 and 1, I naively tried $$ se \approx \frac{\sqrt{\bar{x}(1-\bar{x})\sum_i w_i^2}}{\sum_i w_i}, $$ basically ignoring the variability in the $w_i$, but found that this performed poorly for sample sizes smaller than around 250. (And this probably depends on the variance of the $w_i$.) It seems that maybe I don't have enough information to compute a 'better' standard error.