-1

I would like to know which formula to use for the following combinations, please.

$A$ or $B$ can be chosen x times to generate a series of length $x$. $A$ and $B$ can be chosen as often as you like. Order does not matter. The question for each series is: For what fraction of the total are there more $A$’s than $B4’s?

Examples: If $x=2$, possibilities are $A-A, A-B, B-A, B-B$ so how often are there more $A$’s than $B$’s? That is $1$ out of $4=0.25$.

If $x=4$, possibilities are $A-A-A-A, A-A-A-B, A-A-B-A, A-A-B-B, A-B-A-A$, $A-B-A-B, A-B-B-A, A-B-B-B, B-A-A-A$, $B-A-A-B, B-A-B-A, B-A-B-B, B-B-A-A$, $B-B-A-B, B-B-B-A, B-B-B-B$ so how often are there more $A$’s than $B$’s? That is $5$ out of $16=0.3125$.

I can do these by hand, but it becomes more difficult when $x=62$.

Note that I am not giving any examples where x is an odd number, because that answer would always be $0.5$.

A formula would be sooooo helpful!

Thank you, Peter

nonuser
  • 90,026
  • 3
    Not sure I follow. You say "order does not matter" but then you list $AB,BA$ as two distinct strings. – lulu Jan 11 '18 at 13:48
  • Assuming that order does in fact matter, then symmetry works for even $n=2k$ as well...you just have to subtract the $\binom {2k}k$ ties. – lulu Jan 11 '18 at 13:50
  • Thanks for your quick reply, Lulu. You are right that order matters for the calculation of the combinations, but not for the the final question, which is how often there are more A's than B's. Henry's answer below solved it. – Peter Duncan Jan 12 '18 at 00:42
  • Not following you. If order does not matter, the problem is trivial but the answer is different. For $n=2k$ there is only one tie and there are $2k$ cases (counting the number of $A's$ say). Thus the answer in that case would be $\frac 12 \times \left(1-\frac 1{2k}\right)=\frac 12 - \frac 1{4k}$. Very different. – lulu Jan 12 '18 at 01:27

1 Answers1

1

By symmetry, it is half the proportion which do not have equal numbers of As and Bs

As you say, for odd $x$ this must be $\dfrac12$

For even $x$, using a binomial expansion, the proportion with equal numbers is $\dfrac{x \choose x/2}{2^x}=\dfrac{x!}{2^x(x/2)!^2}$ so the proportion with more As then Bs is $\dfrac12 -\dfrac{x \choose x/2}{2^{x+1}} =\dfrac12 - \dfrac{x!}{2^{x+1}\, (x/2)!^2}$

For $x=62$ this is close to $0.45$

Henry
  • 157,058
  • Hi Henry. Thank you so much for your quick reply. I am very impressed! This is exactly what I was looking for. I had no idea how to figure this out. Miraculous to me, how you did this. Awesome! - Peter – Peter Duncan Jan 12 '18 at 00:46