What is the expected value of $f(x)^k = f(x) f(x) \cdots f(x)$ if $f(x)$ is a function, that returns a random integer between $0$ and $x - 1$ inclusive?
2026-03-27 15:18:06.1774624686
On
Expected value: Product of integers in a range
86 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
It's just $${1\over x}\sum_{i=0}^{x-1}i^k.$$ Are you looking for anything more specific than that? There is a closed form, but it involves Bernoulli numbers.
$$Ef(x) = \int P(\xi)\cdot\xi\ d\xi = \int_0^{x-1}\frac{1}{x-1} \cdot \xi\ d\xi = \frac{1}{x-1}(\frac 1 2 \xi^2)\Big|_0^{x-1}$$
$$Ef(x)^k = \underbrace{\int_0^{x-1}...\int_0^{x-1}}_{k\text{ integrals}} (\frac{1}{x-1})^k x_1...x_k\ dx_1 ... dx_k$$