You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,6 @@
2
2
3
3
We are excited about your pull request, but unfortunately we are not accepting pull requests against this repository, as all development happens on the [main project repository](https://github.com/stdlib-js/stdlib). We kindly request that you submit this pull request against the [respective directory](https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/stats) of the main repository where we’ll review and provide feedback.
4
4
5
-
If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/development.md) for help on developing stdlib.
5
+
If this is your first stdlib contribution, be sure to read the [contributing guide](https://github.com/stdlib-js/stdlib/blob/develop/CONTRIBUTING.md) which provides guidelines and instructions for submitting contributions. You may also consult the [development guide](https://github.com/stdlib-js/stdlib/blob/develop/docs/contributing/development.md) for help on developing stdlib.
6
6
7
7
We look forward to receiving your contribution! :smiley:
Copy file name to clipboardExpand all lines: base/README.md
+3-9
Original file line number
Diff line number
Diff line change
@@ -71,8 +71,6 @@ The namespace contains the following statistical functions:
71
71
- <spanclass="signature">[`dmskmax( N, x, strideX, mask, strideMask )`][@stdlib/stats/base/dmskmax]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a double-precision floating-point strided array according to a mask.</span>
72
72
- <spanclass="signature">[`dmskmin( N, x, strideX, mask, strideMask )`][@stdlib/stats/base/dmskmin]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum value of a double-precision floating-point strided array according to a mask.</span>
73
73
- <spanclass="signature">[`dmskrange( N, x, strideX, mask, strideMask )`][@stdlib/stats/base/dmskrange]</span><spanclass="delimiter">: </span><spanclass="description">calculate the range of a double-precision floating-point strided array according to a mask.</span>
74
-
- <spanclass="signature">[`dnanmax( N, x, strideX )`][@stdlib/stats/strided/dnanmax]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a double-precision floating-point strided array, ignoring `NaN` values.</span>
75
-
- <spanclass="signature">[`dnanmaxabs( N, x, strideX )`][@stdlib/stats/strided/dnanmaxabs]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum absolute value of a double-precision floating-point strided array, ignoring `NaN` values.</span>
76
74
- <spanclass="signature">[`dnanmean( N, x, strideX )`][@stdlib/stats/base/dnanmean]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a double-precision floating-point strided array, ignoring `NaN` values.</span>
77
75
- <spanclass="signature">[`dnanmeanors( N, x, strideX )`][@stdlib/stats/base/dnanmeanors]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a double-precision floating-point strided array, ignoring `NaN` values and using ordinary recursive summation.</span>
78
76
- <spanclass="signature">[`dnanmeanpn( N, x, strideX )`][@stdlib/stats/base/dnanmeanpn]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a double-precision floating-point strided array, ignoring `NaN` values and using a two-pass error correction algorithm.</span>
@@ -132,19 +130,19 @@ The namespace contains the following statistical functions:
132
130
- <spanclass="signature">[`maxBy( N, x, stride, clbk[, thisArg] )`][@stdlib/stats/base/max-by]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a strided array via a callback function.</span>
133
131
- <spanclass="signature">[`max( N, x, strideX )`][@stdlib/stats/base/max]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a strided array.</span>
134
132
- <spanclass="signature">[`maxabs( N, x, strideX )`][@stdlib/stats/base/maxabs]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum absolute value of a strided array.</span>
135
-
- <spanclass="signature">[`maxsorted( N, x, stride )`][@stdlib/stats/base/maxsorted]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a sorted strided array.</span>
133
+
- <spanclass="signature">[`maxsorted( N, x, strideX )`][@stdlib/stats/base/maxsorted]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a sorted strided array.</span>
136
134
- <spanclass="signature">[`mean( N, x, stride )`][@stdlib/stats/base/mean]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array.</span>
137
135
- <spanclass="signature">[`meankbn( N, x, stride )`][@stdlib/stats/base/meankbn]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array using an improved Kahan–Babuška algorithm.</span>
138
136
- <spanclass="signature">[`meankbn2( N, x, stride )`][@stdlib/stats/base/meankbn2]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array using a second-order iterative Kahan–Babuška algorithm.</span>
139
137
- <spanclass="signature">[`meanors( N, x, stride )`][@stdlib/stats/base/meanors]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array using ordinary recursive summation.</span>
140
138
- <spanclass="signature">[`meanpn( N, x, stride )`][@stdlib/stats/base/meanpn]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array using a two-pass error correction algorithm.</span>
141
139
- <spanclass="signature">[`meanpw( N, x, stride )`][@stdlib/stats/base/meanpw]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array using pairwise summation.</span>
142
140
- <spanclass="signature">[`meanwd( N, x, stride )`][@stdlib/stats/base/meanwd]</span><spanclass="delimiter">: </span><spanclass="description">calculate the arithmetic mean of a strided array using Welford's algorithm.</span>
143
-
- <spanclass="signature">[`mediansorted( N, x, stride )`][@stdlib/stats/base/mediansorted]</span><spanclass="delimiter">: </span><spanclass="description">calculate the median value of a sorted strided array.</span>
141
+
- <spanclass="signature">[`mediansorted( N, x, strideX )`][@stdlib/stats/base/mediansorted]</span><spanclass="delimiter">: </span><spanclass="description">calculate the median value of a sorted strided array.</span>
144
142
- <spanclass="signature">[`minBy( N, x, stride, clbk[, thisArg] )`][@stdlib/stats/base/min-by]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum value of a strided array via a callback function.</span>
145
143
- <spanclass="signature">[`min( N, x, strideX )`][@stdlib/stats/base/min]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum value of a strided array.</span>
146
144
- <spanclass="signature">[`minabs( N, x, strideX )`][@stdlib/stats/base/minabs]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum absolute value of a strided array.</span>
147
-
- <spanclass="signature">[`minsorted( N, x, stride )`][@stdlib/stats/base/minsorted]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum value of a sorted strided array.</span>
145
+
- <spanclass="signature">[`minsorted( N, x, strideX )`][@stdlib/stats/base/minsorted]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum value of a sorted strided array.</span>
148
146
- <spanclass="signature">[`mskmax( N, x, strideX, mask, strideMask )`][@stdlib/stats/base/mskmax]</span><spanclass="delimiter">: </span><spanclass="description">calculate the maximum value of a strided array according to a mask.</span>
149
147
- <spanclass="signature">[`mskmin( N, x, strideX, mask, strideMask )`][@stdlib/stats/base/mskmin]</span><spanclass="delimiter">: </span><spanclass="description">calculate the minimum value of a strided array according to a mask.</span>
150
148
- <spanclass="signature">[`mskrange( N, x, strideX, mask, strideMask )`][@stdlib/stats/base/mskrange]</span><spanclass="delimiter">: </span><spanclass="description">calculate the range of a strided array according to a mask.</span>
Licensed under the Apache License, Version 2.0 (the "License");
8
+
you may not use this file except in compliance with the License.
9
+
You may obtain a copy of the License at
10
+
11
+
http://www.apache.org/licenses/LICENSE-2.0
12
+
13
+
Unless required by applicable law or agreed to in writing, software
14
+
distributed under the License is distributed on an "AS IS" BASIS,
15
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+
See the License for the specific language governing permissions and
17
+
limitations under the License.
18
+
19
+
-->
20
+
21
+
# Cumulative Distribution Function
22
+
23
+
> [Bradford][bradford-distribution] distribution [cumulative distribution function][cdf] (CDF).
24
+
25
+
<sectionclass="intro">
26
+
27
+
The [cumulative distribution function][cdf] (CDF) for a [Bradford][bradford-distribution] random variable is
28
+
29
+
<!-- <equation class="equation" label="eq:bradford_cdf" align="center" raw="F(x;c)=\frac{\ln(1+cx)}{\ln(1+c)}" alt="Cumulative distribution function (CDF) for a Bradford distribution."> -->
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@51534079fef45e990850102147e8945fb023d1d0/lib/node_modules/@stdlib/stats/base/dists/bradford/cdf/docs/img/equation_bradford_cdf.svg" alt="Cumulative distribution function (CDF) for a Bradford distribution.">
37
+
<br>
38
+
</div> -->
39
+
40
+
<!-- </equation> -->
41
+
42
+
where `c > 0` is the shape parameter of the distribution.
43
+
44
+
</section>
45
+
46
+
<!-- /.intro -->
47
+
48
+
<sectionclass="usage">
49
+
50
+
## Usage
51
+
52
+
```javascript
53
+
var cdf =require( '@stdlib/stats/base/dists/bradford/cdf' );
54
+
```
55
+
56
+
#### cdf( x, c )
57
+
58
+
Evaluates the [cumulative distribution function][cdf] (CDF) for a [Bradford][bradford-distribution] distribution with shape parameter `c` at a value `x`.
59
+
60
+
```javascript
61
+
var y =cdf( 0.1, 0.1 );
62
+
// returns ~0.104
63
+
64
+
y =cdf( 0.5, 5.0 );
65
+
// returns ~0.699
66
+
67
+
y =cdf( 1.0, 10.0 );
68
+
// returns 1.0
69
+
70
+
y =cdf( -0.5, 1.0 );
71
+
// returns 0.0
72
+
73
+
y =cdf( 2.0, 1.0 );
74
+
// returns 1.0
75
+
```
76
+
77
+
If provided `NaN` as any argument, the function returns `NaN`.
78
+
79
+
```javascript
80
+
var y =cdf( NaN, 1.0 );
81
+
// returns NaN
82
+
83
+
y =cdf( 0.0, NaN );
84
+
// returns NaN
85
+
```
86
+
87
+
If provided a shape parameter `c <= 0`, the function returns `NaN`.
88
+
89
+
```javascript
90
+
var y =cdf( 0.0, 0.0 );
91
+
// returns NaN
92
+
93
+
y =cdf( 0.5, -5.0 );
94
+
// returns NaN
95
+
```
96
+
97
+
#### cdf.factory( c )
98
+
99
+
Returns a function for evaluating the [CDF][cdf] of a [Bradford][bradford-distribution] distribution with shape parameter `c`.
100
+
101
+
```javascript
102
+
var myPDF =cdf.factory( 5.0 );
103
+
var y =myPDF( 0.5 );
104
+
// returns ~0.699
105
+
106
+
y =myPDF( 1.0 );
107
+
// returns 1.0
108
+
```
109
+
110
+
</section>
111
+
112
+
<!-- /.usage -->
113
+
114
+
<sectionclass="examples">
115
+
116
+
## Examples
117
+
118
+
<!-- eslint no-undef: "error" -->
119
+
120
+
```javascript
121
+
var uniform =require( '@stdlib/random/array/uniform' );
122
+
var cdf =require( '@stdlib/stats/base/dists/bradford/cdf' );
0 commit comments