Q:

How to solve this statistics problem?

Can you find the sum of all numbers that can be formed with the digits $2, 3, 4$ and $5$ taken all at a time? (So its like you sum up the number from 1st digit to 4th digit) 
I'm learning now about permutation, combination and factorial. Can you suggest a method how to do this question please. 
Thank you!

A:

From the given digits you can form $4$-digit numbers. Now ask yourself in how many of these numbers does $2$ come in the first place, i.e. how many numbers of the form $$2XXX$$ can you form? The answer is $$3!=3\cdot\cdot2\cdot1=6$$ numbers of that form (since there are $3$ choices for the second digit, 2 choices for the third digit and 1 remaining choice for the last digit). Thus there are $6$ numbers that start with $2$ (i.e. $2$ thousand something) and similarly with $3$, $4$ and $5$. Thus the sum of the first digits is equal to $$10^3\cdot6\cdot(2+3+4+5)=6\cdot14\cdot10^3$$ So, we have added the value of the thousand-th digits. Now proceed with the value of the hundred-th digits. The logic is similar so the total sum is equal to $$6\cdot14\cdot10^2$$ Proceed analogously to conclude that the answer is equal to $$6\cdot14\cdot(10^3+10^2+10^1+10^0)=6\cdot14\cdot1111=93324$$

