Skip to content

Commit c0784e4

Browse files
author
jim-215-fisher
committed
Merge'Exponential-1' into Exponential
2 parents 7d64c11 + 212bc33 commit c0784e4

File tree

3 files changed

+76
-76
lines changed

3 files changed

+76
-76
lines changed

doc/specs/stdlib_stats_distribution_exponential.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,35 +6,35 @@ title: stats_distribution_exponential
66

77
[TOC]
88

9-
## `rvs_expon` - exponential distribution random variates
9+
## `rvs_exp` - exponential distribution random variates
1010

1111
### Status
1212

1313
Experimental
1414

1515
### Description
1616

17-
An exponentially distributed random variate distribution is the distribution of time between events in a Poisson point process. The inverse scale parameter `lambda` specifies the rate of change.
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, also called the rate of events.
1818

19-
Without argument the function returns a standard exponential distributed random variate E(1) with `lambda = 1`.
19+
Without argument the function returns a random sample from the standard exponential distribution `E(1)` with `lambda = 1`.
2020

21-
With single argument, the function returns an exponential distributed random variate E(lambda). For complex arguments, the real and imaginary parts are independent of each other.
21+
With single argument, the function returns a random sample from the exponential distribution `E(lambda)`. For complex arguments, the real and imaginary parts are independent of each other.
2222

23-
With two arguments the function returns a rank one array of exponential distributed random variates.
23+
With two arguments the function returns a rank one array of exponentially distributed random variates.
2424

25-
Note: the algorithm used for generating normal random variates is fundamentally limited to double precision.
25+
Note: the algorithm used for generating exponetial random variates is fundamentally limited to double precision. Ref.: Marsaglia, G. & Tsang, W.W. (2000) `The ziggurat method for generating random variables', J. Statist. Software, v5(8).
2626

2727
### Syntax
2828

29-
`result = [[stdlib_stats_distribution_exponential(module):rvs_expon(interface)]]([lambda] [[, array_size]])`
29+
`result = [[stdlib_stats_distribution_exponential(module):rvs_exp(interface)]]([lambda] [[, array_size]])`
3030

3131
### Class
3232

3333
Function
3434

3535
### Arguments
3636

37-
`lambda`: optional argument has `intent(in)` and is a scalar of type `real` or `complex`.
37+
`lambda`: optional argument has `intent(in)` and is a scalar of type `real` or `complex`. The value of `lambda` has to be non-negative.
3838

3939
`array_size`: optional argument has `intent(in)` and is a scalar of type `integer` with default kind.
4040

@@ -47,7 +47,7 @@ The result is a scalar or rank one array with a size of `array_size`, and as the
4747
```fortran
4848
program demo_exponential_rvs
4949
use stdlib_random, only : random_seed
50-
use stdlib_stats_distribution_exponential, only: rexp => rvs_expon
50+
use stdlib_stats_distribution_exponential, only: rexp => rvs_exp
5151
5252
implicit none
5353
real :: a(2,3,4)
@@ -80,7 +80,7 @@ program demo_exponential_rvs
8080
end program demo_exponential_rvs
8181
```
8282

83-
## `pdf_expon` - exponential distribution probability density function
83+
## `pdf_exp` - exponential distribution probability density function
8484

8585
### Status
8686

@@ -92,13 +92,13 @@ The probability density function (pdf) of the single real variable exponential d
9292

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

95-
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):
95+
For a 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):
9696

9797
$$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 &otherwise\end{}$$
9898

9999
### Syntax
100100

101-
`result = [[stdlib_stats_distribution_exponential(module):pdf_expon(interface)]](x, lambda)`
101+
`result = [[stdlib_stats_distribution_exponential(module):pdf_exp(interface)]](x, lambda)`
102102

103103
### Class
104104

@@ -121,8 +121,8 @@ The result is a scalar or an array, with a shape conformable to arguments, and a
121121
```fortran
122122
program demo_exponential_pdf
123123
use stdlib_random, only : random_seed
124-
use stdlib_stats_distribution_exponential, only: exp_pdf => pdf_expon, &
125-
rexp => rvs_expon
124+
use stdlib_stats_distribution_exponential, only: exp_pdf => pdf_exp, &
125+
rexp => rvs_exp
126126
127127
implicit none
128128
real :: x(2,3,4),a(2,3,4)
@@ -160,7 +160,7 @@ program demo_exponential_pdf
160160
end program demo_exponential_pdf
161161
```
162162

163-
## `cdf_expon` - exponential distribution cumulative distribution function
163+
## `cdf_exp` - exponential distribution cumulative distribution function
164164

165165
### Status
166166

@@ -172,13 +172,13 @@ Cumulative distribution function (cdf) of the single real variable exponential d
172172

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

175-
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):
175+
For a 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):
176176

177177
$$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 &otherwise \end{}$$
178178

179179
### Syntax
180180

181-
`result = [[stdlib_stats_distribution_exponential(module):cdf_expon(interface)]](x, lambda)`
181+
`result = [[stdlib_stats_distribution_exponential(module):cdf_exp(interface)]](x, lambda)`
182182

183183
### Class
184184

@@ -201,8 +201,8 @@ The result is a scalar or an array, with a shape conformable to arguments, and a
201201
```fortran
202202
program demo_exponential_cdf
203203
use stdlib_random, only : random_seed
204-
use stdlib_stats_distribution_exponential, only : exp_cdf => cdf_expon, &
205-
rexp => rvs_expon
204+
use stdlib_stats_distribution_exponential, only : exp_cdf => cdf_exp, &
205+
rexp => rvs_exp
206206
207207
implicit none
208208
real :: x(2,3,4),a(2,3,4)

0 commit comments

Comments
 (0)