finding expected value when a set is given and a subset of size n is chosen I found an interesting coding challenge on pramp by a friend but I couldn't do it in time. Anyhow, it says given a set { 3,14,7,22,29,33} and random 3 element subset is generated each time and its minimum value is returned. what is the expected value of this?
My thoughts during challenge were:
if you see the numbers, 29 can never me a minimum. so I broke it in to two sets {3,14,7,22} and remaining {29,33}. we can choose all 3 from 1st that is 4c3 or 4c2 from 1 and 2c1 from 2 or 4c1 from 1 and 2c2 from 2. I calculated the expected value and it is above 33 which is unusal. Is this right approach or am I missing something? 
 A: This problem can be solved in greater generality for an initial set and sampled set of arbitrary size.  Consider the case where you have an initial population of $n$ elements $x_1 \leqslant ... \leqslant  x_n$.  You sample $m$ elements using simple random sampling without replacement (SRSWOR) from this population.  Denote the (distinct) sample indicators by $i_1,...,i_m$ and let $M_m \equiv \min \{ x_{i_1}, ..., x_{i_m} \}$ be the minimum sampled value.  Using a simple combinatorial argument$^\dagger$ we have:
$$\mathbb{P} (M_m \geqslant x_k) = \frac{{n-k+1 \choose m}}{{n \choose m}}.$$
Thus, the probability that the $k$th value in the initial population is the minimum of the sample is:
$$\mathbb{P}(M_m = x_k) = \frac{{n-k+1 \choose m} - {n-k \choose m}}{{n \choose m}} = \frac{{n-k \choose m-1}}{{n \choose m}} \quad \quad \quad \text{for } 1 \leqslant k \leqslant n-m+1.$$
The expected value of this minimum element is:
$$\mathbb{E}(M_m) = \frac{\sum_{k=1}^{n-m+1} {n-k \choose m-1} \cdot x_k}{{n \choose m}}.$$
This expression can be calculated from the specified values $x_1 \leqslant ... \leqslant  x_n$ in the initial population.  

Application to your example: Applying this result to your population $\{ 3, 7, 14, 22, 29, 33 \}$ where you have $n=6$ elements and a sample of $m=3$ elements, you get:
$$\begin{equation} \begin{aligned}
\mathbb{E}(M_3) 
&= \frac{\sum_{k=1}^{4} {6-k \choose 2} \cdot x_k}{{6 \choose 3}} \\[6pt]
&= \frac{{5 \choose 2} \cdot 3 + {4 \choose 2} \cdot 7 + {3 \choose 2} \cdot 14 + {2 \choose 2} \cdot 22}{{6 \choose 3}} \\[6pt]
&= \frac{10 \cdot 3 + 6 \cdot 7 + 3 \cdot 14 + 1 \cdot 22}{20} \\[6pt]
&= \frac{30 + 42 + 42 + 22}{20} \\[6pt]
&= \frac{136}{20} \\[6pt]
&= \frac{34}{5} = 6.8. \\[6pt]
\end{aligned} \end{equation}$$

$^\dagger$ The denominator is the number of possible ways of drawing $m$ distinct elements from the initial population of $n$ elements, which are equiprobable under the assumed sampling method.  The numerator is the number of possible ways of drawing $m$ distinct elements from the $n-k+1$ elements that are at least as large as the $k$th element of the initial set.
