# Estimation of sample mean for hypergeometric distribution under a constraint

Assume that we have a dataset $D$ that contains the age of N people: $X_1, \dots , X_N$. We draw a sample $S$ of size $n$ using sampling without replacement ($Y_1, ... , Y_n$). In order to estimate the Average AGE of people in $D$, we can simply estimate using the following:

$\theta = \bar{Y}$

Sample variance: $\sigma^2_\theta = \mathbb{E} \left[ \frac{N-n}{N(n-1)} \sigma^2_S \right] \Rightarrow$ Sample STD: $\sigma_\theta = \sigma_D \sqrt{\frac{N-n}{n(N-1)}}$

Now assume that we have a condition, For example we want to estimate the average age of MEN. For example, if the dataset $D$ has $K$ items (out of $N$) satisfying the condition $c$ ($K$ men out of $N$ people), then the sample $S$ has $k$ men out of $n$ people. Note again that the $P(k=i)$ follows a Hypergeometric distribution.

Now, The estimate for "average age of men" would be similar, i.e. $\theta = \bar{Y_c}$ where $\bar{Y}_c$ indicates the conditional mean of $Y$ (age of sample items), i.e. $\bar{Y}_c = \frac{\sum_{i=1}^{n} Y_i I_c(Y_i)}{\sum_{i=1}^{n} I_c(Y_i)}$.

Question 1: How can I prove that this estimate is biased OR unbiased?

Note: I know the answer, but I could not prove it:

$$\mathbb{E}\left[ \theta_c \right] = \bar{X_c} W \;\; \text{which is:}\begin{cases} \mbox{biased} & n \leq N - K,\\ \mbox{unbiased} & n > N - K . \\ \end{cases}$$

Where $W = P(k \neq 0)$ for Hyper-geometric distribution.

Question 2: How about $\sigma_{\theta_c}$?