# Probability of combination given a string with frequencies

#### tconnell

##### New Member
Hi,

I am new to this website and am not strong with statistics. I am wondering if I have a string of letters

ABCDEFABCDEF... and so on, to 600 let's say

And there are certain colors I want to make each letter.
So like I want 90% of the A to be Red, 10% to be Blue.
I want 100% of the C to be green.
I want 50% of the D to be Yellow and 50% to be Black.

How do I calculate the maximum possible number of unique strings, like I said if it goes to 600 letters?

Also how would it work if, each time I use a color, it changes the frequency so that I then am more likely to get the other color? That would certainly make it complex right?

#### katxt

##### Well-Known Member
So, just to be clear.
You have a given fixed string of 600 letters.
The proportions of A, B, C, and D are unknown.
You color the string according to the rules above.
How many different strings?
Have I got that right?

#### katxt

##### Well-Known Member
So like I want 90% of the A to be Red, 10% to be Blue.
I want 100% of the C to be green.
I want 50% of the D to be Yellow and 50% to be Black.
Let's pretend there are just three sorts, A, C and D. There are two choices for A, one choice for C and two choices for D.
You have a string. say. AACDADDC. Then move along the string substituting the number of choices for the letter.
2 2 1 2 2 2 2 1. Now multiply. So, there are 64 unique colored versions of this letter string, like beads on a necklace. This could be put into a more general formula.
This number doesn't depend on the frequencies of the colors, so it will also be the answer to your second question.
Or is your question something different again?
This all sounds like genetics.

#### tconnell

##### New Member
Sorry for taking too long to respond.
It is genetics, well, not DNA but amino acids.
More like, A B C D E F G H and so on.
And you also know the whole identity of the string, like in your example.

By multiply across, it gives you the number of versions possible, so that makes sense. What I really want to calculate is, I have a specific version in mind. I am wondering if I had a pool of A*, A'. A^, B*, B". D'. D* etc, with different frequencies, what are the chances with these frequencies (or number in the pool) that I will pull.. so like maybe 10% of the time it will be A*. and 90% it will be A'
and I want A*B"D'B*A^A^D'B*B*B*

Does that make sense?

#### fed2

##### Active Member
since every choice of colorings produces a unique string, ie there is no symmetry involved, the number of unique colorings sounds like it will work out to product of choose(# X's, .9 * # X's).... or something or whatever.