Sample Probability Calculations

We can calculate probabilities for the Hypergeometric( G, B, n ) distribution using either the probability

distribution function (PDF) or the cumulative distribution function (CDF). We will denote

the PDF by f and the CDF by F . We will consider these functions for a variable X having

the Geometric(30, 10, 10) distribution.

> G:=30; B:=10; n:=10;

[Maple Math]

[Maple Math]

[Maple Math]

> f:=t->HypergeometricPDF(G,B,n,t);

[Maple Math]

At the present time, there is no HypergeometricCDF command. We can create our own by summing the HypergeometricPDF.

F:=x->sum(f(t),t=0..x);

[Maple Math]

Below you will find three different ways to calculate P( [Maple Math] ) .

> evalf(f(1)+f(2)+f(3));

[Maple Math]

> evalf(sum(f(x),x=1..3));

[Maple Math]

> evalf(F(3)-F(0));

[Maple Math]