Difference between revisions of "HyperGeometric distribution"

 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:Distribution Functions]]
+
[[Category:Discrete distributions]]
[[Category:Doc Status C]] <!-- For Lumina use, do not change -->
+
[[Category:Bounded distributions]]
 +
[[Category:Unimodal distributions]]
 +
[[Category:Univariate distributions]]
 +
{{ReleaseBar}}
 +
The hypergeometric distribution describes the number of times an event occurs in a fixed number of trials without replacement -- e.g., the number of red balls in a sample of «Trials» balls drawn without replacement from an urn containing «Size» balls of which «PosEvents» are red.
  
== HyperGeometric(Trials, PosEvents, Size) ==
+
<center><code>HyperGeometric( 100, 700, 1000 )</code> &rarr; [[image:hypergeometric_100_700_1000.png]]</center>
  
The hypergeometric distribution describes the number of times an event occurs in a fixed number of trials without replacement -- e.g., the number of red balls in a sample of «Trials» balls drawn without replacement from an urn containing «Size» balls of which «PosEvents» are red.  
+
== Functions ==
 +
=== <div id="HyperGeometric''>HyperGeometric(trials, posEvents, size)</div> ===
 +
Use this to describe a variable whose outcome has a hyperGeometric distribution.
 +
 
 +
=== <div id="ProbHyperGeometric">Prob{{Release||5.1|_}}HyperGeometric(k, trials, posEvents, size)</div> ===
 +
{{Release||5.1|To use, add the [[Distribution Densities Library]] to your model.}}
 +
Returns the probability of outcome «k». It is given by
 +
 
 +
:<math>p(k) = { {\binom{posEvents}{k} \binom{size-posEvents}{trials-k} } \over \binom{size}{trials} }</math>
 +
 
 +
Suppose 20 out of 30 balls in a basket are red, and you draw 10 balls at random without replacement.  Then the probability of drawing exactly 7 red balls is given by:
 +
:<code>ProbHyperGeometric(7, 10, 20, 30) &rarr; 0.3096</code>
 +
 
 +
=== <div id="CumHyperGeometric">CumHyperGeometric(k, trials, posEvents, size)</div> ===
 +
{{Release||5.1|To use, add the [[Distribution Densities Library]] to your model.}}
 +
The cumulative probability function for the hyperGeometric distribution. Its value is equal to
 +
 
 +
:<math>F(k) = \sum_{i=0}^{k} { {\binom{posEvents}{i} \binom{size-posEvents}{trials-i} } \over \binom{size}{trials} }</math>
 +
 
 +
Use this function when computing the p-Value for a hyperGeometric statistical test.
 +
 
 +
=== <div id="CumHyperGeometricInv">CumHyperGeometricInv(p, trials, posEvents, size)</div> ===
 +
{{Release||5.1|To use, add the [[Distribution Densities Library]] to your model.}}
 +
The inverse cumulative probability function for the hyperGeometric distribution
  
Thus, the parameters are:
+
=== Parameters ===
;«Trials»: The sample size -— e.g., the number of balls drawn from an urn without replacement. Cannot be larger than «Size».
+
;«trials»: The sample size -— e.g., the number of balls drawn from an urn without replacement. Cannot be larger than «Size».
;«PosEvents»: The total number of successful events in the population -- e.g, the number of red balls in the urn.
+
;«posEvents»: The total number of successful events in the population -- e.g, the number of red balls in the urn.
;«Size»: The population size -- e.g., the total number of balls in the urn, red and non-red.
+
;«size»: The population size -- e.g., the total number of balls in the urn, red and non-red.
  
== Library ==
+
=== History ===
Distributions
+
* The analytic functions (ProbHyperGeometric, CumHyperGeometric, and CumHyperGeometricInv) were added as built-in functions in [[Analytica 5.2]].
 +
* In [[Analytica 5.1]] or earlier, the analytic functions require you to add the [[Distributions Density Library]] to your model.
  
 
== See Also ==
 
== See Also ==
* [[Geometric]]
+
* [[Geometric distribution]]{{Release||5.1|
 
* [[Prob_HyperGeometric]]
 
* [[Prob_HyperGeometric]]
 
* [[Prob_Geometric]]
 
* [[Prob_Geometric]]
 
* [[CumGeometric]]
 
* [[CumGeometric]]
* [[CumGeometricInv]]
+
* [[CumGeometricInv]]}}
 
* [[Parametric discrete distributions]]
 
* [[Parametric discrete distributions]]
 
* [[Distribution Densities Library]]
 
* [[Distribution Densities Library]]

Latest revision as of 01:09, 8 December 2018



Release:

4.6  •  5.0  •  5.1  •  5.2  •  5.3  •  5.4  •  6.0  •  6.1  •  6.2  •  6.3  •  6.4  •  6.5  •  6.6


The hypergeometric distribution describes the number of times an event occurs in a fixed number of trials without replacement -- e.g., the number of red balls in a sample of «Trials» balls drawn without replacement from an urn containing «Size» balls of which «PosEvents» are red.

HyperGeometric( 100, 700, 1000 )Hypergeometric 100 700 1000.png

Functions

HyperGeometric(trials, posEvents, size)

Use this to describe a variable whose outcome has a hyperGeometric distribution.

ProbHyperGeometric(k, trials, posEvents, size)

Returns the probability of outcome «k». It is given by

[math]\displaystyle{ p(k) = { {\binom{posEvents}{k} \binom{size-posEvents}{trials-k} } \over \binom{size}{trials} } }[/math]

Suppose 20 out of 30 balls in a basket are red, and you draw 10 balls at random without replacement. Then the probability of drawing exactly 7 red balls is given by:

ProbHyperGeometric(7, 10, 20, 30) → 0.3096

CumHyperGeometric(k, trials, posEvents, size)

The cumulative probability function for the hyperGeometric distribution. Its value is equal to

[math]\displaystyle{ F(k) = \sum_{i=0}^{k} { {\binom{posEvents}{i} \binom{size-posEvents}{trials-i} } \over \binom{size}{trials} } }[/math]

Use this function when computing the p-Value for a hyperGeometric statistical test.

CumHyperGeometricInv(p, trials, posEvents, size)

The inverse cumulative probability function for the hyperGeometric distribution

Parameters

«trials»
The sample size -— e.g., the number of balls drawn from an urn without replacement. Cannot be larger than «Size».
«posEvents»
The total number of successful events in the population -- e.g, the number of red balls in the urn.
«size»
The population size -- e.g., the total number of balls in the urn, red and non-red.

History

See Also

Comments


You are not allowed to post comments.