I want to convert a stochastic formula into a proper equation describing the probability of a specific card draw in a card game.
Example: A and B are people playing cards. They each have a 52 card deck and four cards in hand. A has an ace, a ten, and 2 fours. If A draws 3 more cards from his deck, and he wants to draw one more ace, what is the probability? That is, there are: 48 cards in the deck (52 card deck, minus the 4 cards in A's hand); 3 target cards (4 aces in the deck, minus the one in A's hand); and 3 cards to be drawn.
[1] The original formula:
probability=1−((D−T)!−(D−T−H)!)(D!−(D−H)!−1))=17.96%
where: D is the current deck size, T is the number of target cards in the deck, and H is the number of cards to be drawn in the next turn.
An attempt to notate a proper equation:
However, the original equation seems to be notationally incorrect, since the term
((D-T-H)!) can become negative in case of: D = 30, T = 30, H > 0, but factorials are only defined for non-negative integer numbers.
Further conditionals are: T > 0; H > 0; D ≥ T, D ≥ H.
Question 1: What is the correctly denoted equation to prevent the term ((D-T-H)!) from becoming negative?
Source:
The equation was derived from a HTML source code provided by Scott Gray (see the full HTML source code at (http://www.unseelie.org/srccgi/ScottsGamingCgi.pdf, p. 2-3). Note: The equation in HTML source code actually works in the above-described case (see also http://www.unseelie.org/cgi-bin/cardco. ... =30&hand=3), but is obviously not functional as denoted in [1] outside of the HTML script.
Any solutions to this problem? Thanks in advance!