The question at
https://learn1.open.ac.uk/mod/oublog/viewpost.php?post=221531
asked for the average, i.e. the mean, number of letters that would be left unchanged in position if the letters of 'Dermatoglyphics' are scrambled at random. The answer is 1 and surprisingly, to me anyway, the answer would be exactly the same for any other word with no repeated letters, whatever its length. Even though I know why this is it still amazes me, it seems to go against intution.
We can try this out with short word.
1 letter - 'a'
There is 1 arrangement, with 1 letter in the right place.
So the average is 1.
2 letters - 'at'
Now there are 2 arrangements.
'at' with 2 letters in the right place.
'ta' with 0 letters in the right place.
So the average is 2 + 0 = 2, divided by 2, which is 1.
3 letters - 'cat'
Now there are 6 arrangements.
'cat' with 3 letters in the right place.
'cta' with 1 letter in the right place.
'act' with 1 letter in the right place.
'atc' with 0 letters in the right place.
'tca' with 0 letters in the right place.
'tac' with 1 letter in the right place.
So the average is 3 + 1 + 1 + 0 + 0 + 1 = 6, divided by 6, which is 1.
Doing it this way will rapidly become hard work, but luckily there is something called 'linearity of expectation' which provides a general argument why this average will always be 1. For anyone interested, I'll put something in the comments tomorrow.
Tags: linearity of expectation