Created
October 17, 2025 19:29
-
-
Save wabarr/86f6ec6b00c051034b8acc945858772c to your computer and use it in GitHub Desktop.
netlogo reporter to report probability density for a given x in normal distribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| to-report prob-density [x mu sigma] | |
| ;reporter which returns the probablity density for a given value x | |
| ;in a normal distribution parametrized by mean = mu and standard deviation = sigma | |
| report (1 / (sigma * (sqrt (2 * pi)))) * (exp (-0.5 * ((x - mu) / sigma ) ^ 2)) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment