Skip to content

Commit 4ffa761

Browse files
refactor: changed variables from alpha beta to c and d
1 parent 4e0fb52 commit 4ffa761

File tree

7 files changed

+62
-62
lines changed

7 files changed

+62
-62
lines changed

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ raw="F(x; c, d) = (1 + x^{-c})^{-d}"
3131
alt="Cumulative distribution function for a Burr (Type III) distribution."> -->
3232

3333
```math
34-
F(x; alpha, beta) = (1 + x^{-alpha})^{-beta}
34+
F(x; c, d) = (1 + x^{-c})^{-d}
3535
```
3636

3737
<!-- <div class="equation" align="center" data-raw-text="F(x;c,d) = (1 + x^{-c})^{-d}" data-equation="eq:burr-type3_cdf">
@@ -41,7 +41,7 @@ F(x; alpha, beta) = (1 + x^{-alpha})^{-beta}
4141

4242
<!-- </equation> -->
4343

44-
where `alpha > 0` is the first shape parameter and `beta > 0` is the second shape parameter.
44+
where `c > 0` is the first shape parameter and `d > 0` is the second shape parameter.
4545

4646
</section>
4747

@@ -55,9 +55,9 @@ where `alpha > 0` is the first shape parameter and `beta > 0` is the second shap
5555
var cdf = require( '@stdlib/stats/base/dists/burr-type3/cdf' );
5656
```
5757

58-
#### cdf( x, alpha, beta )
58+
#### cdf( x, c, d )
5959

60-
Evaluates the [cumulative distribution function][cdf] (CDF) for a [Burr (type III)][burr-distribution] distribution with parameters `alpha` (first shape parameter) and `beta` (second shape parameter).
60+
Evaluates the [cumulative distribution function][cdf] (CDF) for a [Burr (type III)][burr-distribution] distribution with parameters `c` (first shape parameter) and `d` (second shape parameter).
6161

6262
```javascript
6363
var y = cdf( 0.1, 1.0, 1.0 );
@@ -98,7 +98,7 @@ y = cdf( 0.0, 1.0, NaN );
9898
// returns NaN
9999
```
100100

101-
If provided `alpha <= 0`, the function returns `NaN`.
101+
If provided `c <= 0`, the function returns `NaN`.
102102

103103
```javascript
104104
var y = cdf( 2.0, -1.0, 0.5 );
@@ -108,7 +108,7 @@ y = cdf( 2.0, 0.0, 0.5 );
108108
// returns NaN
109109
```
110110

111-
If provided `beta <= 0`, the function returns `NaN`.
111+
If provided `d <= 0`, the function returns `NaN`.
112112

113113
```javascript
114114
var y = cdf( 2.0, 0.5, -1.0 );
@@ -118,9 +118,9 @@ y = cdf( 2.0, 0.5, 0.0 );
118118
// returns NaN
119119
```
120120

121-
#### cdf.factory( alpha, beta )
121+
#### cdf.factory( c, d )
122122

123-
Returns a function for evaluating the [cumulative distribution function][cdf] for a [Burr (type III)][burr-distribution] distribution with parameters `alpha` (first shape parameter) and `beta` (second shape parameter).
123+
Returns a function for evaluating the [cumulative distribution function][cdf] for a [Burr (type III)][burr-distribution] distribution with parameters `c` (first shape parameter) and `d` (second shape parameter).
124124

125125
```javascript
126126
var mycdf = cdf.factory( 0.5, 0.5 );
@@ -146,15 +146,15 @@ y = mycdf( 0.3 );
146146
var cdf = require( '@stdlib/stats/base/dists/burr-type3/cdf' );
147147
var linspace = require( '@stdlib/array/linspace' );
148148

149-
var alpha = linspace( 1, 10.0, 10 );
150-
var beta = linspace( 1, 10.0, 10 );
149+
var c = linspace( 1, 10.0, 10 );
150+
var d = linspace( 1, 10.0, 10 );
151151
var x = linspace( 0.1, 1.0, 10 );
152152
var y;
153153
var i;
154154

