paretoCdf¶
Evaluates the Pareto cumulative probability distribution function.
Synopsis¶
paretoCdf (x, xm, k)
Required Arguments¶
- float
x
(Input) - Argument for which the Pareto distribution function is to be evaluated.
- float
xm
(Input) - The scale parameter.
- float
k
(Input) - The shape parameter.
Return Value¶
The probability that a Pareto random variable takes a value less than or
equal to x
. NaN is returned on error.
Description¶
The paretoCdf
function evaluates the distribution function, F, of a
Pareto random variable with scale parameter \(x_m\) and shape parameter
k. It is given by:
\[F(x|x_m,k) = 1 - \left(\frac{x_m}{x}\right)^k\]
where \(x_m>0\) and \(k>0\). The function is only defined for \(x\geq x_m\).
Example¶
Suppose X is a Pareto random variable with \(x_m=0.4\) and \(k=0.7\). The function finds the probability that X is less than or equal to 0.5.
from __future__ import print_function
from numpy import *
from pyimsl.stat.paretoCdf import paretoCdf
x = 0.5
xm = 0.4
k = 0.7
pr = paretoCdf(x, xm, k)
print("Pr(x <= %3.1f) = %6.4f" % (x, pr))
Output¶
Pr(x <= 0.5) = 0.1446