Given n distinct objects, a set of all possible permutations of length 1-n are created. Then one of these permutations is chosen. I am trying to find out the expected length of this choice.
This is what I have currently:
From here, I am assuming that the sum of all permutations is $\lfloor en! - 1 \rfloor$.
When $p(i)$ is the probability of an arrangement having a length $i$ the expected length of the choice is
$$ E(i) = \sum_{i=1}^n i * p(l_I) $$ $$ = \sum_{i=1}^n i * \frac{P(n,i)}{\lfloor en! - 1 \rfloor} $$
My utimate objective is to create a plot of this expected value with varying parameter values. This ugly equation makes it very difficult. Am I doing this wrong ? Is there is better way to calculate this ?