expectation value - box and balls

Solution 1:

I could be mistaken, having never formally studied probability theory. However, it seems to me that this problem does not (exactly) require a consideration of conditional probability.

In the $(n - [X + Y])$ trials where a yellow ball was taken, you know for sure that a green ball was not taken during any of these trials.

Therefore, you can focus exclusively on the $[X + Y]$ trials. Also, since ball selection is done with repetition, each of the $[X + Y]$ trials is an independent event.

In each such event, since there are $(2)$ [green] and $(6)$ [green + blue] balls, the chance of a ball being green in any specific one of the $[X + Y]$ trials is $(1/3)$.

Therefore, $E(X|X+Y) = \frac{X + Y}{3}$.


Edit

I think that it is worth noting that intuition, which is my main weapon, will only take the Probability student so far. That is, suppose that $n = 100$, and that the sum $(X + Y)$ ranges over the possible values $\{0,1,2, \cdots, 100\}$.

Is there some reason to believe that as the sum $(X + Y)$ changes from one value to another, the chance that a specific one of the $(X + Y)$ trials was not yellow was more likely than normal to be because the ball selected was green rather than blue?

I have assumed not. That is, I have assumed that regardless of how often (out of the $n = 100$ selections) the ball selected was not yellow, there is no (intuitive) reason to presume that the cause of the success of the event was more likely than normal to be because the ball was green rather than blue, or blue rather than green.

That is, even if (with $n = 100$), $X + Y = 99$, I would still expect $X$ to equal $33$, and with $X + Y = 3$, I would still expect $X$ to equal $1$.