I am learning about how to handle dependence when doing probabilistic calculations and I came across this problem I don't understand how to solve.
I am given $10$ colored balls painted either red or blue or neither. The balls are also numbered from $1$ to $10$ so you can tell which is which. I choose a uniformly selected random subset $S$ of the integers $\{1,\dots,10\}$ and look at the corresponding balls and their colors.
Let $r$ be the proportion of the balls that are red and $b$ be the proportion of the first ten balls that are blue. Therefore we have that $r+b \leq 1$ as a ball can be neither red nor blue. The probability that I have chosen the same number of blue balls as red is
The number of red balls chosen is a binomial random variable $B(10,r)$ and the number of blue balls chosen is a binomial random variable $B(10,b)$ so $x$ is the probability that these two random variables are equal.
(Added from Xoff's answer.) The number of red balls will follow a binomial distribution of cardinality $R=10r$ and probability $\frac{1}{2}$, and the same for the blue balls with $B=10b$. Hence
$$x=\frac{1}{2^{R+B}}\sum_{i=0}^{10}\binom{R}{i}\binom{B}{i}$$
I then increase all the values in $S$ by $1$, remove any number over $10$ and finally with probability $1/2$ add the number $1$ to the set to get a new set of integers $S'$. I look at those corresponding balls. The probability that this new selection has an equal number of red and blue balls is also $x$ I believe.
How can you compute the probability that $S$ gives an equal number of red and blue balls and $S'$ gives an equal number of red and blue balls ? The sets $S$ and $S'$ are clearly highly dependent on each other so we can't just multiply the probabilities to get $x^2$.
@Xoff answers the question and says that the answer depends on exactly which balls have which color. For a fixed number of red and blue balls (and fixed $n$), is it possible to determine the maximum and minimum probability?
Let $N$ be the number of ball (here $N=10$), let $R$ be the number of red balls among them (so $R=Nr$) and let $B$ be the number of blue balls (so $B=Nb$).
you choose each ball with probability $\frac{1}{2}$. The number of red balls will follow a binomial distribution of cardinality $R$ and probability $\frac{1}{2}$, and the same for the blue balls with $B$. Hence
$$x=\frac{1}{2^{R+B}}\sum_{i=0}^{10}\binom{R}{i}\binom{B}{i}$$
But there is no answer to your question, because it does not only depends of $B$, $R$ and $N$, but also of how the balls are numbered. Example
Let $N=4$ and balls are $R,R,B,B$ (Balls $1$ and $2$ are red, balls $3$ and $4$ are blue).
There are $6$ subsets $S$ with equals numbers of blue and red :
Each set $S$ can be obtained with probability $\frac{1}{2^4}$, and each $S'$ can then be obtained with $p=\frac{1}{2}$. So the probability of having both $S$ and $S'$ with equal red and blue is $\frac{4}{2^4.2}=\frac{1}{8}$
Other example, same numbers, but balls are $R,B,R,B$
But here all subsets $S$ can lead to a valid $S'$ and so the probability of having both $S$ and $S'$ with equal colors will be $\frac{3}{16}$
As you can see, the probability you are looking for does not depend only of $N$, $r$ and $b$.