5

So I was looking for an answer on this assignment we have to program but I cannot find it anywhere. I'm a computer science student, not a statistics students. (And it isn't even for a statistics course).

We got a list of letters $[\rm c,a,c,t,u,s]$. We have to calculate the chance that we form a particular word by sampling letters uniformly at random from the list without replacement. The order in which we sample the letters does not matter.

The chance with which you sample a letter is equal to the times that letter appears divided by the total number of letters in the bag. After a letter is sampled, it is deleted from the list. So for example if you have a bag containing $[\rm c,a,c,t,u,s]$ the chance to sample $c$ is $2/6$ and the chance you draw any other letter is $1/6$.

We need a formula that calculates the probability of sampling a certain word from a list of letters using $n$ letters.

For instance:

  • $Pr(\rm make\_word([c,a,c,t,u,s],3,[c,a,t])) = 0.0999999999999999$

    So this means that the chance you draw the word "cat" from the bag $[\rm c,a,c,t,u,s]$, by sampling $3$ letters, is $0.0999$.

  • Another example: $Pr(\rm make\_word([c,a,c,t,u,s],4,[c,a,t])) = 0.33333333333333337$

    So this means that the chance you draw the word "cat" from the bag $[\rm c,a,c,t,u,s]$, by sampling $4$ letters, is $0.3333$.

Would anyone have a formula that can help me?

Kat
  • 163
  • Sorry, you misunderstood what I meant. I changed the text a bit. You get a certain number of letters to pick and we need the probability that a certain word is sampled with those letters. – Kat Dec 30 '14 at 19:58
  • No without replacement. And yes, all letters have equal probability. – Kat Dec 30 '14 at 20:17
  • 1
    Kat, in an edit I removed a very confusing statement that flatly contradicted everything else stated in the question and comments. Please check the edit record to verify this was done in a way that reflects your intentions. – whuber Dec 30 '14 at 22:09
  • 1
    A generalization of this question appears at http://stats.stackexchange.com/questions/74468: it asks about the chance of being able to make some word within a given set of words (a "dictionary") when drawing without replacement from a multiset of letters. The solution methods described there readily apply here, too. (But beware of several answers with incorrect formulas!) The reason I do not vote to close the present question as a duplicate is that the simplicity of this question allows for a reasonable formula to be developed, which is not possible for the generalization. – whuber Dec 30 '14 at 22:19

0 Answers0