UNPKG

@stdlib/stats

Version:

Standard library statistical functions.

45 lines (33 loc) 876 B
{{alias}}( α, s, m ) Returns the expected value of a Fréchet distribution with shape parameter `α`, scale parameter `s`, and location `m`. If provided `0 < α <= 1` and `s > 0`, the function returns positive infinity. If provided `NaN` as any argument, the function returns `NaN`. If provided `α <= 0` or `s <= 0`, the function returns `NaN`. Parameters ---------- α: number Shape parameter. s: number Scale parameter. m: number Location parameter. Returns ------- out: number Mean. Examples -------- > var y = {{alias}}( 4.0, 2.0, 1.0 ) ~3.451 > y = {{alias}}( 0.5, 2.0, 1.0 ) Infinity > y = {{alias}}( NaN, 1.0, 0.0 ) NaN > y = {{alias}}( 1.0, NaN, 0.0 ) NaN > y = {{alias}}( 1.0, 1.0, NaN ) NaN See Also --------