Plotting Position#
statista.distributions.PlottingPosition
#
PlottingPosition.
Source code in src/statista/distributions/base.py
return_period(prob_non_exceed)
staticmethod
#
Return Period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
prob_non_exceed
|
list | ndarray
|
non-exceedance probability. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
array |
ndarray
|
calculated return period. |
Examples:
- First generate some random numbers between 0 and 1 as a non-exceedance probability. then use this non-exceedance
to calculate the return period.
>>> import numpy as np >>> from statista.distributions import PlottingPosition >>> data = np.random.random(15) >>> rp = PlottingPosition.return_period(data) >>> print(rp) # doctest: +SKIP [ 1.33088992 4.75342173 2.46855419 1.42836548 2.75320582 2.2268505 8.06500888 10.56043917 18.28884687 1.10298241 1.2113997 1.40988022 1.02795867 1.01326322 1.05572108]
Source code in src/statista/distributions/base.py
weibul(data, return_period=False)
staticmethod
#
Weibul.
Weibul method to calculate the cumulative distribution function cdf or return period.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
list | ndarray
|
list/array of the data. |
required |
return_period
|
int
|
False to calculate the cumulative distribution function cdf or True to calculate the return period. Default=False |
False
|
Returns:
| Type | Description |
|---|---|
ndarray
|
cdf/T: cumulative distribution function or return period. |
Examples:
>>> data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>>> cdf = PlottingPosition.weibul(data)
>>> print(cdf)
[0.09090909 0.18181818 0.27272727 0.36363636 0.45454545 0.54545455
0.63636364 0.72727273 0.81818182 0.90909091]