Average of all possible permutations of arranging a 5 digit number. I found this question from a olympiad practice test question and it seems like it has a rule to it that I don't know. Here it is:
What is the average of all possible five-digit numbers that can be formed by using each of the digits $4, 8, 9, 5,$ and $2$ exactly once?
The ONLY thing I can think of is list out all the possible permutations that can be made using those digits, but it seems unnecessarily complicated, and I figured there should be a law that can be used for this type of problem. I've asked plenty of questions like this where I'm asking for the rule that can be used to solve a problem and I would like you to present to me only the rule so I can approach this problem myself.
Many thanks!
 A: Since the five digits are distinct, there are $5! = 120$ such numbers.  By symmetry, each of the five digits appears in each position $$\frac{5!}{5} = 24$$ times.  Hence, the sum of the digits is
$$24 \cdot (2 + 4 + 5 + 8 + 9) \cdot (10000 + 1000 + 100 + 10 + 1)$$
Can you take it from here?
A: Starting point: possible numbers are 54321 (each digit can be in every position and there are no repetitions so is a permutation without repetition) = 120 numbers
All digits appears exactly the same number of times. 24 start with 8, 24 start with 4, 24 start with 9… 24 have 5 has second digit, 24 have 2 has second digit…
The average number can be found by averaging each other.
$ 10000x + 1000x + 100x + 10x + x -- Eq 1$
$ x = (4 + 8 + 9 + 5 + 2)/5 $
Now hope you can solve it further. Find the value of x and put it in the eq 1
Even you can solve it by python
from itertools import permutations as perms
from functools import reduce

L=[reduce(lambda a,b: a*10+b,x) for x in perms([9,4,8,5,2])] 
print(sum(L)/float(len(L)))

You will get the result as 62221.6
