[Question]
  [
A deck of cards is the Cartesian product of `S` suits and `R` ranks.
Many, though not all, card games use `S=4` and `R∊{6,8,13}`.
A hand of `H` cards is dealt from the deck.
Its *distribution*, a.k.a. "hand pattern", is an array that describes
how many cards you got from each suit, ignoring suit order (so, it's like a multi-set).
Given a distribution `D` satisfying `len(D)=S`, `1≤sum(D)=H≤S×R`, `0≤D[i]≤R`, `D[i]≥D[i+1]`,
find the probability of it occurring.
Input: an integer `R` and an array `D`.
Output: the probability with at least 5 digits after the decimal mark;
 trailing zeroes may be skipped; scientific notation is ok.
Loopholes forbidden. Shortest wins.
Tests:
```
R    D               probability
13   4 4 3 2     ->  0.2155117564516334148528314355068773
13   5 3 3 2     ->  0.1551684646451760586940386335649517
13   9 3 1 0     ->  0.0001004716813294328274372174524508
13   13 0 0 0    ->  0.0000000000062990780897964308603403
8    3 2 2 1     ->  0.4007096203759162602321667950144035
8    4 2 1 1     ->  0.1431105787056843786543452839337155
8    2 2 1 0     ->  0.3737486095661846496106785317018910
8    3 1 1 0     ->  0.2135706340378197997775305895439377
15   4 4 3 2 1   ->  0.1428926269185580521441708109954798
10   3 0 0       ->  0.0886699507389162561576354679802956
10   2 1 0       ->  0.6650246305418719211822660098522167
10   1 1 1       ->  0.2463054187192118226600985221674877
```
See also [Bridge hand patterns in Wikipedia](https://en.wikipedia.org/wiki/Contract_bridge_probabilities#Hand_pattern_probabilities).
EDIT: dropped unnecessary restriction `H≤R`
EDIT: added constraint `H≥1`
  
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 30 chars
```
×/!⍨,z,1÷((z←!∘≢⊢)⌸⊢),×∘≢!⍨1⊥⊢
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R24TD0/UVH/Wu0KnSMTy8XUOjCiik@KhjxqPORY@6Fmk@6tkBonQOT4eIgZQaPupaChT8/9/QWCFNwQQIjRWMuMAcUyATzrEEMg0VDCAcIGEAglwWQA5IDRAaQjgmICaMAxZHKDOEmGCKsAio0NAAyAWbB2FCdICZIPWGAA)
Using [@orlp’s formula](https://codegolf.stackexchange.com/a/148624/74681).
[Answer]
# Python 3, 134 bytes
```
b=lambda n,k:k<1or n*b(n-1,k-1)/k
f=lambda R,D,i=1,s=1,t=0:D and b(R,D[0])*i/s*f(R,D[1:],i+1,(D[0]in D[1:])*s+1,t+D[0])or 1/b(~-i*R,t)
```
Formula is the product of `binom(R, d)` for each element `d` in `D`, times `factorial(len(D))`, divided by the product of `factorial(len(S))` for each `S` in the groupings of `D` (e.g. `[4, 4, 3, 2]` has groupings `[[4, 4], [3], [2]]`), finally divided by `binom(len(D) * R, sum(D))`.
Or in math notation, assuming **m** contains the multiplicities of the **n** unique elements in **D**:
$$
\frac{|D|!}{m\_1!\cdot m\_2!\cdots m\_n!}
\binom{|D|\cdot R}{\sum D}^{-1}
\prod\_{d\in D}\binom{R}{d}
$$
[Answer]
# [R](https://www.r-project.org/), ~~90~~ ~~85~~ 83 bytes
```
function(R,D,l=sum(D|1),K=choose)prod(K(R,D),1:l,1/gamma(1+table(D)))/K(R*l,sum(D))
```
[Try it online!](https://tio.run/##JYs7DsIwEAV7n8LlvrAorNIgRDp36biBceKA5A@Kk467mwCaYorRLNXr61FXvyW3PnOiGxsOfdkimbeAh949ci4TXkseafhmsFwCSzvbGC3JYbX3MJEB0O69CfybgeqpOJsIrP@GOivVadk51Q8 "R – Try It Online")
I observed the same thing as [orlp](https://codegolf.stackexchange.com/a/148624/67312), but I picked a nice language that has combinatorics builtins. 
Explanation:
```
function(R,D,             # next are optional arguments
 l=sum(D|1),              # alias for length of D, aka S
 K=choose)                # alias for choose
  prod(                   # take the product of:
    K(R,D),               # "choose" is vectorized over R and D
    1:l,                  # S!
    1/gamma(1+            # gamma(n+1) = n! for integer n
     table(D))            # multiplicities of unique elements of D
  ) /                     # divide by
  K(R`*`l, sum(D))          # R`*`S choose H
                          # return last computation (which is all the computation)
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~22~~ 20 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
-2 bytes using a new quick, `ʋ`, and a new monadic atom `Ẉ`
```
ĠẈ!;L×c⁸S¤ʋ
L!;c@÷çP
```
A dyadic link, taking the dealt-distribution, D, on the left and the number-of-ranks, R, on the right, which returns the probability of occurrence.
**[Try it online!](https://tio.run/##y0rNyan8///Igoe7OhStfQ5PT37UuCP40JJT3Vw@itbJDoe3H14e8P//f2MdIyA0/G8BAA "Jelly – Try It Online")** or see the [test-suite](https://tio.run/##y0rNyan8///Igoe7OhStfQ5PT37UuCP40JJT3Vw@itbJDoe3H14e8P/onsPLHfQfNa05OunhzhlAGojc//@PjjY01lGIVjDRASEg0yg2VodLASpqChZCF7UECxnqKBggiYIIAwiCiCpYgNSC9IKRIbKoCUQITdQIJopugiGKbaao7oUbYmgAVY5wA0QIxVCIkCHM9lgA "Jelly – Try It Online")
### How?
```
ĠẈ!;L×c⁸S¤ʋ - Link 1, denomParts: list, distribution (D); number, ranks (R)
                                                                 e.g. [3,3,3,2,2]; 8
Ġ           - group indices of D by their values                      [[4,5],[1,2,3]]
 Ẉ          - length of each group                                    [2,3]
  !         - factorial (vectorises)                                  [2,6]
          ʋ - last four links as a dyad
            - ... i.e. totalWaysToDeal = f(list, distribution (D); number, ranks (R)):
    L       - length of D                                             5
     ×      - multiply by R = total number of cards                   40
         ¤  - nilad followed by link(s) as a nilad:
       ⁸    -   chain's left argument, D                              [3,3,3,2,2]
        S   -   sum = total cards dealt                               13
      c     - binomial                                        40C13 = 12033222880
   ;        - concatenate                                             [2,6,12033222880]                                                  
L!;c@÷çP - Main link: list, distribution (D); number, ranks (R)
         -                                                  e.g. [3,3,3,2,2]; 8
L        - length of D = number of suits                         5
 !       - factorial                                             120
   c@    - R binomial (vectorised across) D     (8C3=56;8C2=28)  [56,56,56,28,28]
  ;      - concatenate                                           [120,56,56,56,28,28]
      ç  - call the last link (1) as a dyad = denomParts(D,R)    [2,6,12033222880]
     ÷   - divide (vectorises)                                   [120/2,56/6,56/12033222880,56,28,28]
       P - product                                               0.11441900924883391
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 21 bytes
```
cP¹g!*¹γ€g!P¹gI*¹Oc*/
```
[Try it online!](https://tio.run/##MzBNTDJM/f8/OeDQznRFrUM7z21@1LQmXRHE9QRy/ZO19P//jzbVMQZCo1guQ2MA "05AB1E – Try It Online")
**Explanation**
```
 P                      # product of
c                       # bin(input1,input2)
     *                  # multiplied by
    !                   # fac of
  ¹g                    # length of input1
                    /   # divided by
           P            # product of
          !             # fac of each
        €g              # length of each
      ¹γ                # chunk of consecutive equal elements of input1
                   *    # multiplied by
                  c     # bin of
            ¹g          # length of input1
              I*        # times input2
                ¹O      # and sum of input1
```
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 32 bytes
```
cc*.!lQ*F.cLvzQ*F.!hMr8Q.c*vzlQs
```
**[Try it here!](https://pyth.herokuapp.com/?code=cc%2a.%21lQ%2aF.cLvzQ%2aF.%21hMr8Q.c%2avzlQs&input=%5B1%2C1%2C1%5D%0A10&test_suite_input=%5B4%2C+4%2C+3%2C+2%5D%0A13%0A%0A%5B5%2C+3%2C+3%2C+2%5D%0A13%0A%0A%5B9%2C+3%2C+1%2C+0%5D%0A13%0A%0A%5B13%2C+0%2C+0%2C+0%5D%0A13%0A%0A%5B3%2C+2%2C+2%2C+1%5D%0A8%0A%0A%5B4%2C+2%2C+1%2C+1%5D%0A8%0A%0A%5B2%2C+2%2C+1%2C+0%5D%0A8%0A%0A%5B3%2C+1%2C+1%2C+0%5D%0A8%0A%0A%5B4%2C+4%2C+3%2C+2%2C+1%5D%0A15%0A%0A%5B3%2C+0%2C+0%5D%0A10%0A%0A%5B2%2C+1%2C+0%5D%0A10%0A%0A%5B1%2C+1%2C+1%5D%0A10%0A&debug=0&input_size=3)** or **[Verify all the test cases!](https://pyth.herokuapp.com/?code=cc%2a.%21lQ%2aF.cLvzQ%2aF.%21hMr8Q.c%2avzlQs&input=%5B1%2C1%2C1%5D%0A10&test_suite=1&test_suite_input=%5B4%2C+4%2C+3%2C+2%5D%0A13%0A%0A%5B5%2C+3%2C+3%2C+2%5D%0A13%0A%0A%5B9%2C+3%2C+1%2C+0%5D%0A13%0A%0A%5B13%2C+0%2C+0%2C+0%5D%0A13%0A%0A%5B3%2C+2%2C+2%2C+1%5D%0A8%0A%0A%5B4%2C+2%2C+1%2C+1%5D%0A8%0A%0A%5B2%2C+2%2C+1%2C+0%5D%0A8%0A%0A%5B3%2C+1%2C+1%2C+0%5D%0A8%0A%0A%5B4%2C+4%2C+3%2C+2%2C+1%5D%0A15%0A%0A%5B3%2C+0%2C+0%5D%0A10%0A%0A%5B2%2C+1%2C+0%5D%0A10%0A%0A%5B1%2C+1%2C+1%5D%0A10%0A&debug=0&input_size=3)**
### How this works?
```
cc*.!lQ*F.cLvzQ*F.!hMr8Q.c*vzlQs ~ Full program. D = list, R = number.
   .!                            ~ The factorial of...
     lQ                            ~ The length of D.
  *                              ~ Multiplied by...
       *F                          ~ The product of the elements of...
         .c                          ~ The nCr between...
           L  Q                        ~ Each element of D, and...
            vz                         ~ R.
 c                               ~ Divided by...
               *F                  ~ The product of the elements of...
                 .!                  ~ The factorial of each...
                   hM                  ~ Heads. Count of adjacent elements in...
                     r8Q                 ~ The run length encoding of D.
c                                ~ Divided by...
                        .c         ~ The nCr between...
                          *          ~ The product of...
                           vz          ~ R, and...
                             lQ        ~ The length of D.
                               s   ~ And the sum of D.
                                 ~ Output implicitly.
```
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 42 bytes
```
{×/(!≢⍵),(⍵!⍺),÷((+/⍵)!⍺×≢⍵),!≢¨⍵⊂⍨1,2≠/⍵}
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///P@1R24Tqw9P1NRQfdS561LtVU0cDSCo@6t2lqXN4u4aGtj5IEMQ/PB2mAqT00Aog81FX06PeFYY6Ro86F4DU1f7/b2iskKZgAoTGCkZcYI4pkAnnWAKZhgoGEA6QMABBLgsgB6QGCA0hHBMQE8YBiyOUGUJMMEVYBFRoaADkgs2DMCE6wEyQekMA "APL (Dyalog Unicode) – Try It Online")
Still golfing.
[Answer]
## Clojure, 153 bytes
```
#(apply +(for[_(range 1e06):when(=(remove #{0}%)(reverse(sort(vals(frequencies(take(apply + %)(shuffle(for[i(range %2)j(range(count %))]j))))))))]1e-06))
```
Just a brute-force simulation, to get more precision increase the iteration count and the "1 / N" value at the end accordingly. First argument is the counts and 2nd argument is the number of cards in the deck per suite.
[Answer]
# J, 57 bytes
```
](#@]%~[:+/[-:"1[:\:~@(#/.~)"1+/@[{."1])i.@!@(*+/)A.(##\)
```
[Try it online!](https://tio.run/##Rc29DsIgGIXhnas4Qkz5RPmx25c0weugTEaiXRw6Grl1Sqfm5B2e6SytrJgYHr2WtYr5XBMbl24sQ@KZa9TK2UoyGBfTz8qQ6WPjKeqLcfSwWqmZGglpMZSJB1zxZ5RViNfz/cWIgrDv4L3THxz7uUfbAA "J – Try It Online")
This runs in *O(golf)* and will choke on many of the test cases (though works theoretically), which would be fine if it were golfier. But I'm stuck on trimming it down, especially with avoiding those repeated `"1`. If anyone wants to help, here's the parsed version...
The right side of the main fork is all possible deals of the *deck*, and the left side of the main fork is just the original right arg, ie, the suit mask we're matching against.
Inside, from each "shuffled" deck, we take the first *hand* elements, then group them using key `/.` and sort the result, and check if that matches the suit mask in question. We add add up the total number that do match, and divide that into the length of all possible decks.
```
┌─┬─────────────────────────────────────────────────────────────────────────────────────────────────┬─────────────────────────────────────┐
│]│┌───────┬─────┬─────────────────────────────────────────────────────────────────────────────────┐│┌──────────────────────┬──┬─────────┐│
│ ││┌─┬─┬─┐│┌─┬─┐│┌──┬─────┬──────────────────────────────────────────────────────────────────────┐│││┌────────┬─┬─────────┐│A.│┌─┬─────┐││
│ │││#│@│]│││%│~│││[:│┌─┬─┐│┌─┬────────┬─────────────────────────────────────────────────────────┐│││││┌──┬─┬─┐│@│┌─┬─────┐││  ││#│┌─┬─┐│││
│ ││└─┴─┴─┘│└─┴─┘││  ││+│/│││[│┌──┬─┬─┐│┌──┬───────────────────────────┬────────────────────────┐│││││││i.│@│!││ ││*│┌─┬─┐│││  ││ ││#│\││││
│ ││       │     ││  │└─┴─┘││ ││-:│"│1│││[:│┌─────────────────────┬─┬─┐│┌───────────┬────────┬─┐│││││││└──┴─┴─┘│ ││ ││+│/││││  ││ │└─┴─┘│││
│ ││       │     ││  │     ││ │└──┴─┴─┘││  ││┌──────┬─┬──────────┐│"│1│││┌─────┬─┬─┐│┌──┬─┬─┐│]││││││││        │ ││ │└─┴─┘│││  │└─┴─────┘││
│ ││       │     ││  │     ││ │        ││  │││┌──┬─┐│@│┌──────┬─┐││ │ ││││┌─┬─┐│@│[│││{.│"│1││ ││││││││        │ │└─┴─────┘││  │         ││
│ ││       │     ││  │     ││ │        ││  ││││\:│~││ ││┌─┬──┐│~│││ │ │││││+│/││ │ ││└──┴─┴─┘│ │││││││└────────┴─┴─────────┘│  │         ││
│ ││       │     ││  │     ││ │        ││  │││└──┴─┘│ │││#│/.││ │││ │ ││││└─┴─┘│ │ ││        │ ││││││└──────────────────────┴──┴─────────┘│
│ ││       │     ││  │     ││ │        ││  │││      │ ││└─┴──┘│ │││ │ │││└─────┴─┴─┘│        │ ││││││                                     │
│ ││       │     ││  │     ││ │        ││  │││      │ │└──────┴─┘││ │ ││└───────────┴────────┴─┘│││││                                     │
│ ││       │     ││  │     ││ │        ││  ││└──────┴─┴──────────┘│ │ ││                        │││││                                     │
│ ││       │     ││  │     ││ │        ││  │└─────────────────────┴─┴─┘│                        │││││                                     │
│ ││       │     ││  │     ││ │        │└──┴───────────────────────────┴────────────────────────┘││││                                     │
│ ││       │     ││  │     │└─┴────────┴─────────────────────────────────────────────────────────┘│││                                     │
│ ││       │     │└──┴─────┴──────────────────────────────────────────────────────────────────────┘││                                     │
│ │└───────┴─────┴─────────────────────────────────────────────────────────────────────────────────┘│                                     │
└─┴─────────────────────────────────────────────────────────────────────────────────────────────────┴─────────────────────────────────────┘
```
]