Finding the mean of all 9-digit numbers formed from four $4$s and five $5$s 
I need to find the mean of the numbers ($9$-digit) formed of four $4$s and five $5$s .

MY WORK:
In order to find the sum I do the following and find sum of digits :
$$25\times5!=3000$$
$$16\times4!=384$$
So,  sum of all possible numbers :
$$3384(1+10+10^2+ ... + 10^8)$$
$$=3384\times10^7$$
For finding the amount of numbers formed,  I do :
$$\frac{9!}{4!5!}$$
$$=126$$
This,  the mean is :$$\frac{3384\times10^7}{126}$$ 
I don't know if I'm correct or not... 
 A: Hint:  How many numbers are there?  You need to choose four locations for the $4$s.  Think of adding up all the numbers in a column.  Each column will have some number of $4$s and some number of $5$s.  How many of each?  What is the mean of all the numbers in a column?  You have the same mean of each column, so multiply it by $111\ 111\ 111$
A: All locations in the number are equivalent, so let's just consider the first digit. Naively I'd expect the average value to be the average of the available digits, but let's just check that...
How many arrangements have the digit $4$ first? Given that there are three $4$s and five $5$s for the remaining places, we can see that the binomial coefficient $\binom 83 = 56$ gives the variation of positions to place the $4$s, leaving the $5$s in all other spots.
Similarly if the digit $5$ is first, there are $\binom 84 = 70$ options. 
So the average digit value at that (or any) location is $\dfrac{4\cdot 56 + 5\cdot 70}{56+70} = \dfrac{4\cdot 4+ 5\cdot 5}{4+5} = \frac{41}{9} = 4\frac 59$ as expected - note that here I divided out the common factor of $14$ from $56$ and $70$.
So then the average value over all is $111111111 \cdot \frac {41}9 = 12345679\cdot 41 = 506172839$
A: For the reader with an interest in generating functions we have
from first principles the closed form
$${9\choose 4}^{-1}
\left. \frac{\partial}{\partial w} [z^4]
\prod_{q=0}^8 (z \times w^{4 \times 10^q} +
w^{5 \times 10^q}) \right|_{w=1.}$$
We may treat the derivative first and obtain
$${9\choose 4}^{-1}
\left. [z^4]
\prod_{q=0}^8 (z \times w^{4 \times 10^q} +
w^{5 \times 10^q}) \\ \times
\sum_{q=0}^8 \frac{4\times 10^q z \times w^{4 \times 10^q - 1} +
5 \times 10^q \times w^{5 \times 10^q-1}}{z \times w^{4 \times 10^q} +
w^{5 \times 10^q}}
 \right|_{w=1.}$$
Evaluating at $w=1$ yields
$${9\choose 4}^{-1}
[z^4]
\prod_{q=0}^8 (z + 1) \times
\sum_{q=0}^8 \frac{4\times 10^q z +
5 \times 10^q}{z + 1}
\\ = {9\choose 4}^{-1}
[z^4] (1+z)^8
\sum_{q=0}^8 (4\times 10^q z + 5 \times 10^q)
\\ = {9\choose 4}^{-1}
[z^4] (1+z)^8
(444.444.444 z + 555.555.555)
\\ = {9\choose 4}^{-1} 111.111.111
[z^4] (1+z)^8 (4z + 5)
\\ = {9\choose 4}^{-1} 111.111.111
\left(4{8\choose 3} + 5 {8\choose 4}\right).$$
We have confirmed the result by the replies that were
first to appear, namely
$$\bbox[5px,border:2px solid #00A000]{506172839.}$$
A: A number in the list is of the shape $N(A; 4,5)$, where $A\subset\{1,2,\dots,9\}$ is the set of the four positions where we place the digit $4$. The other positions are $5$. It is easy to imagine the (sometimes telephone) number $N(A;1,0)$, where there is a $1$ on the places in $A$, else $0$. Then we have to compute the sum
$$
\begin{aligned}
S &=
\sum_{|A|=4}N(A;4,5)
\\
&=
\sum_{|A|=4}(555\, 555\, 555 - N(A;1,0))
\\
&=
555\, 555\, 555 \cdot \binom 94 
- (1+10+100+\dots+100\,000\,000)\cdot \binom 83
\\
&\qquad\text{ after further splitting each term $N(A;1,0)$ as sum of four ten-powers,}
\\
&=111\,111\,111\cdot (5\cdot 126-56)
\\
&=111\,111\,111\cdot 574
\\
&=
63777777714\ .
\end{aligned}
$$
(I just wanted to show this number.)
The mean is
$$
111\,111\,111\cdot \frac{5\cdot 126-56}{126}
=
111\,111\,111\cdot \left(5-\frac 49\right)
=
111\,111\,111\cdot \frac {41}9
=
506172839\ .
$$ 
Computer check, here using sage,
sage: S = sum( [ sum( [ (4 if k in A else 5) * 10^k for k in [0..8] ] ) for A in Set([0..8]).subsets(size=4) ] ); S
63777777714
sage: S / binomial(9,4)
506172839

