repl.txt (2893B)
1 2 {{alias}}( [a, b, c] ) 3 Returns a triangular distribution object. 4 5 Parameters 6 ---------- 7 a: number (optional) 8 Minimum support. Must be smaller than `b` and `c`. Default: `0.0`. 9 10 b: number (optional) 11 Maximum support. Must be greater than `a` and `c`. Default: `1.0`. 12 13 c: number (optional) 14 Mode. Must be greater than `a` and smaller than `b`. Default: `0.5`. 15 16 Returns 17 ------- 18 triangular: Object 19 Distribution instance. 20 21 triangular.a: number 22 Minimum support. If set, the value must be smaller or equal to `b` and 23 `c`. 24 25 triangular.b: number 26 Maximum support. If set, the value must be greater than or equal to `a` 27 and `c`. 28 29 triangular.c: number 30 Mode. If set, the value must be greater than or equal to `a` and smaller 31 than or equal to `b`. 32 33 triangular.entropy: number 34 Read-only property which returns the differential entropy. 35 36 triangular.kurtosis: number 37 Read-only property which returns the excess kurtosis. 38 39 triangular.mean: number 40 Read-only property which returns the expected value. 41 42 triangular.median: number 43 Read-only property which returns the median. 44 45 triangular.mode: number 46 Read-only property which returns the mode. 47 48 triangular.skewness: number 49 Read-only property which returns the skewness. 50 51 triangular.stdev: number 52 Read-only property which returns the standard deviation. 53 54 triangular.variance: number 55 Read-only property which returns the variance. 56 57 triangular.cdf: Function 58 Evaluates the cumulative distribution function (CDF). 59 60 triangular.logcdf: Function 61 Evaluates the natural logarithm of the cumulative distribution function 62 (CDF). 63 64 triangular.logpdf: Function 65 Evaluates the natural logarithm of the probability density function 66 (PDF). 67 68 triangular.mgf: Function 69 Evaluates the moment-generating function (MGF). 70 71 triangular.pdf: Function 72 Evaluates the probability density function (PDF). 73 74 triangular.quantile: Function 75 Evaluates the quantile function at probability `p`. 76 77 Examples 78 -------- 79 > var triangular = {{alias}}( 0.0, 1.0, 0.5 ); 80 > triangular.a 81 0.0 82 > triangular.b 83 1.0 84 > triangular.c 85 0.5 86 > triangular.entropy 87 ~-0.193 88 > triangular.kurtosis 89 -0.6 90 > triangular.mean 91 0.5 92 > triangular.median 93 0.5 94 > triangular.mode 95 0.5 96 > triangular.skewness 97 0.0 98 > triangular.stdev 99 ~0.204 100 > triangular.variance 101 ~0.042 102 > triangular.cdf( 0.8 ) 103 0.92 104 > triangular.logcdf( 0.8 ) 105 ~-0.083 106 > triangular.logpdf( 0.8 ) 107 ~-0.223 108 > triangular.mgf( 0.8 ) 109 ~1.512 110 > triangular.pdf( 0.8 ) 111 ~0.8 112 > triangular.quantile( 0.8 ) 113 ~0.684 114 115 See Also 116 -------- 117