# Expected value: can you replace components with their expected value?

For a concrete example: Suppose you have a hypergeometric distribution, so a set N objects partitioned into nonempty subsets X and Y. We remove them without replacement. However, rather than simply removing r of them, we instead toss a coin. If it's heads we make a random draw. We then ask the expected number of Xs drawn, call this Z, after r tosses. Take italics X to be the number of elements in X, and N to be the number of all objects.

I just used the law of total expectation to derive the hopefully correct answer.

$$\mathbb{E}Z = \frac{rX}{2N}$$

But it also occurs to me that there is some intuitive appeal to reasoning like so: on average there will be r/2 heads, so this may be equal to the mean of a hypergeometric with that many draws. And this way of thinking would give the same answer!

What I want to know follows. Is there a more general rule by which, when finding the expectation, you can replace components of the system with their expectation? Linearity accomplishes this in a large number of valuable cases. Are there other or more general settings in which we can do this, which would account for the success in the example above?

• The rules are not clear. If the coin comes up $H$ you just remove $1$ uniformly at random? What happens if you throw a $T$? – lulu Mar 4 at 12:14
• @lulu then you make no draw and flip again. Perform r flips. – Addem Mar 4 at 12:18
• @lulu Right, I'll edit the post to be more clear about the denotation of the symbols. – Addem Mar 4 at 12:38
• But I was misreading...$Z$ is the number of deleted objects, not the number of surviving objects. – lulu Mar 4 at 12:39
• The way I'd see that result is this: we expect $\frac r2$ deleted objects. Each deleted object is in $X$ with probability $\frac XN$, hence your result. Is that the same as what you wrote? – lulu Mar 4 at 12:42