Skip to content

Commit 1abb80b

Browse files
committed
improve readability and equation rendering
1 parent 0efc112 commit 1abb80b

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

doc/specs/stdlib_stats_distribution_normal.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ Experimental
1414

1515
### Description
1616

17-
A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution. The location `loc` specifies the mean or expectation. The `scale` specifies the standard deviation.
17+
A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution. The location `loc` specifies the mean or expectation ($\mu$). The `scale` specifies the standard deviation ($\sigma$).
1818

19-
Without argument the function returns a standard normal distributed random variate N(0,1).
19+
Without argument, the function returns a standard normal distributed random variate $N(0,1)$.
2020

21-
With two arguments, the function returns a normal distributed random variate N(loc, scale^2). For complex arguments, the real and imaginary parts are independent of each other.
21+
With two arguments, the function returns a normal distributed random variate $N(\mu=\text{loc}, \sigma^2=\text{scale}^2)$. For complex arguments, the real and imaginary parts are independent of each other.
2222

23-
With three arguments, the function returns a rank one array of normal distributed random variates.
23+
With three arguments, the function returns a rank-1 array of normal distributed random variates.
2424

2525
Note: the algorithm used for generating normal random variates is fundamentally limited to double precision.
2626

@@ -44,7 +44,7 @@ Elemental function (passing both `loc` and `scale`).
4444

4545
### Return value
4646

47-
The result is a scalar or rank one array, with a size of `array_size`, and as the same type of `scale` and `loc`.
47+
The result is a scalar or rank-1 array, with a size of `array_size`, and as the same type of `scale` and `loc`.
4848

4949
### Example
5050

@@ -62,11 +62,11 @@ Experimental
6262

6363
The probability density function (pdf) of the single real variable normal distribution:
6464

65-
$$f(x) = \frac{1}{\sigma \sqrt{2}} e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^{2}}$$
65+
$$f(x) = \frac{1}{\sigma \sqrt{2}} \exp{\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}\right]}$$
6666

67-
For complex varible (x + y i) with independent real x and imaginary y parts, the joint probability density function is the product of corresponding marginal pdf of real and imaginary pdf (ref. "Probability and Random Processes with Applications to Signal Processing and Communications", 2nd ed., Scott L. Miller and Donald Childers, 2012, p.197):
67+
For a complex varible $z=(x + y i)$ with independent real $x$ and imaginary $y$ parts, the joint probability density function is the product of the the corresponding real and imaginary marginal pdfs (ref. "Probability and Random Processes with Applications to Signal Processing and Communications", 2nd ed., Scott L. Miller and Donald Childers, 2012, p.197):
6868

69-
$$f(x + y \mathit{i}) = f(x) f(y) = \frac{1}{2\sigma_{x}\sigma_{y}} e^{-\frac{1}{2}[(\frac{x-\mu}{\sigma_{x}})^{2}+(\frac{y-\nu}{\sigma_{y}})^{2}]}$$
69+
$$f(x + y \mathit{i}) = f(x) f(y) = \frac{1}{2\sigma_{x}\sigma_{y}} \exp{\left[-\frac{1}{2}\left(\left(\frac{x-\mu_x}{\sigma_{x}}\right)^{2}+\left(\frac{y-\mu_y}{\sigma_{y}}\right)^{2}\right)\right]}$$
7070

7171
### Syntax
7272

@@ -88,7 +88,7 @@ All three arguments must have the same type.
8888

8989
### Return value
9090

91-
The result is a scalar or an array, with a shape conformable to arguments, and as the same type of input arguments.
91+
The result is a scalar or an array, with a shape conformable to the arguments, and of the same type as the input arguments.
9292

9393
### Example
9494

@@ -106,11 +106,13 @@ Experimental
106106

107107
Cumulative distribution function of the single real variable normal distribution:
108108

109-
$$F(x)=\frac{1}{2}\left [ 1+erf(\frac{x-\mu}{\sigma \sqrt{2}}) \right ]$$
109+
$$F(x) = \frac{1}{2}\left [ 1+\text{erf}\left(\frac{x-\mu}{\sigma \sqrt{2}}\right) \right ]$$
110110

111-
For the complex variable (x + y i) with independent real x and imaginary y parts, the joint cumulative distribution function is the product of corresponding marginal cdf of real and imaginary cdf (ref. "Probability and Random Processes with Applications to Signal Processing and Communications", 2nd ed., Scott L. Miller and Donald Childers, 2012, p.197):
111+
For the complex variable $z=(x + y i)$ with independent real $x$ and imaginary $y$ parts, the joint cumulative distribution function is the product of the corresponding real and imaginary marginal cdfs (ref. "Probability and Random Processes with Applications to Signal Processing and Communications", 2nd ed., Scott L. Miller and Donald Childers, 2012, p.197):
112112

113-
$$F(x+y\mathit{i})=F(x)F(y)=\frac{1}{4} [1+erf(\frac{x-\mu}{\sigma_{x} \sqrt{2}})] [1+erf(\frac{y-\nu}{\sigma_{y} \sqrt{2}})]$$
113+
$$ F(x+y\mathit{i})=F(x)F(y)=\frac{1}{4} \
114+
\left[ 1+\text{erf}\left(\frac{x-\mu_x}{\sigma_x \sqrt{2}}\right) \right] \
115+
\left[ 1+\text{erf}\left(\frac{y-\mu_y}{\sigma_y \sqrt{2}}\right) \right] $$
114116

115117
### Syntax
116118

0 commit comments

Comments
 (0)