Other Distribution Parameters#
statista.parameters.other
#
L-moments parameter estimation for other distributions.
Distributions: Exponential, Gamma, Generalized Logistic, Wakeby.
exponential(lmoments)
#
Estimate parameters for the Exponential distribution.
The Exponential distribution is used to model the time between events in a Poisson process. It is characterized by two parameters: location and scale.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lmoments
|
list[float | int]
|
A list of L-moments [l1, l2, ...] where: - l1 is the mean (first L-moment) - l2 is the L-scale (second L-moment) At least 2 L-moments must be provided. |
required |
Returns:
| Type | Description |
|---|---|
list[float | int] | None
|
A list of distribution parameters [location, scale] where: - location: Shifts the distribution along the x-axis (minimum value) - scale: Controls the spread of the distribution (rate parameter) |
list[float | int] | None
|
Returns None if the L-moments are invalid. |
Examples:
- Estimate Exponential parameters from L-moments:
- Calculate L-moments from data
-
Estimate Exponential parameters
-
Using predefined L-moments:
- Predefined L-moments # Estimate Exponential parameters
Note
The Exponential distribution has the probability density function: f(x) = (1/beta) * exp(-(x-mu)/beta) for x >= mu
Where mu is the location parameter and beta is the scale parameter.
The method returns None if the second L-moment (l2) is less than or equal to zero, as this indicates invalid L-moments for the Exponential distribution.
Source code in src\statista\parameters\other.py
gamma(lmoments)
#
Estimate parameters for the Gamma distribution.
The Gamma distribution is a two-parameter family of continuous probability distributions used to model positive-valued random variables. It is characterized by a shape parameter and a scale parameter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lmoments
|
list[float | int]
|
A list of L-moments [l1, l2, ...] where: - l1 is the mean (first L-moment) - l2 is the L-scale (second L-moment) At least 2 L-moments must be provided. |
required |
Returns:
| Type | Description |
|---|---|
list[float | int] | None
|
A list of distribution parameters [shape, scale] where: - shape (alpha): Controls the shape of the distribution - scale (beta): Controls the spread of the distribution |
list[float | int] | None
|
Returns None if the L-moments are invalid. |
Examples:
-
Estimate Gamma parameters from L-moments:
-
Calculate L-moments from data
-
Estimate Gamma parameters
-
Using predefined L-moments:
- Predefined L-moments
- Estimate Gamma parameters
Note
The Gamma distribution has the probability density function: f(x) = (x^(alpha-1) * e^(-x/beta)) / (beta^alpha * Gamma(alpha)) for x > 0
Where alpha is the shape parameter, beta is the scale parameter, and Gamma is the gamma function.
The method returns None if: - The second L-moment (l2) is less than or equal to zero - The first L-moment (l1) is less than or equal to the second L-moment (l2)
These conditions indicate invalid L-moments for the Gamma distribution.
Source code in src\statista\parameters\other.py
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
generalized_logistic(lmoments)
#
Estimate parameters for the Generalized Logistic distribution.
The Generalized Logistic distribution is a flexible three-parameter distribution that can model a variety of shapes. It is characterized by location, scale, and shape parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lmoments
|
list[float | int]
|
A list of L-moments [l1, l2, l3, ...] where: - l1 is the mean (first L-moment) - l2 is the L-scale (second L-moment) - l3 is the L-skewness (third L-moment) At least 3 L-moments must be provided. |
required |
Returns:
| Type | Description |
|---|---|
list[float | int] | None
|
A list of distribution parameters [location, scale, shape] where: - location: Shifts the distribution along the x-axis - scale: Controls the spread of the distribution - shape: Controls the shape of the distribution |
list[float | int] | None
|
Returns None if the L-moments are invalid. |
Examples:
- Estimate Generalized Logistic parameters from L-moments:
- Calculate L-moments from data
-
Estimate Generalized Logistic parameters
-
Using predefined L-moments:
-
Predefined L-moments
-
Estimate Generalized Logistic parameters
Note
The Generalized Logistic distribution has the cumulative distribution function: F(x) = 1 / (1 + exp(-((x-mu)/alpha))^(1/k)) for k != 0 F(x) = 1 / (1 + exp(-(x-mu)/alpha)) for k = 0
Where mu is the location parameter, alpha is the scale parameter, and k is the shape parameter.
The method returns None if: - The second L-moment (l2) is less than or equal to zero - The absolute value of the negative third L-moment (g = -l3) is greater than or equal to 1
These conditions indicate invalid L-moments for the Generalized Logistic distribution.
When the absolute value of g is very small (<= 1e-6), the shape parameter is set to 0, resulting in the standard Logistic distribution.
Source code in src\statista\parameters\other.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 | |
wakeby(lmoments)
#
Estimate parameters for the Wakeby distribution.
The Wakeby distribution is a flexible five-parameter distribution that can model a wide variety of shapes. It is particularly useful for modeling extreme events in hydrology and other fields.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lmoments
|
list[float | int]
|
A list of L-moments [l1, l2, l3, l4, l5] where: - l1 is the mean (first L-moment) - l2 is the L-scale (second L-moment) - l3 is the L-skewness (third L-moment) - l4 is the L-kurtosis (fourth L-moment) - l5 is the fifth L-moment All 5 L-moments must be provided. |
required |
Returns:
| Type | Description |
|---|---|
list[float | int] | None
|
A list of distribution parameters [xi, a, b, c, d] where: - xi: Location parameter - a, b: Scale and shape parameters for the first component - c, d: Scale and shape parameters for the second component |
list[float | int] | None
|
Returns None if the L-moments are invalid. |
Examples:
- Estimate Wakeby parameters from L-moments:
- Calculate L-moments from data
-
Estimate Wakeby parameters
-
Using predefined L-moments:
- Predefined L-moments
- Estimate Wakeby parameters
Note
The Wakeby distribution has the quantile function: x(F) = xi + (a/(1-b)) * (1-(1-F)^b) - (c/(1+d)) * (1-(1-F)^(-d))
Where xi, a, b, c, and d are the distribution parameters, and F is the cumulative probability.
The method returns None if: - The second L-moment (l2) is less than or equal to zero - The absolute value of any of the L-moments l3, l4, or l5 is greater than or equal to 1
These conditions indicate invalid L-moments for the Wakeby distribution.
The Wakeby distribution is very flexible and can approximate many other distributions. Special cases include: - When c = d = 0, it reduces to the Generalized Pareto distribution - When b = d = 0, it reduces to a shifted exponential distribution
Source code in src\statista\parameters\other.py
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 | |