Platform
Resources
Pricing
Sign in
Get started
Parcly Taxel
Mathematics. Computer science. My Little Pony. Furries. Everything in between. Made in Singapore. Real name Jeremy Tan Jie Rui.
Workspace
Fork
Public
Random numbers
By
Parcly Taxel
Edited
Jul 24, 2020
ISC
Random numbers
The gamma and beta distributions
Cauchy and logistic distributions
O(log log n) binomial variates
The Poisson distribution
Fréchet, Gumbel, Weibull
Miscellaneous continuous distributions
Test statistics and noncentrality
Discrete distributions
Full circle at the von Mises
Insert cell
Insert cell
Insert cell
pachinko
(
randomNegativeBinomial
(
r0
,
p0
)
)
Insert cell
Insert cell
Insert cell
function
randomNegativeBinomial
(
r
,
p
)
{
var
g
=
d3r
.
randomGamma
(
r
,
(
1
-
p
)
/
p
)
;
return
function
(
)
{
return
d3r
.
randomPoisson
(
g
(
)
)
(
)
;
}
}
Insert cell
Insert cell
Insert cell
pachinko
(
randomSkellam
(
lambda1
,
lambda2
)
)
Insert cell
Insert cell
Insert cell
function
randomSkellam
(
l1
,
l2
)
{
var
L1
=
d3r
.
randomPoisson
(
l1
)
,
L2
=
d3r
.
randomPoisson
(
l2
)
;
return
function
(
)
{
return
L1
(
)
-
L2
(
)
;
}
}
Insert cell
Insert cell
pachinko
(
randomLogarithmicSeries
(
p1
)
,
[
1
,
100
]
)
Insert cell
Insert cell
function
randomLogarithmicSeries
(
p
)
{
p
=
1
-
p
;
return
function
(
)
{
return
Math
.
ceil
(
Math
.
log1p
(
-
Math
.
random
(
)
)
/
Math
.
log1p
(
-
(
p
**
(
1
-
Math
.
random
(
)
)
)
)
)
;
}
}
Insert cell
Insert cell
pachinko
(
randomZeta
(
a0
)
,
[
1
,
20
]
)
Insert cell
Insert cell
function
randomZeta
(
a
)
{
var
c
=
Math
.
expm1
(
-
a
*
Math
.
LN2
)
,
r
=
1
/
-
a
;
return
function
(
)
{
do
{
var
x
=
Math
.
floor
(
Math
.
random
(
)
**
r
)
,
t
=
Math
.
expm1
(
-
a
*
Math
.
log1p
(
1
/
x
)
)
;
}
while
(
Math
.
random
(
)
*
x
*
t
<
c
)
;
return
x
;
}
}
Insert cell
Insert cell
pachinko
(
randomYuleSimon
(
rho0
)
,
[
1
,
100
]
)
Insert cell
Insert cell
function
randomYuleSimon
(
rho
)
{
rho
=
1
/
rho
;
return
function
(
)
{
return
d3r
.
randomGeometric
(
1
-
Math
.
random
(
)
**
rho
)
(
)
;
}
}
Insert cell
Insert cell
Insert cell
Insert cell
Purpose-built for displays of data
Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
r0
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
p0
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
randomNegativeBinomial
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lambda1
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
lambda2
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
randomSkellam
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
p1
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
randomLogarithmicSeries
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
a0
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
randomZeta
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
rho0
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
randomYuleSimon
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
d3r
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML