-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repl.txt
70 lines (54 loc) · 1.42 KB
/
repl.txt
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
{{alias}}( x, k )
Evaluates the natural logarithm of the probability density function (PDF)
for a chi-squared distribution with degrees of freedom `k` at a value `x`.
If provided `NaN` as any argument, the function returns `NaN`.
If provided `k < 0`, the function returns `NaN`.
Parameters
----------
x: number
Input value.
k: number
Degrees of freedom.
Returns
-------
out: number
Evaluated logPDF.
Examples
--------
> var y = {{alias}}( 0.3, 4.0 )
~-2.74
> y = {{alias}}( 0.7, 0.7 )
~-1.295
> y = {{alias}}( -1.0, 0.5 )
-Infinity
> y = {{alias}}( 0.0, NaN )
NaN
> y = {{alias}}( NaN, 2.0 )
NaN
// Negative degrees of freedom:
> y = {{alias}}( 2.0, -1.0 )
NaN
// Degenerate distribution when `k = 0`:
> y = {{alias}}( 2.0, 0.0, 2.0 )
-Infinity
> y = {{alias}}( 0.0, 0.0, 2.0 )
Infinity
{{alias}}.factory( k )
Returns a function for evaluating the natural logarithm of the probability
density function (PDF) of a chi-squared distribution with degrees of freedom
`k`.
Parameters
----------
k: number
Degrees of freedom.
Returns
-------
logpdf: Function
Logarithm of probability density function (PDF).
Examples
--------
> var myLogPDF = {{alias}}.factory( 6.0 );
> var y = myLogPDF( 3.0 )
~-2.075
See Also
--------