Monday 24 February 2014

Expectation of minimal value in a k element subset



The problem statement is as follows-



Compute $f(n,k)$ which is the mathematical expectation of the minimal element among all $k$-element subsets of a set $[1,2,...n]$.



My approach is as follows-



$1$ is the minimal element in $\binom{n-1}{k-1}$ and $2$ is the minimal element in $\binom{n-2}{k-1}$ and so on.




It can be proved that $\sum_{i=1}^{n+1-k}\binom{n-i}{k-i}=\binom{n}{k}.$



So according to me the expected value should be $\frac{\sum_{i=1}^{n+1-k}i.\binom{n-i}{k-1}}{k}$



I multiply each term with $\frac{1}{k}$ because the probability of choosing the minimal element is $\frac{1}{k}$.



The answer happens to be $\frac{n+1}{k+1}$. I do not know why my logic is wrong. As far as I am aware, this is the definition of expectation.



This is part of a problem on http://codeforces.com/problemset/problem/840/A.


Answer




I'm not too sure about the statement where you say that $i$ is the minimal element in $\binom{n-i}{k-i+1}$ ways. Shouldn't it be $\binom{n-i}{k-1}$ ways? Because how I see it, you choose the remaining $k-1$ elements of your desired set from exactly the $n-i$ terms that are greater than $i$. Then the expectation becomes
\begin{equation}
\mathbb{E}[X]=\frac{\sum^{n-k+1}_{i=1}\binom{n-i}{k-1}i}{\binom{n}{k}}
\end{equation}

You have the right expression for the numerator, so maybe I misunderstood you. But you are essentially counting the number of ways to do get a set with $i$ as the minimal element, in which case you must divide by the total number of ways; essentially, each term in the sum in the numerator (barring the factor of $i$) gives you the number of ways to do this, and dividing by the total number of ways gives you the probability.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...