# 2 Urns and 30 balls problem needing to check answer

You have 30 balls 20 black and 10 white let $X_{n}$ be the current number of white balls in urn 1 and each urn holds 15 balls, find
$P_{r}$ ($X_{n+1}$)=k |$X_{n}$=j).

You are taking a ball from urn 1 and urn 2 and placing the ball from urn 1 into 2 and the ball from urn 2 and putting it in urn 1. I should have clarified that earlier.

So I have this representation Urn 1: $$\frac{X_{n}\:\:\:15-X_{n}}{15};$$ with $15-X_{n}$ representing black balls in urn 1

Urn 2: $$\frac{10-X_{n}\:\:\:15-(10-X_{n})}{15};$$

with $\frac{15-(10-X_{n})}{15}$ being the black balls and $\frac{10-X_{n}}{15}$ being the white balls in urn 2.

So would my answer be $P_{r}$ ($X_{n+1}$)=k |$X_{n}$=j)=$\frac{15-(10-X_{n})}{15};$

I realize that my variables might not match up at this point; but I think I'm on the right track but I am just missing something.

-
I think you forgot to write part of the question: what kind of ''2 urns and 30 balls'' problem is it? What does the $n$ in $X_n$ mean? – Pedro M. Feb 5 '12 at 20:46
Each urn holds 15 balls each and $X_{n}$ is the current number of balls in urn 1. – Taylor Zwick Feb 5 '12 at 20:55
What are you doing to the balls to transition from one state to another? You have to be doing something to get from one state to the next, taking one ball out of each urn and putting it into the other, taking a ball out of a random urn and painting it black and putting it back, etc. Without knowing the process, finding the probabilities is difficult. – deinst Feb 6 '12 at 0:38
You are taking a ball from urn 1 and urn 2 and placing the ball from urn 1 into 2 and the ball from urn 2 and putting it in urn 1. I should have clarified that earlier. – Taylor Zwick Feb 6 '12 at 2:04
Your final formula doesn't depend on $k$; it gives the same answer for 10 white balls as for 1; can that possibly be right? – Gerry Myerson Feb 6 '12 at 4:43

When we draw the balls from urn 1 and urn 2 there are four things that can happen. Both balls can be black or both white, in which case $X_{n+1}=X_n$, or we can draw a white ball from bin 1 and a black ball from bin 2 in which case $X_{n+1} = X_n - 1$ or we can draw a black ball from bin 1 and a white ball from bin 2 so $X_{n+1} = X_n + 1$.
Now, at time $n$, as you have observed, bin 1 has $X_n$ white balls and $15-X_n$ black balls, and bin 2 has $10-X_n$ white balls and $15 - (10-X_n)=5+X_n$ black balls. So the probability of drawing a white ball from bin 1 and a black ball from bin 2 is $\frac{X_n}{15}\frac{5+X_n}{15}$ (we just multiply the probabilities because the two draws are simultaneous and independent.) Similarly, the probability that we draw a black ball from bin 1 and a white ball from bin 2 is $\frac{15-X_n}{15}\frac{10-X_n}{15}$. The probability that the two balls are the same is just 1 minus the sum or the two probabilities that they are different. So putting it all together, we get
$$P(X_{n+1}=k | X_n=j)=\begin{cases}\frac{j^2+5j}{225}&\mbox{if }k=j-1\\\frac{-2j^2+20j+75}{225}&\mbox{if }k=j\\\frac{j^2-25j+150}{225}&\mbox{if }k=j+1\\0&\mbox{otherwise.}\end{cases}$$