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: lib/node_modules/@stdlib/stats/base/dists/geometric/cdf/README.md
+15-72Lines changed: 15 additions & 72 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,4 @@
1
1
<!--
2
-
3
2
@license Apache-2.0
4
3
5
4
Copyright (c) 2018 The Stdlib Authors.
@@ -15,7 +14,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
15
14
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
15
See the License for the specific language governing permissions and
17
16
limitations under the License.
18
-
19
17
-->
20
18
21
19
# Cumulative Distribution Function
@@ -24,33 +22,22 @@ limitations under the License.
24
22
25
23
<sectionclass="intro">
26
24
27
-
The [cumulative distribution function][cdf] for a [geometric][geometric-distribution] random variable is
28
-
29
-
<!-- <equation class="equation" label="eq:geometric_cdf" align="center" raw="F(x;p)= \begin{cases} 0 & \text{ for } x < 0 \\ 1-(1 - p)^{\left\lfloor x \right\rfloor+1} & \text{ otherwise} \end{cases}" alt="Cumulative distribution function for a geometric distribution."> -->
25
+
The [cumulative distribution function][cdf] for a [geometric][geometric-distribution] random variable is:
30
26
31
27
```math
32
-
F(x;p)= \begin{cases} 0 & \text{for } x < 0 \\ 1-(1 - p)^{\left\lfloor x \right\rfloor+1} & \text{otherwise} \end{cases}
28
+
F(x;p)= \begin{cases} 0 & \text{for } x < 0 \\ 1-(1 - p)^{\left\lfloor x \right\rfloor+1} & \text{otherwise} \end{cases}
33
29
```
34
30
35
-
<!-- <div class="equation" align="center" data-raw-text="F(x;p)= \begin{cases} 0 & \text{ for } x < 0 \\ 1-(1 - p)^{\left\lfloor x \right\rfloor+1} & \text{ otherwise} \end{cases}" data-equation="eq:geometric_cdf">
36
-
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@51534079fef45e990850102147e8945fb023d1d0/lib/node_modules/@stdlib/stats/base/dists/geometric/cdf/docs/img/equation_geometric_cdf.svg" alt="Cumulative distribution function for a geometric distribution.">
37
-
<br>
38
-
</div> -->
39
-
40
-
<!-- </equation> -->
41
-
42
31
where `0 <= p <= 1` is the success probability. `x` denotes the number of _failures_ before the first success.
43
32
44
33
</section>
45
34
46
-
<!-- /.intro -->
47
-
48
35
<sectionclass="usage">
49
36
50
37
## Usage
51
38
52
39
```javascript
53
-
var cdf =require('@stdlib/stats/base/dists/geometric/cdf');
40
+
var cdf =require('@stdlib/stats/base/dists/geometric/cdf');
54
41
```
55
42
56
43
#### cdf( x, p )
@@ -87,7 +74,7 @@ y = cdf( 2.0, 1.5 );
87
74
88
75
#### cdf.factory( p )
89
76
90
-
Returns a function for evaluating the [cumulative distribution function][cdf] of a [geometric][geometric-distribution] distribution with success probability `p`
77
+
Returns a function for evaluating the [cumulative distribution function][cdf] of a [geometric][geometric-distribution] distribution with success probability `p`.
91
78
92
79
```javascript
93
80
var mycdf =cdf.factory( 0.5 );
@@ -100,17 +87,13 @@ y = mycdf( 1.0 );
100
87
101
88
</section>
102
89
103
-
<!-- /.usage -->
104
-
105
90
<sectionclass="examples">
106
91
107
92
## Examples
108
93
109
-
<!-- eslint no-undef: "error" -->
110
-
111
94
```javascript
112
-
var randu =require('@stdlib/random/base/randu');
113
-
var cdf =require('@stdlib/stats/base/dists/geometric/cdf');
95
+
var randu =require('@stdlib/random/base/randu');
96
+
var cdf =require('@stdlib/stats/base/dists/geometric/cdf');
114
97
115
98
var p;
116
99
var x;
@@ -127,29 +110,18 @@ for ( i = 0; i < 10; i++ ) {
127
110
128
111
</section>
129
112
130
-
<!-- /.examples -->
131
-
132
-
<!-- Section to include cited references. If references are included, add a horizontal rule *before* the section. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
133
-
134
113
<sectionclass="references">
135
114
136
-
<!-- C interface documentation. -->
137
-
138
-
* * *
139
-
140
-
<sectionclass="c">
141
-
142
-
## C APIs
143
-
144
-
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
115
+
## References
145
116
146
-
<sectionclass="intro">
117
+
-[Cumulative distribution function (Wikipedia)](https://en.wikipedia.org/wiki/Cumulative_distribution_function)
118
+
-[Geometric distribution (Wikipedia)](https://en.wikipedia.org/wiki/Geometric_distribution)
0 commit comments