1 Pages (10 items)
Normal/Gaussian Function or Method: Normal Probability Density - Messages
#1 Posted: 1/6/2023 7:08:49 PM
This matrix generator (thanks gUrrozEN) produces random 'equal-probability' values for a given center value and tolerance band.
I'm hoping to revise this to return values within a normal/Gaussian probability as illustrated:

Random to Normal.sm (42 KiB) downloaded 14 time(s).
Any thoughts?
I'm hoping to revise this to return values within a normal/Gaussian probability as illustrated:
Random to Normal.sm (42 KiB) downloaded 14 time(s).
Any thoughts?
#2 Posted: 1/6/2023 10:47:00 PM
WroteAny thoughts ?
Native Smath plugins generate uniform randoms.
The Central Theorem proves that enough uniform randoms
generate a Normal Distribution.
You simply need to bin in an histogram utility.
Is that is what you are looking for ?
Otherwise, I don't understand your request.
Cheers ... Jean.
#3 Posted: 1/7/2023 2:07:39 AM
Thank you for the reply Jean.
I'm after a method or function that will return a random value with the probability that 68.2% of the time it will be within 1 sigma, and 95.4% of the time it will be within 2 sigmas, etc.
I'm after a method or function that will return a random value with the probability that 68.2% of the time it will be within 1 sigma, and 95.4% of the time it will be within 2 sigmas, etc.
#4 Posted: 1/7/2023 4:13:06 AM
Hi. For 'convert' random uniform distributed numbers between 0 and 1 to another probability distribution, in your case, for get some normal distributed numbers you can use the inverses of the cdf distributions. You can check that here for 1000 numbers you have the desired mean and std deviation

so, I guess that in your function rmat this is the function for normal distributed numbers

random to nomral.sm (5 KiB) downloaded 21 time(s).
Best regards.
Alvaro.
so, I guess that in your function rmat this is the function for normal distributed numbers
random to nomral.sm (5 KiB) downloaded 21 time(s).
Best regards.
Alvaro.
1 users liked this post
Mark R Harris 1/7/2023 5:25:00 AM
#5 Posted: 1/7/2023 5:32:57 AM
#6 Posted: 1/7/2023 5:55:38 AM
Hi. I mean: substitute that M[i,j] into your rmat(...) function for get normal distributed numbers with the rmat algorithm instad uniform distributed ones.
Best regards.
Alvaro.
Best regards.
Alvaro.
1 users liked this post
Mark R Harris 1/7/2023 6:22:00 AM
#7 Posted: 1/7/2023 11:22:38 AM
WroteThank you for the reply Jean.
I'm after a method or function that will return a random value with the probability that 68.2% of the time it will be within 1 sigma, and 95.4% of the time it will be within 2 sigmas, etc.
I don't understand completely ... sorry.
However, from a native random sigma, you can solve for a desired other one.
Cheers, be good Down Under ... Jean.
Random NORMAL Histogram Copy.sm (44 KiB) downloaded 19 time(s).
#8 Posted: 1/7/2023 3:44:13 PM
Thank you both. Alvaro: perfect, thank you.
Here is the working update:

20230109 Random to Normal.sm (54 KiB) downloaded 29 time(s).
Here is the working update:
20230109 Random to Normal.sm (54 KiB) downloaded 29 time(s).
#9 Posted: 1/9/2023 1:41:49 AM
See the updated post above.
#10 Posted: 1/9/2023 12:44:09 PM
1 Pages (10 items)
-
New Posts
-
No New Posts