File: repl.txt

package info (click to toggle)
node-stdlib 0.0.96%2Bds1%2B~cs0.0.429-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 421,476 kB
  • sloc: javascript: 1,562,831; ansic: 109,702; lisp: 49,823; cpp: 27,224; python: 7,871; sh: 6,807; makefile: 6,089; fortran: 3,102; awk: 387
file content (92 lines) | stat: -rw-r--r-- 2,183 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

{{alias}}( [r, p] )
    Returns a negative binomial distribution object.

    Parameters
    ----------
    r: number (optional)
        Number of successes until experiment is stopped. Must be a positive
        number. Default: `1`.

    p: number (optional)
        Success probability. Must be a number between `0` and `1`. Default:
        `0.5`.

    Returns
    -------
    nbinomial: Object
        Distribution instance.

    nbinomial.r: number
        Number of trials. If set, the value must be a positive number.

    nbinomial.p: number
        Success probability. If set, the value must be a number between `0` and
        `1`.

    nbinomial.kurtosis: number
        Read-only property which returns the excess kurtosis.

    nbinomial.mean: number
        Read-only property which returns the expected value.

    nbinomial.mode: number
        Read-only property which returns the mode.

    nbinomial.skewness: number
        Read-only property which returns the skewness.

    nbinomial.stdev: number
        Read-only property which returns the standard deviation.

    nbinomial.variance: number
        Read-only property which returns the variance.

    nbinomial.cdf: Function
        Evaluates the cumulative distribution function (CDF).

    nbinomial.logpmf: Function
        Evaluates the natural logarithm of the probability mass function (PMF).

    nbinomial.mgf: Function
        Evaluates the moment-generating function (MGF).

    nbinomial.pmf: Function
        Evaluates the probability mass function (PMF).

    nbinomial.quantile: Function
        Evaluates the quantile function at probability `p`.

    Examples
    --------
    > var nbinomial = {{alias}}( 8.0, 0.5 );
    > nbinomial.r
    8.0
    > nbinomial.p
    0.5
    > nbinomial.kurtosis
    0.8125
    > nbinomial.mean
    8.0
    > nbinomial.mode
    7.0
    > nbinomial.skewness
    0.75
    > nbinomial.stdev
    4.0
    > nbinomial.variance
    16.0
    > nbinomial.cdf( 2.9 )
    ~0.055
    > nbinomial.logpmf( 3.0 )
    ~-2.837
    > nbinomial.mgf( 0.2 )
    ~36.675
    > nbinomial.pmf( 3.0 )
    ~0.059
    > nbinomial.quantile( 0.8 )
    11.0

    See Also
    --------