Pareto Distribution¤
stamox.distribution.ppareto(q: Union[Float, ArrayLike], scale: Union[Float, ArrayLike], alpha: Union[Float, ArrayLike], lower_tail: bool = True, log_prob: bool = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Computes the cumulative distribution function of the Pareto distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
q |
Union[Float, ArrayLike] |
The value at which to evaluate the CDF. |
required |
scale |
Union[Float, ArrayLike] |
The scale parameter of the Pareto distribution. |
required |
alpha |
Union[Float, ArrayLike] |
The shape parameter of the Pareto distribution. |
required |
lower_tail |
bool |
Whether to compute the lower tail of the CDF. Defaults to True. |
True |
log_prob |
bool |
Whether to return the log probability. Defaults to False. |
False |
dtype |
jnp.dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
The cumulative distribution function of the Pareto distribution evaluated at |
Examples:
>>> ppareto(0.2, 0.1, 2.0)
Array(0.75, dtype=float32, weak_type=True)
stamox.distribution.qpareto(p: Union[Float, ArrayLike], scale: Union[Float, ArrayLike], alpha: Union[Float, ArrayLike], lower_tail: Bool = True, log_prob: Bool = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Computes the quantile function of the Pareto distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
p |
Union[Float, ArrayLike] |
Quantiles to compute. |
required |
scale |
Union[Float, ArrayLike] |
Scale parameter of the Pareto distribution. |
required |
alpha |
Union[Float, ArrayLike] |
Shape parameter of the Pareto distribution. |
required |
lower_tail |
Bool |
Whether to compute the lower tail probability. Defaults to True. |
True |
log_prob |
Bool |
Whether to compute the log probability. Defaults to False. |
False |
dtype |
jnp.dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
The quantiles of the Pareto distribution. |
Examples:
>>> qpareto(0.2, 0.1, 2.0)
Array([0.1118034], dtype=float32, weak_type=True)
stamox.distribution.dpareto(x: Union[Float, ArrayLike], scale: Union[Float, ArrayLike], alpha: Union[Float, ArrayLike], lower_tail = True, log_prob = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Computes the density of the Pareto distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Union[Float, ArrayLike] |
The value at which to evaluate the density. |
required |
scale |
Union[Float, ArrayLike] |
The scale parameter of the Pareto distribution. |
required |
alpha |
Union[Float, ArrayLike] |
The shape parameter of the Pareto distribution. |
required |
lower_tail |
bool |
Whether to compute the lower tail probability. Defaults to True. |
True |
log_prob |
bool |
Whether to return the log probability. Defaults to False. |
False |
dtype |
jnp.dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
The density of the Pareto distribution evaluated at |
Examples:
>>> dpareto(0.2, 0.1, 2.0)
Array([2.4999998], dtype=float32, weak_type=True)
stamox.distribution.rpareto(key: PRNGKeyArray, sample_shape: Optional[Sequence[int]] = None, scale: Union[Float, ArrayLike] = None, alpha: Union[Float, ArrayLike] = None, lower_tail: Bool = True, log_prob: Bool = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Generate random variable following a Pareto distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
KeyArray |
A random number generator key. |
required |
sample_shape |
Optional[Shape] |
The shape of the samples to be drawn. Defaults to None. |
None |
scale |
Union[Float, ArrayLike] |
The scale parameter of the Pareto distribution. |
None |
alpha |
Union[Float, ArrayLike] |
The shape parameter of the Pareto distribution. |
None |
lower_tail |
Bool |
Whether to calculate the lower tail probability. Defaults to True. |
True |
log_prob |
Bool |
Whether to return the log probability. Defaults to False. |
False |
dtype |
jnp.dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
random variable following a Pareto distribution. |
Examples:
>>> rpareto(jax.random.PRNGKey(0), sample_shape=(2, 3), scale=0.1, alpha=2.0)
Array([[0.15330292, 0.10539087, 0.19686179],
[0.30740616, 0.15743963, 0.13524036]], dtype=float32)