BasicProbability / LectureNotes

Lecture Notes (with exercises) for Basic Probability course at University of Amsterdam
17 stars 12 forks source link

idea for exercise #1

Open cschaffner opened 9 years ago

cschaffner commented 9 years ago

For two permutations $\pi, \phi \in Sn$ on $n$ elements $[n]={1,2,\ldots,n}$, let us define their distance as $d(\pi,\phi) = \sum{i=1}^n |\pi(i) - \phi(i)|$.

Assume you have to predict a permutation $\pi$ which is picked uniformly from $S_n$. How far do you expect to be from $\pi$?

Answer: Compute $\E_{\pi \leftarrow Sn}[ \sum{i=1}^n |\pi(i) - i| ]$

cschaffner commented 9 years ago

http://www.wolframalpha.com/input/?i=sum_i%3D1^n+%28sum_j%3D1^%28i-1%29++%28i-j%29++%2B++sum_{j%3Di%2B1}^n++%28j-i%29%29+%2F+n++for+n%3D16