pareto_pdf
Evaluates the Pareto probability density function.
Synopsis
#include <imsls.h>
float imsls_f_pareto_pdf (float x, float xm, float k)
The type double function is imsls_d_pareto_pdf.
Required Arguments
float x (Input)
Argument for which the function is to be evaluated.
float xm (Input)
The scale parameter.
float k (Input)
The shape parameter.
Return Value
The probability density at x. NaN is returned on error.
Description
The probability density function of the Pareto distribution is:
where the scale parameter xm > 0 and the shape parameter k > 0. The function is only defined for x ≥ xm.
Example
In this example, we evaluate the Pareto PDF at x = 0.5, xm = 0.4 and k = 0.7.
#include <imsls.h>
#include <stdio.h>
int main(){
float x = 0.5;
float xm = 0.4;
float k = 0.7;
float pr = 0.0;
pr = imsls_f_pareto_pdf(x, xm, k);
printf("The probability density of a Pareto random");
printf("variable X with\na scale parameter xm = ");
printf("%3.1f and a shape parameter ", xm);
printf("k = %3.1f\nand value x = %3.1f is %6.4f.\n",
k, x, pr);
}
Output
The probability density of a Pareto random variable X with
a scale parameter xm = 0.4 and a shape parameter k = 0.7
and value x = 0.5 is 1.1975.