Normal Family Parameters#
statista.parameters.normal_family
#
L-moments parameter estimation for normal-family distributions.
Distributions: Normal, Generalized Normal, Pearson Type III.
normal(lmoments)
#
Estimate parameters for the Normal (Gaussian) distribution.
The Normal distribution is a symmetric, bell-shaped distribution that is completely characterized by its mean and standard deviation. It is one of the most widely used probability distributions in statistics.
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: The mean of the distribution - scale: The standard deviation of the distribution |
list[float | int] | None
|
Returns None if the L-moments are invalid. |
Examples:
- Estimate Normal parameters from L-moments:
- Calculate L-moments from data
-
Estimate Normal parameters
-
Using predefined L-moments:
- Predefined L-moments
- Estimate Normal parameters
Note
The Normal distribution has the probability density function: f(x) = (1/(sigmasqrt(2pi))) * exp(-((x-mu)^2/(2*sigma^2)))
Where mu is the location parameter (mean) and sigma is the scale parameter (standard deviation).
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 Normal distribution.
The relationship between the second L-moment (l2) and the standard deviation (sigma) is: sigma = l2 * sqrt(pi)
Source code in src\statista\parameters\normal_family.py
generalized_normal(lmoments)
#
Estimate parameters for the Generalized Normal distribution.
The Generalized Normal distribution (also known as the Generalized Error Distribution) is a three-parameter family of symmetric distributions that includes the normal distribution as a special case. It is characterized by location, scale, and shape parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lmoments
|
list[float | int] | None
|
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 (kurtosis) |
list[float | int] | None
|
Returns None if the L-moments are invalid. |
list[float | int] | None
|
Returns [0, -1, 0] if the absolute value of the third L-moment is very large (>= 0.95). |
Examples:
- Estimate Generalized Normal parameters from L-moments:
- Calculate L-moments from data
-
Estimate Generalized Normal parameters
-
Using predefined L-moments:
-
Predefined L-moments
- Estimate Generalized Normal parameters
Note
The Generalized Normal distribution has the probability density function: f(x) = (beta/(2alphaGamma(1/beta))) * exp(-(|x-mu|/alpha)^beta)
Where mu is the location parameter, alpha is the scale parameter, beta is the shape 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 absolute value of the third L-moment (l3) is greater than or equal to 1
These conditions indicate invalid L-moments for the Generalized Normal distribution.
When the absolute value of the third L-moment is very large (>= 0.95), the method returns [0, -1, 0] as a special case.
Source code in src\statista\parameters\normal_family.py
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 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
pearson_3(lmoments)
#
Estimate parameters for the Pearson Type III (PE3) distribution.
The Pearson Type III distribution, also known as the three-parameter Gamma distribution, is a continuous probability distribution used in hydrology and other fields. It extends the Gamma distribution by adding a location parameter, allowing for greater flexibility.
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]
|
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 skewness of the distribution |
list[float | int]
|
Returns [0, 0, 0] if the L-moments are invalid. |
Examples:
- Estimate Pearson Type III parameters from L-moments:
- Calculate L-moments from data
-
Estimate Pearson Type III parameters
-
Using predefined L-moments:
- Predefined L-moments
- Estimate Pearson Type III parameters
Note
The Pearson Type III distribution has the probability density function: f(x) = ((x-mu)/beta)^(alpha-1) * exp(-(x-mu)/beta) / (beta * Gamma(alpha))
Where mu is the location parameter, beta is the scale parameter, alpha is the shape parameter, and Gamma is the gamma function.
The method returns [0, 0, 0] if: - The second L-moment (l2) is less than or equal to zero - The absolute value of the third L-moment (l3) is greater than or equal to 1
These conditions indicate invalid L-moments for the Pearson Type III distribution.
When the absolute value of the third L-moment is very small (<= 1e-6), the shape parameter is set to 0, resulting in a normal distribution.
The sign of the shape parameter is determined by the sign of the third L-moment (l3), with negative l3 resulting in negative shape (left-skewed) and positive l3 resulting in positive shape (right-skewed).
Source code in src\statista\parameters\normal_family.py
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 284 285 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 | |