Skip to content

Commit 3be8c29

Browse files
committed
feat: add JSDoc
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: passed - task: lint_package_json status: na - task: lint_repl_help status: passed - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- type: pre_push_report description: Results of running various checks prior to pushing changes. report: - task: run_javascript_examples status: na - task: run_c_examples status: na - task: run_cpp_examples status: na - task: run_javascript_readme_examples status: na - task: run_c_benchmarks status: na - task: run_cpp_benchmarks status: na - task: run_fortran_benchmarks status: na - task: run_javascript_benchmarks status: na - task: run_julia_benchmarks status: na - task: run_python_benchmarks status: na - task: run_r_benchmarks status: na - task: run_javascript_tests status: na ---
1 parent f4f5f1a commit 3be8c29

File tree

4 files changed

+93
-26
lines changed

4 files changed

+93
-26
lines changed

lib/node_modules/@stdlib/stats/base/dists/bradford/stdev/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,24 @@ limitations under the License.
1818
1919
-->
2020

21-
# Mean
21+
# Standard Deviation
2222

23-
> [Bradford][bradford-distribution] distribution [variance][variance].
23+
> [Bradford][bradford-distribution] distribution [standard deviation][standard-deviation].
2424
2525
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
2626

2727
<section class="intro">
2828

29-
The [variance][variance] for a [Bradford][bradford-distribution] random variable is
29+
The [standard deviation][standard-deviation] for a [Bradford][bradford-distribution] random variable is
3030

31-
<!-- <equation class="equation" label="eq:bradford_variance" align="center" raw="\mathop{\mathrm{Var}}\left( X \right) = \frac{(c+2) \ln(1+c) - 2c}{2c (\ln(1+c))^2}" alt="Variance for a Bradford distribution."> -->
31+
<!-- <equation class="equation" label="eq:bradford_stdev" align="center" raw="\sigma = \sqrt{\frac{(c+2) \ln(1+c) - 2c}{2c (\ln(1+c))^2}}" alt="Standard deviation for a Bradford distribution."> -->
3232

3333
```math
34-
\mathop{\mathrm{Var}}\left( X \right) = \frac{(c+2) \ln(1+c) - 2c}{2c (\ln(1+c))^2}
34+
\sigma = \sqrt{\frac{(c+2) \ln(1+c) - 2c}{2c (\ln(1+c))^2}}
3535
```
3636

37-
<!-- <div class="equation" align="center" data-raw-text="\mathop{\mathrm{Var}}\left( X \right) = \frac{(c+2) \ln(1+c) - 2c}{2c (\ln(1+c))^2}" data-equation="eq:bradford_variance">
38-
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@591cf9d5c3a0cd3c1ceec961e5c49d73a68374cb/lib/node_modules/@stdlib/stats/base/dists/bradford/variance/docs/img/equation_bradford_variance.svg" alt="Variance for a Bradford distribution.">
37+
<!-- <div class="equation" align="center" data-raw-text="\sigma = \sqrt{\frac{(c+2) \ln(1+c) - 2c}{2c (\ln(1+c))^2}}" data-equation="eq:bradford_stdev">
38+
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@591cf9d5c3a0cd3c1ceec961e5c49d73a68374cb/lib/node_modules/@stdlib/stats/base/dists/bradford/stdev/docs/img/equation_bradford_stdev.svg" alt="Standard deviation for a Bradford distribution.">
3939
<br>
4040
</div> -->
4141

@@ -54,28 +54,28 @@ where `c` is the shape parameter.
5454
## Usage
5555

5656
```javascript
57-
var variance = require( '@stdlib/stats/base/dists/bradford/variance' );
57+
var stdev = require( '@stdlib/stats/base/dists/bradford/stdev' );
5858
```
5959

60-
#### variance( c )
60+
#### stdev( c )
6161

62-
Returns the [variance][variance] of a [Bradford][bradford-distribution] distribution with shape parameter `c`.
62+
Returns the [standard deviation][standard-deviation] of a [Bradford][bradford-distribution] distribution with shape parameter `c`.
6363

6464
```javascript
65-
var v = variance( 0.1 );
66-
// returns ~0.083
65+
var v = stdev( 0.1 );
66+
// returns ~0.289
6767

68-
v = variance( 10.0 );
69-
// returns ~0.076
68+
v = stdev( 10.0 );
69+
// returns ~0.276
7070
```
7171

7272
If provided a shape parameter `c <= 0`, the function returns `NaN`.
7373

7474
```javascript
75-
var v = variance( 0.0 );
75+
var v = stdev( 0.0 );
7676
// returns NaN
7777

78-
v = variance( -1.5 );
78+
v = stdev( -1.5 );
7979
// returns NaN
8080
```
8181

@@ -101,15 +101,15 @@ v = variance( -1.5 );
101101

102102
```javascript
103103
var uniform = require( '@stdlib/random/array/uniform' );
104-
var variance = require( '@stdlib/stats/base/dists/bradford/variance' );
104+
var stdev = require( '@stdlib/stats/base/dists/bradford/stdev' );
105105

106106
var c = uniform( 10, 0.1, 10.0 );
107107

108108
var v;
109109
var i;
110110
for ( i = 0; i < c.length; i++ ) {
111-
v = variance( c[ i ] );
112-
console.log( 'c: %d, Var(X;c): %d', c[ i ].toFixed( 4 ), v.toFixed( 4 ) );
111+
v = stdev( c[ i ] );
112+
console.log( 'c: %d, SD(X;c): %d', c[ i ].toFixed( 4 ), v.toFixed( 4 ) );
113113
}
114114
```
115115

@@ -131,7 +131,7 @@ for ( i = 0; i < c.length; i++ ) {
131131

132132
[bradford-distribution]: https://en.wikipedia.org/wiki/Bradford%27s_law
133133

134-
[variance]: https://en.wikipedia.org/wiki/Variance
134+
[standard-deviation]: https://en.wikipedia.org/wiki/Standard_deviation
135135

136136
</section>
137137

Lines changed: 67 additions & 0 deletions
Loading

lib/node_modules/@stdlib/stats/base/dists/bradford/stdev/docs/repl.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818
Examples
1919
--------
2020
> var v = {{alias}}( 0.1 )
21-
~0.083
21+
~0.289
2222
> v = {{alias}}( 0.5 )
23-
~0.083
23+
~0.288
2424
> v = {{alias}}( 10.0 )
25-
~0.076
25+
~0.276
2626

2727
See Also
2828
--------

lib/node_modules/@stdlib/stats/base/dists/bradford/stdev/docs/types/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@
3030
*
3131
* @example
3232
* var v = stdev( 0.1 );
33-
* // returns ~0.083
33+
* // returns ~0.289
3434
*
3535
* @example
3636
* var v = stdev( 0.5 );
37-
* // returns ~0.083
37+
* // returns ~0.288
3838
*
3939
* @example
4040
* var v = stdev( 10.0 );
41-
* // returns ~0.076
41+
* // returns ~0.276
4242
*
4343
* @example
4444
* var v = stdev( 0.0 );

0 commit comments

Comments
 (0)