What is the probability that an element is in a subset of a set? There's a list of numbers from 1 to 500 (both inclusive). Let's call this set $M$. I pick a subset $A$ uniformly at random from set $M$. The size of subset $A$ is $n$. Element $x$ is chosen uniformly at random from set $M$. What is the probability that $x$ is in set $A$?
 A: Assuming that $n$ is a fixed value, then let $\delta_x = 1$ if $x \in A$ and $\delta_x = 0$ otherwise. Since the set $A$ was selected through an equal probability selection of the elements of $M$ such that $\sum_{x \in M} \delta_x = n$, we can use the fact that $E(\delta_x) = P(x \in A)$ and take the expected value of that sum to show that $P(x \in A) = \frac{n}{500}$.
A: Lets assume size of set $M$ is $m$

*

*Method - 1

*

*Total number of size $n$ subsets of set $M$ - choosing $n$ elements from $m$ elements, which is ${m \choose n}$


*Now, lets find number of subsets with $x_i$ in them - fixing $x_i$ we have to choose $n-1$ elements from remaining $m-1$ elements, which is ${m-1 \choose n-1}$


*So the probability of $x_i$ being present in any such subset is $${{m-1 \choose n-1}\over {m \choose n}} = {n \over m}$$




*Method - 2

*

*Among the chosen subset $ A = {\{y_1,y_2,....,y_n\}}$, any element can be $x_i$, lets assume $E_k$ denote the event of $y_k = x_i$ and its probability $P(E_k)$, note that these events are mutually exclusive, as in if $y_k = x_i$ then no other $y_r, r \neq k, y_r \in A $ will be $x_i$

*All $E_k$'s are equally probable and $P(E_k)$ is $\frac{1}{m}$ since $y_k$ can be any of the $x_i \in M$ with equal probability since $A$ is selected uniformly at random

*Now, lets assume our desired event $E^*$, which is $x_i$ being in A, then $$ E^* = E_1 \cup E_2 \cup ... E_n $$ $$ P(E^*) = \sum_{j=0}^n P(E_j)$$ $$= n P(E_k)$$ $$ = n \frac{1}{m} $$
