Average value of distinct combinations

278 Views Asked by At

Distinct combinations of 123 are 123, 132, 213, 231, 312 & 321. Adding those and dividing by 6 gives the average 222.

Same goes for 246: 246, 264, 426, 462, 624 & 642. Added up and divided by 6 gives the average of 444.

However, if I take 235, the average is 370, so I "lost" my pattern. :-)

Is there a nice way to find the average of distinct combinations of a number?

Thanks,

Ole

2

There are 2 best solutions below

2
On BEST ANSWER

The average of $2,3,5$ is $3.333\dots$. So the average you are looking for is a sum of this number in the hundreds, tens and units positions:

$333.333\dots + 33.333\dots + 3.333\dots = 370$

2
On

Suppose you arrange three distinct digits $a$, $b$ and $c$. Then the average is

$$\frac{(200+20+2)(a+b+c)}{6}=\frac{222(a+b+c)}{6}=37(a+b+c).$$

In general,

$$\frac{(n-1)!\left(10^{n-1}+10^{n-2}+...+10+1\right)(x_1+x_2+...+x_n)}{n!}\\=\frac{\left(10^n-1\right)(x_1+x_2+...+x_n)}{9n},$$

where $n \leq 9$ and $x_i\neq 0$, $1 \leq i \leq n$.