Marble probability problem. A coin is flipped twice. For each flip, a marble is placed into a bag:
If the flip was heads, a red marble is placed in the bag. If the flip was tails, a blue marble is placed in the bag. You aren't allowed to observe the coin flips or the two marbles in the bag.
Now, you reach into the bag and randomly take out one of the two marbles, and it is red.
You put it back in. Then, you reach into the bag again.
The chance that you pull out a blue marble is $\frac{1}{4}$.
So, when the first marble you take out turns out to be red, you know what you've picked could be any of the following four, and all of these possibilities are equally likely:
the first red marble if both marbles in the bag are red, the second red marble if both marbles in the bag are red,the red marble if only the first marble placed in the bag is red, or the red marble if only the second marble placed in the bag is red.
There is 0.5 chance bag is mixed and 0.5 of getting blue thus $\frac{1}{4}$ chance of pulling out blue.
I think I don't agree with the explaination because before putting back the red marble again inside the bag I do agree the outcomes are like that but if I put it back then there doesn't seem to be any relationship so you can't just proceed and say $0.5\cdot 0.5$. I think the outcomes are either mixed or not mixed and from that outcome you will get: R1R1 R1B1 R1R1 R1R2 so it is $1/4$ of pulling out blue.
But if I think like that and if you see that someone removes a red marble from the bag and sets it aside instead of putting back in the probability of pulling out blue is $2/3$.
But to me it is $1/2$ because the only outcomes are R1B1 and R1R2. I don't see 3 outcome. Why is it $2/3$? Why am I wrong?
 A: The coin is flipped twice, so the sample space:
$$\{HH,TT,HT,TH\}$$
This means that the sample space $(S)$ of the balls in the bag is:
$$S=\{RR,BB,RB,BR\}$$
Note: $P(E_{RR})=P(E_{BB})=P(E_{RB})=P(E_{BR})=\frac14$
For ease, let's denote the event of drawing a red ball by $X$ and that of drawing a blue ball by $Y$.
I'll be using the Bayes' Theorem to compute the probabilities ahead.
We know, $P(X|E_{RR})=1 \text{ and } P(Y|E_{RR})=0$
and $P(X|E_{BB})=0 \text{ and } P(Y|E_{BB})=1$
and $P(X|E_{RB})=\frac12 \text{ and } P(Y|E_{RB})=\frac12$
and $P(X|E_{BR})=\frac12 \text{ and } P(Y|E_{BR})=\frac12$
[For understanding why so: Given that box contains $RB$, probability of drawing red ball is, we know, $1/2$]
Since, $P(A|B)=\frac{P(A\cap B)}{P(B)} \Rightarrow P(A\cap B)=P(B)P(A|B)$ 
So, $P(X\cap E_{RR})=(1)(\frac14) \text{ and } P(Y\cap E_{RR})=(0)(\frac14)$
and $P(X\cap E_{BB})=(0)(\frac14) \text{ and } P(Y\cap E_{BB})=(1)(\frac14)$
and $P(X\cap E_{RB})=(\frac12)(\frac14) \text{ and } P(Y\cap E_{RB})=(\frac12)(\frac14)$
and $P(X\cap E_{BR})=(\frac12)(\frac14) \text{ and } P(Y\cap E_{BR})=(\frac12)(\frac14)$
Now, you are given that a marble is drawn and it comes out to be red.
So, let's consider $2$ cases:
CASE $\bf1$: Red ball is replaced
$\begin{align} P(Y|X) &= \frac{P(Y\cap X)}{P(X)} \\ &= \frac{P(X\cap E_{RR}\cap Y)+P(X\cap E_{RB}\cap Y)+P(X\cap E_{BR}\cap Y)+P(X\cap E_{BB}\cap Y)}{P(X\cap E_{RR})+P(X\cap E_{RB})+P(X\cap E_{BR})+P(X\cap E_{BB})} \\ &= \frac{(1)(\frac14)(0)+(\frac12)(\frac14)(\frac12)+(\frac12)(\frac14)(\frac12)+(0)(\frac14)(1)}{(\frac12)(\frac14)+(\frac12)(\frac14)+(1)(\frac14)} \\ &= \frac14 \end{align}$
CASE $\bf2$: Red ball is not replaced
$\begin{align} P(Y) &= \frac{P(Y\cap E_{RR})+P(Y\cap E_{RB})+P(Y\cap E_{BR})}{P(E_{RR})+P(E_{RB})+P(E_{BR})} \\ &= \frac{(0)(\frac14)+(1)(\frac14)+(1)(\frac14)}{\frac14+\frac14+\frac14} \\ &= \frac23 \end{align}$


But to me it is $1/2$ because the only outcomes are R1B1 and R1R2. I don't see 3 outcome. Why is it $2/3$? Why am I wrong?

You see the in the CASE $2$ above, that the Red ball could have come out from these cases: $(RR),(RB),(BR)$. 
When the red ball is kept aside, we are left with: $\{R,B,B\}$ where now picking any of the $3$ is actually equally likely.
So, the favourable cases are $2$ out of the $3$ outcomes. Thus, the required probability of $2/3$.
Addendum:
Applying similar reasoning as we did in CASE $2$:
The Red ball could have come out from these cases: $(RR),(RB),(BR)$. 
In each of the cases we can get the red ball with a probability of $1,\frac12,\frac12$ respectively.
When the red ball is replaced, we again have: $\{(RR),(RB),(BR)\}$.
Probability that we get a blue ball from them $=0,\frac12,\frac12$ respectively.
So, $P(\text{Getting blue in }2^{nd}\text{ pick }|\text{ Got red in }1^{st} \text{ pick})=\frac{ P(1^{st}\text{ pick is red})\times P(2^{nd}\text{ pick is blue})}{P(\text{Red in }1^{st}\text{ pick})}=\frac{(0)(1)+(\frac12)(\frac12)+(\frac12)(\frac12)}{1+(\frac12)+(\frac12)}=\frac14$
