WOLFRAM NOTEBOOK

WOLFRAM|DEMONSTRATIONS PROJECT

Probability of a Union by the Principle of Inclusion-Exclusion

number of elements
class 1
5
class 4
5
class 2
5
class 5
5
class 3
5
class 6
5
sample size
10
P(there is at least one element from each nonempty class) = 0.437469
exact probability =
876250
2003001
This Demonstration calculates the probability that there is at least one element from each of at most six classes when a given number of elements is sampled without replacement from among all the elements. This probability can be expressed in terms of the probability of a union of events and is calculated using the principle of inclusion-exclusion.
Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.