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?