Scalar functions
normalDistribution
Commentary
added in 0.0.5
Generates numbers according to a normal distribution curve.
Examples
Generating decimal numbers
By default, this function generates floating point numbers.
{
"_gen": "normalDistribution",
"mean": 100,
"sd": 20
}
[
90.3437021801637,
136.73744143627005,
96.85045951912724,
109.4959706048278,
106.17583310778141
]
Generating integers
Use the decimals
function modifier to generate integers.
{
"_gen": "normalDistribution",
"mean": 500,
"sd": 15,
"decimals": 0
}
[
500,
468,
505,
519,
480
]
Specification
JSON schema
{
"type": "object",
"properties": {
"mean": {
"oneOf": [
{
"type": "number"
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
},
"sd": {
"oneOf": [
{
"type": "number"
},
{
"type": "object",
"properties": {
"_gen": {
"type": "string"
}
},
"required": [
"_gen"
]
}
]
},
"decimals": {
"type": "integer",
"minimum": 0
}
},
"required": [
"mean",
"sd"
]
}