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/normal/mgf/README.md
+15-77Lines changed: 15 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,33 +22,18 @@ limitations under the License.
22
22
23
23
> [Normal][normal-distribution] distribution moment-generating function (MGF).
24
24
25
-
<!-- Section to include introductory text. Make sure to keep an empty line after the intro `section` element and another before the `/section` close. -->
26
-
27
25
<sectionclass="intro">
28
26
29
-
The [moment-generating function][mgf] for a [normal][normal-distribution] random variable is
30
-
31
-
<!-- <equation class="equation" label="eq:normal_mgf_function" align="center" raw="M_X(t) := \mathbb{E}\!\left[e^{tX}\right] = \exp\{ \mu t + \frac{1}{2}\sigma^2t^2 \}" alt="Moment-generating function (MGF) for a normal distribution."> -->
27
+
The [moment-generating function][mgf] for a [normal][normal-distribution] random variable is:
32
28
33
29
```math
34
30
M_X(t) := \mathbb{E}\!\left[e^{tX}\right] = \exp\{ \mu t + \frac{1}{2}\sigma^2t^2 \}
<img src="https://cdn.jsdelivr.net/gh/stdlib-js/stdlib@51534079fef45e990850102147e8945fb023d1d0/lib/node_modules/@stdlib/stats/base/dists/normal/mgf/docs/img/equation_normal_mgf_function.svg" alt="Moment-generating function (MGF) for a normal distribution.">
39
-
<br>
40
-
</div> -->
41
-
42
-
<!-- </equation> -->
43
-
44
33
where `mu` is the mean and `sigma > 0` is the standard deviation.
45
34
46
35
</section>
47
36
48
-
<!-- /.intro -->
49
-
50
-
<!-- Package usage documentation. -->
51
-
52
37
<sectionclass="usage">
53
38
54
39
## Usage
@@ -95,81 +80,34 @@ y = mgf( 2.0, 0.0, -1.0 );
95
80
// returns NaN
96
81
```
97
82
98
-
#### mgf.factory( mu, sigma )
99
-
100
-
Returns a function for evaluating the [moment-generating function][mgf] (MGF) of a [normal][normal-distribution] distribution with parameters `mu` and `sigma`.
101
-
102
-
```javascript
103
-
var mymgf =mgf.factory( 4.0, 2.0 );
104
-
105
-
var y =mymgf( 1.0 );
106
-
// returns ~403.429
107
-
108
-
y =mymgf( 0.5 );
109
-
// returns ~12.182
110
-
```
111
-
112
83
</section>
113
84
114
-
<!-- /.usage -->
115
-
116
-
<!-- Package usage notes. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
117
-
118
-
<sectionclass="notes">
119
-
120
-
</section>
121
-
122
-
<!-- /.notes -->
123
-
124
-
<!-- Package usage examples. -->
125
-
126
-
<sectionclass="examples">
127
-
128
-
## Examples
85
+
<sectionclass="references">
129
86
130
-
<!--eslint no-undef: "error"-->
87
+
<!--Moved content from lines 153–158-->
131
88
132
-
```javascript
133
-
var randu =require( '@stdlib/random/base/randu' );
134
-
var mgf =require( '@stdlib/stats/base/dists/normal/mgf' );
<!-- 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. -->
156
-
157
-
<sectionclass="references">
103
+
<!-- Closing section tag added -->
158
104
159
105
</section>
160
106
161
-
<!-- /.references -->
162
-
163
-
<!-- Section for related `stdlib` packages. Do not manually edit this section, as it is automatically populated. -->
164
-
165
107
<sectionclass="related">
166
108
167
109
</section>
168
110
169
-
<!-- /.related -->
170
-
171
-
<!-- Section for all links. Make sure to keep an empty line after the `section` element and another before the `/section` close. -->
0 commit comments