155155
for ( i = 0; i < 10; i++ ) {
156-
y = cdf( x[ i ], alpha[ i ], beta[ i ] );
157-
console.log( 'x: %d, α: %d, β: %d, F(x;α,β): %d', x[i].toFixed( 4 ), alpha[i].toFixed( 4 ), beta[i].toFixed( 4 ), y.toFixed( 4 ) );
156+
y = cdf( x[ i ], c[ i ], d[ i ] );
157+
console.log( 'x: %d, α: %d, β: %d, F(x;α,β): %d', x[i].toFixed( 4 ), c[i].toFixed( 4 ), d[i].toFixed( 4 ), y.toFixed( 4 ) );
158158
}
159159
```
160160

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/benchmark/benchmark.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ var cdf = require( './../lib' );
3030
// MAIN //
3131

3232
bench( pkg, function benchmark( b ) {
33-
var alpha;
34-
var beta;
3533
var len;
34+
var c;
35+
var d;
3636
var x;
3737
var y;
3838
var i;
3939

4040
len = 100;
4141
x = uniform( len, 0.0, 10.0 );
42-
alpha = uniform( len, 0.1, 100.0 );
43-
beta = uniform( len, 0.1, 100.0 );
42+
c = uniform( len, 0.1, 100.0 );
43+
d = uniform( len, 0.1, 100.0 );
4444

4545
b.tic();
4646
for ( i = 0; i < b.iterations; i++ ) {
47-
y = cdf( x[ i % len ], alpha[ i % len ], beta[ i % len ] );
47+
y = cdf( x[ i % len ], c[ i % len ], d[ i % len ] );
4848
if ( isnan( y ) ) {
4949
b.fail( 'should not return NaN' );
5050
}

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/docs/repl.txt

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11

2-
{{alias}}( x, α, β )
3-
Evaluates the cumulative distribution function (CDF) for a Burr (type III)
4-
distribution with first shape parameter `α` and second shape parameter `β`
2+
{{alias}}( x, c, d )
3+
Evaluates the cumulative distribution function (CDF) for a Burr (type III)
4+
distribution with first shape parameter `c` and second shape parameter `d`
55
at a value `x`.
66

77
If provided `NaN` as any argument, the function returns `NaN`.
88

9-
If `α <= 0` or `β <= 0` or `x <= 0`, the function returns `NaN`.
9+
If `c <= 0` or `d <= 0` or `x <= 0`, the function returns `NaN`.
1010

1111
Parameters
1212
----------
1313
x: number
1414
Input value.
1515

16-
α: number
16+
c: number
1717
First shape parameter.
1818

19-
β: number
19+
d: number
2020
Second shape parameter.
2121

2222
Returns
@@ -50,17 +50,17 @@
5050
NaN
5151

5252

53-
{{alias}}.factory( α, β )
54-
Returns a function for evaluating the cumulative distribution function (CDF)
55-
of a Burr (type III) distribution with first shape parameter `α` and second
56-
shape parameter `β`.
53+
{{alias}}.factory( c, d )
54+
Returns a function for evaluating the cumulative distribution function (CDF)
55+
of a Burr (type III) distribution with first shape parameter `c` and second
56+
shape parameter `d`.
5757

5858
Parameters
5959
----------
60-
α: number
60+
c: number
6161
First shape parameter.
6262

63-
β: number
63+
d: number
6464
Second shape parameter.
6565

6666
Returns

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/docs/types/index.d.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ type Unary = ( x: number ) => number;
3131
*/
3232
interface CDF {
3333
/**
34-
* Evaluates the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `alpha` and second shape parameter `beta` at a value `x`.
34+
* Evaluates the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `c` and second shape parameter `d` at a value `x`.
3535
*
3636
* ## Notes
3737
*
38-
* - If `alpha <= 0` or `beta <= 0` or `x <= 0`, the function returns `NaN`.
38+
* - If `c <= 0` or `d <= 0` or `x <= 0`, the function returns `NaN`.
3939
*
4040
* @param x - input value
41-
* @param alpha - first shape parameter
42-
* @param beta - second shape parameter
41+
* @param c - first shape parameter
42+
* @param d - second shape parameter
4343
* @returns evaluated CDF
4444
*
4545
* @example
@@ -78,13 +78,13 @@ interface CDF {
7878
* var y = cdf( 0.0, 1.0, NaN );
7979
* // returns NaN
8080
*/
81-
( x: number, alpha: number, beta: number ): number;
81+
( x: number, c: number, d: number ): number;
8282

8383
/**
84-
* Returns a function for evaluating the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `alpha` and second shape parameter `beta`.
84+
* Returns a function for evaluating the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `c` and second shape parameter `d`.
8585
*
86-
* @param alpha - first shape parameter
87-
* @param beta - second shape parameter
86+
* @param c - first shape parameter
87+
* @param d - second shape parameter
8888
* @returns CDF
8989
*
9090
* @example
@@ -96,15 +96,15 @@ interface CDF {
9696
* y = myCDF( 0.3 );
9797
* // returns ~0.59
9898
*/
99-
factory( alpha: number, beta: number ): Unary;
99+
factory( c: number, d: number ): Unary;
100100
}
101101

102102
/**
103103
* Burr (type III) distribution cumulative distribution function (CDF).
104104
*
105105
* @param x - input value
106-
* @param alpha - first shape parameter
107-
* @param beta - second shape parameter
106+
* @param c - first shape parameter
107+
* @param d - second shape parameter
108108
* @returns evaluated CDF
109109
*
110110
* @example

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/examples/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121
var linspace = require( '@stdlib/array/linspace' );
2222
var cdf = require( './../lib' );
2323

24-
var alpha = linspace( 1, 10.0, 10 );
25-
var beta = linspace( 1, 10.0, 10 );
24+
var c = linspace( 1, 10.0, 10 );
25+
var d = linspace( 1, 10.0, 10 );
2626
var x = linspace( 0.1, 1.0, 10 );
2727
var y;
2828
var i;
2929

3030
for ( i = 0; i < 10; i++ ) {
31-
y = cdf( x[ i ], alpha[ i ], beta[ i ] );
32-
console.log( 'x: %d, α: %d, β: %d, F(x;α,β): %d', x[i].toFixed( 4 ), alpha[i].toFixed( 4 ), beta[i].toFixed( 4 ), y.toFixed( 4 ) );
31+
y = cdf( x[ i ], c[ i ], d[ i ] );
32+
console.log( 'x: %d, α: %d, β: %d, F(x;α,β): %d', x[i].toFixed( 4 ), c[i].toFixed( 4 ), d[i].toFixed( 4 ), y.toFixed( 4 ) );
3333
}

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/lib/factory.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2828
// MAIN //
2929

3030
/**
31-
* Returns a function for evaluating the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `alpha` and second shape parameter `beta`.
31+
* Returns a function for evaluating the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `c` and second shape parameter `d`.
3232
*
33-
* @param {PositiveNumber} alpha - first shape parameter
34-
* @param {PositiveNumber} beta - second shape parameter
33+
* @param {PositiveNumber} c - first shape parameter
34+
* @param {PositiveNumber} d - second shape parameter
3535
* @returns {Function} CDF
3636
*
3737
* @example
@@ -43,12 +43,12 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
4343
* y = cdf( 0.3 );
4444
* // returns ~0.59
4545
*/
46-
function factory( alpha, beta ) {
46+
function factory( c, d ) {
4747
if (
48-
isnan( alpha ) ||
49-
isnan( beta ) ||
50-
alpha <= 0.0 ||
51-
beta <= 0.0
48+
isnan( c ) ||
49+
isnan( d ) ||
50+
c <= 0.0 ||
51+
d <= 0.0
5252
) {
5353
return constantFunction( NaN );
5454
}
@@ -69,7 +69,7 @@ function factory( alpha, beta ) {
6969
if ( isnan( x ) || x <= 0.0 ) {
7070
return NaN;
7171
}
72-
return pow( 1 + pow( x, -alpha ), -beta );
72+
return pow( 1 + pow( x, -c ), -d );
7373
}
7474
}
7575

lib/node_modules/@stdlib/stats/base/dists/burr-type3/cdf/lib/main.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
2727
// MAIN //
2828

2929
/**
30-
* Evaluates the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `alpha` and second shape parameter `beta` at a value `x`.
30+
* Evaluates the cumulative distribution function (CDF) for a Burr (type III) distribution with first shape parameter `c` and second shape parameter `d` at a value `x`.
3131
*
3232
* @param {number} x - input value
33-
* @param {PositiveNumber} alpha - first shape parameter
34-
* @param {PositiveNumber} beta - second shape parameter
33+
* @param {PositiveNumber} c - first shape parameter
34+
* @param {PositiveNumber} d - second shape parameter
3535
* @returns {Probability} evaluated CDF
3636
*
3737
* @example
@@ -70,18 +70,18 @@ var isnan = require( '@stdlib/math/base/assert/is-nan' );
7070
* var y = cdf( 0.0, 1.0, NaN );
7171
* // returns NaN
7272
*/
73-
function cdf( x, alpha, beta ) {
73+
function cdf( x, c, d ) {
7474
if (
7575
isnan( x ) ||
76-
isnan( alpha ) ||
77-
isnan( beta ) ||
78-
alpha <= 0.0 ||
79-
beta <= 0.0 ||
76+
isnan( c ) ||
77+
isnan( d ) ||
78+
c <= 0.0 ||
79+
d <= 0.0 ||
8080
x <= 0.0
8181
) {
8282
return NaN;
8383
}
84-
return pow( 1 + pow( x, -alpha ), -beta );
84+
return pow( 1 + pow( x, -c ), -d );
8585
}
8686

8787

0 commit comments

Comments
 (0)