Category : Financial and Statistics
Archive   : MRCRY209.ZIP
Filename : CARDS.EKA

 
Output of file : CARDS.EKA contained in archive : MRCRY209.ZIP
; This example demonstrates how to use Mercury's built-in
; FACT function (FACT(x) = x factorial). The problem is:
; In a bridge game, the declarer controls 7 trump cards.
; We must determine the probability that the remaining
; 6 trump cards are evenly distributed (3 and 3) among
; the opposing two players. We calculate both the
; approximate and the exact probability in this example.

; the binomial coefficient formula
; ways of choosing k of n items
C(n,k) := BINOM(n,k) ; = FACT(n) / (FACT(k) FACT(n-k))

; approximate probability of 3-3 split
ProbApprox = C(6,3) / 2^6

; exact probability of 3-3 split
ProbExact = C(6,3) * C(20,10) / C(26,13)


  3 Responses to “Category : Financial and Statistics
Archive   : MRCRY209.ZIP
Filename : CARDS.EKA

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/