How to construct a random variable with given expectation?

39 Views Asked by At

$X_1,X_2,\cdots,X_n$ are sampled independently (iid) from an unknown discrete probability distribution $P$. For simplicity, let $P$ be a probability distribution over $\{1,2,\cdots,m\}$ i.e $P = \{p(1),p(2)\cdots,p(m)\}$.

I want to construct a new random variable $Y$ from $X_1,\cdots,X_n$ such that the expectation of $Y$, $\mathbb{E}[Y] = f(P)$ where $f$ is any given function. Is such a construction possible for any 'nice' $f$?

As an example, if $f$ is the squared norm, $f(P) = \sum_{i=1}^mp^2(i)$, then $Y = \mathbb{1}_{\{X_1=X_2\}}$ works. $$\mathbb{E}[Y] = \sum_{x_1\cdots x_n}y(x_1\cdots x_n)p(x_1 \cdots x_n) = \sum_{x_1}\sum_{x_3\cdots x_n}p(x_1)p(x_1)p(x_3)\cdots p(x_n) = \sum_i p^2(x_i)$$ Can this be extended to a more general $f$?

Update: As a comment suggests, this might not be possible for a general $f$. Can this be done if $f$ is a polynomial?