Skip to content

Commit bb08fd9

Browse files
authored
Merge pull request #721 from HugoMVale/stats-docfix
fix doc stats-distribution-normal and stats-distribution-exponential
2 parents 04d8459 + a056c4a commit bb08fd9

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

doc/specs/stdlib_stats_distribution_exponential.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ Experimental
1414

1515
### Description
1616

17-
An exponential distribution is the distribution of time between events in a Poisson point process. The inverse scale parameter `lambda` specifies the average time between events ($\lambda$), also called the rate of events.
17+
An exponential distribution is the distribution of time between events in a Poisson point process.
18+
The inverse scale parameter `lambda` specifies the average time between events (\(\lambda\)), also called the rate of events.
1819

19-
Without argument, the function returns a random sample from the standard exponential distribution $E(\lambda=1)$.
20+
Without argument, the function returns a random sample from the standard exponential distribution \(E(\lambda=1)\).
2021

21-
With a single argument, the function returns a random sample from the exponential distribution $E(\lambda=\text{lambda})$.
22+
With a single argument, the function returns a random sample from the exponential distribution \(E(\lambda=\text{lambda})\).
2223
For complex arguments, the real and imaginary parts are sampled independently of each other.
2324

2425
With two arguments, the function returns a rank-1 array of exponentially distributed random variates.
@@ -64,7 +65,7 @@ The probability density function (pdf) of the single real variable exponential d
6465

6566
$$f(x)=\begin{cases} \lambda e^{-\lambda x} &x\geqslant 0 \\\\ 0 &x< 0\end{cases}$$
6667

67-
For a complex variable $z=(x + y i)$ with independent real $x$ and imaginary $y$ parts, the joint probability density function is the product of the corresponding real and imaginary marginal pdfs:[^2]
68+
For a complex variable \(z=(x + y i)\) with independent real \(x\) and imaginary \(y\) parts, the joint probability density function is the product of the corresponding real and imaginary marginal pdfs:[^2]
6869

6970
$$f(x+\mathit{i}y)=f(x)f(y)=\begin{cases} \lambda_{x} \lambda_{y} e^{-(\lambda_{x} x + \lambda_{y} y)} &x\geqslant 0, y\geqslant 0 \\\\ 0 &\text{otherwise}\end{cases}$$
7071

@@ -107,7 +108,7 @@ Cumulative distribution function (cdf) of the single real variable exponential d
107108

108109
$$F(x)=\begin{cases}1 - e^{-\lambda x} &x\geqslant 0 \\\\ 0 &x< 0\end{cases}$$
109110

110-
For a complex variable $z=(x + y i)$ with independent real $x$ and imaginary $y$ parts, the joint cumulative distribution function is the product of corresponding real and imaginary marginal cdfs:[^2]
111+
For a complex variable \(z=(x + y i)\) with independent real \(x\) and imaginary \(y\) parts, the joint cumulative distribution function is the product of corresponding real and imaginary marginal cdfs:[^2]
111112

112113
$$F(x+\mathit{i}y)=F(x)F(y)=\begin{cases} (1 - e^{-\lambda_{x} x})(1 - e^{-\lambda_{y} y}) &x\geqslant 0, \;\; y\geqslant 0 \\\\ 0 & \text{otherwise} \end{cases}$$
113114

@@ -138,6 +139,6 @@ The result is a scalar or an array, with a shape conformable to the arguments, a
138139
{!example/stats_distribution_exponential/example_exponential_cdf.f90!}
139140
```
140141

141-
[^1] Marsaglia, George, and Wai Wan Tsang. "The ziggurat method for generating random variables." _Journal of statistical software_ 5 (2000): 1-7.
142+
[^1]: Marsaglia, George, and Wai Wan Tsang. "The ziggurat method for generating random variables." _Journal of statistical software_ 5 (2000): 1-7.
142143

143-
[^2] Miller, Scott, and Donald Childers. _Probability and random processes: With applications to signal processing and communications_. Academic Press, 2012 (p. 197).
144+
[^2]: Miller, Scott, and Donald Childers. _Probability and random processes: With applications to signal processing and communications_. Academic Press, 2012 (p. 197).

doc/specs/stdlib_stats_distribution_normal.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@ 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 ($\mu$). The `scale` specifies the standard deviation ($\sigma$).
17+
A normal continuous random variate distribution, also known as Gaussian, or Gauss or Laplace-Gauss distribution.
18+
The location `loc` specifies the mean or expectation (\(\mu\)). The `scale` specifies the standard deviation (\(\sigma\)).
1819

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

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.
22+
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.
2223

2324
With three arguments, the function returns a rank-1 array of normal distributed random variates.
2425

@@ -65,7 +66,7 @@ The probability density function (pdf) of the single real variable normal distri
6566

6667
$$f(x) = \frac{1}{\sigma \sqrt{2}} \exp{\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}\right]}$$
6768

68-
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:[^2]
69+
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:[^2]
6970

7071
$$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]}$$
7172

@@ -109,7 +110,7 @@ Cumulative distribution function of the single real variable normal distribution
109110

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

112-
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:[^2]
113+
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:[^2]
113114

114115
$$ F(x+y\mathit{i})=F(x)F(y)=\frac{1}{4} \
115116
\left[ 1+\text{erf}\left(\frac{x-\mu_x}{\sigma_x \sqrt{2}}\right) \right] \
@@ -140,9 +141,9 @@ The result is a scalar or an array, with a shape conformable to the arguments, a
140141
### Example
141142

142143
```fortran
143-
{!example/stats_distribution_normal/example_norm_cdf.f90!}
144+
{!example/stats_distribution_normal/example_normal_cdf.f90!}
144145
```
145146

146-
[^1] Marsaglia, George, and Wai Wan Tsang. "The ziggurat method for generating random variables." _Journal of statistical software_ 5 (2000): 1-7.
147+
[^1]: Marsaglia, George, and Wai Wan Tsang. "The ziggurat method for generating random variables." _Journal of statistical software_ 5 (2000): 1-7.
147148

148-
[^2] Miller, Scott, and Donald Childers. _Probability and random processes: With applications to signal processing and communications_. Academic Press, 2012 (p. 197).
149+
[^2]: Miller, Scott, and Donald Childers. _Probability and random processes: With applications to signal processing and communications_. Academic Press, 2012 (p. 197).

0 commit comments

Comments
 (0)