Suppose $X\_1,\dots,X\_n$ are jointly distributed random variables such that the random $n$-tuple $(X\_1,\dots,X\_n)$ is uniformly distributed on the set of $n$-tuples of nonnegative integers summing to $k$. Clearly each $X\_i$ has expected value $k/n$. Does the published literature provide nice formulas for the expected values of $p(X\_1,X\_2,\dots)$ for infinite classes of polynomials $p(\cdot,\cdot,\dots)$?


I am being necessarily vague about the form of $p$ because I’m sure that the ones I really want to understand aren’t in the literature (they appear rather unnatural when you write them out) but I’m hoping to express them in terms of more natural “building blocks” (perhaps monomials, perhaps something else) and I want to know which building blocks to use. Additionally, methods used to prove those results may give me ideas for how to attack my polynomials directly.


An example would be $p(x\_1,x\_2,x\_3,\cdots) = (x\_1+x\_2+1)(x\_1+x\_2+2)$, but what I want to know is not the answer for this specific case but general methods that are suited to solving infinitely many problems of this kind at once. I don’t need someone to do the work for me, but I do want to use the right tools.



Moments of a combinatorial ensemble of random variables
(You are considering the uniform distribution on a discrete simplex. I'm not aware of specific results in the literature, 
and a brief internet search didn't reveal anything.)


A simple way is to use the joint (probability) generating
function of $X\_1,\ldots,X\_n$.


It is easy to see that it can be writen as
$$\mathbb{E}t\_1^{X\_1}\ldots t\_n^{X\_n}=\frac{1}{{n+k-1 \choose k}}[x^k] \prod\_{i=1}^n \frac{1}{1-t\_ix}$$
Using that one finds e.g. that for $j=(j\_1,\ldots,j\_n)$ and for the polynomials $p\_j(X\_1,\ldots,X\_n)={X\_1 \choose j\_1}{X\_2 \choose j\_2}\cdots {X\_n \choose j\_n}$
(product of binomial coefficients) and $s=j\_1+\ldots+j\_n$
$$\mathbb{E} p\_j(X\_1,\ldots,X\_n)=\frac{{k \choose s }}{{n+s-1 \choose s}}$$


**ADDED**: the first appearance of moments seems to be in Whitworth, *Choice and Chance. Withe 1000 exercises*, 5th edition (1901),
exercise 945 (bottom of page 323). See <https://archive.org/details/choicechancewith00whituoft/page/n4>


