Search for a tool
Picking Probabilities

Tool to make probabilities on picking/drawing objects (balls, beads, cards, etc.) in a box (bag, drawer, deck, etc.) with and without replacement.

Results

Picking Probabilities -

Tag(s) : Combinatorics

Share dCode and more

dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!

Please, check our community Discord for help requests!

Thanks to your feedback and relevant comments, dCode has developped the best 'Picking Probabilities' tool, so feel free to write! Thank you !

# Picking Probabilities

## Probabilities for a Draw without Replacement

Example: Probability to pick a set of n=10 marbles with k=3 red ones (so 7 are not red) in a bag containing an initial total of N=100 marbles with m=20 red ones.

 Probability Format Numeric (between 0 and 1) Percentage (in %) Fraction A/B (exact or approximate) (About X/N) X in N Chance

## Probabilities for multiple Draws

Example: Calculation of the probability of having drawn the number '23' after 200 drawings of a 50-face dice.

 Probability to draw at least 1 time a given item not even once (0 time) a given item

 Probability Format Numeric (between 0 and 1) Percentage (in %) Fraction A/B (exact or approximate) (About X/N) X in N Chance

Tool to make probabilities on picking/drawing objects (balls, beads, cards, etc.) in a box (bag, drawer, deck, etc.) with and without replacement.

### How to compute a probability of picking without replacement?

For a set of $N$ objects among which $m$ are different (distinguishable). The probability of drawing a total of $n$ objects and that among these $n$ objects there are $k$ objects that are part of the $m$ different ones, is given by a hypergeometric distribution: $$p(X=k)=\frac{C_{m}^kC_{N-m}^{n-k}}{C_N^n} = \frac{ \binom{m}{k} \binom{N-m}{n-k} }{ \binom{N}{n} }$$

C represents the combination operator.

Example: Probability to draw $k=5$ red card among the $m=26$ red cards in a deck of $N=52$ cards by drawing $n=5$ cards.

Example: Probability to draw all $k=3$ black ball in a bowl with $N=25$ balls among which $m=3$ are black, by picking $n=3$ balls.

### How to compute a probability of picking with replacement?

The probability of never having picked a given item among $N$ objects after $n$ random draws is given by the formula $$\left(1-\frac{1}{N}\right)^n$$

The probability of having picked at least once a given item among $N$ objects after $n$ random draws is given by the formula $$1-\left(1-\frac{1}{N}\right)^n$$

The probability of having picked all $N$ objects (discernible or indistinguishable) after $n$ random draws is given by the formula $$\sum_{i=0}^N (-1)^{N-i}{\binom{N}{i}}\left(\frac{i}{N}\right)^n$$

## Source code

dCode retains ownership of the online 'Picking Probabilities' tool source code. Except explicit open source licence (indicated CC / Creative Commons / free), any algorithm, applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any function (convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (PHP, Java, C#, Python, Javascript, Matlab, etc.) no data, script or API access will be for free, same for Picking Probabilities download for offline use on PC, tablet, iPhone or Android !

## Need Help ?

Please, check our community Discord for help requests!