I have probability distribution function of $x$: $P(x)$, where $x\in[1,2,...N]$.
I also have the sum: $S = \sum_{j=1}^Kx_j$ where $K$ is unknown.
Given $S$, is it possible to calculate probability distribution function of $K$: $P(K)$?
In other words, the probability: $P(K = i|S)$?
Thank you.