geometric_cdf
Evaluates the discrete geometric cumulative distribution function (CDF).
Synopsis
#include<imsls.h>
floatimsls_f_geometric_cdf(intix, floatpin)
The type double function is imsls_d_geometric_cdf.
Required Arguments
intix (Input)
Argument for which the discrete geometric CDF is to be evaluated. ix must be non-negative.
floatpin (Input)
Probability parameter of the discrete geometric CDF (the probability of success for each independent trial).   pin must be in the open interval (0, 1).
Return Value
The probability that a discrete geometric random variable takes a value less than or equal to ix. A value of NaN is returned if an input value is in error.
Description
The function geometric_cdf evaluates the discrete geometric cumulative distribution function (CDF), defined
where the return value F(Ip) is the probability that up to I = ix trials would be observed before observing a success, and input parameter p = pin is the probability of success for each independent trial.
Example
In this example, we evaluate the discrete geometric CDF at ix = 3, pin = 0.25.
 
#include <imsls.h>
#include <stdio.h>
 
int main()
{
int ix = 3;
float pin = 0.25;
float p;
 
p = imsls_f_geometric_cdf(ix, pin);
printf("The probability that a discrete geometric ");
printf("random variable\nwith probability ");
printf("parameter pin = %4.2f is less than ", pin);
printf("or equal\nto %1i is %8.6f\n\n", ix, p);
}
Output
The probability that a discrete geometric random variable
with probability parameter pin = 0.25 is less than or equal
to 3 is 0.683594