Difference between revisions of "CumGeometricInv"
(Said incorrectly "computes the largest k... such that prob is <= u." It is actually smallest k st prob >= u.) |
|||
Line 5: | Line 5: | ||
The inverse of the cumulative probability function for the <code>[[Geometric]](p)</code> distribution. | The inverse of the cumulative probability function for the <code>[[Geometric]](p)</code> distribution. | ||
− | Computes the | + | Computes the smallest number of independent [[Bernoulli]] trials, ''k'', such that the probability of seeing at most ''k'' of failures before the first success is greater than or equal to «u», where the probability of success of each trial is «p». |
= Library = | = Library = |
Revision as of 22:32, 4 January 2016
CumGeometricInv(u,p)
The inverse of the cumulative probability function for the Geometric(p)
distribution.
Computes the smallest number of independent Bernoulli trials, k, such that the probability of seeing at most k of failures before the first success is greater than or equal to «u», where the probability of success of each trial is «p».
Library
- Distribution Densities Library (
"Distribution Densities.ana"
)
This function was included in this library for the first time in the Analytica 4.4.3 patch release. But the function will work in earlier releases, so if you need it you can grab the most recent version of the Distribution Densities Library.
Example
An aspiring gymnast catches her jaeger (a release move on uneven bars) at practice 40% of the time. Her coach wants her to successfully catch at least one during practice 95% of the time (i.e., in 95% of her practices, she should catch at least one). How many repetitions should the coach insist on during each practice?
CumGeometricInv( 95%, 40% )
→ 6
The actual success rate if she makes 6 attempts every practice should be
CumGeometric( 6, 40% )
→ 95.33%
Enable comment auto-refresher