Skip to content

Mean of ten-digit numbers with digits near their place

Question

Write a ten-digit number as d9d8…d1d0‾\overline{d_9d_8\ldots d_1d_0} (leading digit d9≠0d_9\neq0). Consider all such numbers in which every digit differs from its place index by at most one, i.e. ∣di−i∣≤1|d_i-i|\le1 for i=0,…,9i=0,\dots,9. What is the average of these numbers?

Short answer

18753086421/2=9376543210.518753086421/2=9376543210.5. The digits are chosen independently and uniformly from their allowed sets: d0∈{0,1}d_0\in\{0,1\}, d9∈{8,9}d_9\in\{8,9\}, and di∈{i−1,i,i+1}d_i\in\{i-1,i,i+1\} otherwise, with means 0.50.5, 8.58.5 and ii. By linearity the average is 93765432109376543210 (the middle digits at their means, units 00, leading 99) shifted by −109/2+1/2-10^9/2+1/2, i.e. 9376543210.59376543210.5.

Adapted from QuantQuestions.io; question and answer rewritten by SelfMadeQuant.com.

See the hint and the full worked solution in the question bank (free account).

Open the worked solution