Distribution analysis tool


Note: This project uses alot of exotic new features like: HTML native templates, MutationObservers, CSS3 Transitions, classList, etc, so it requires an up-to-date browser like Firefox or Chromium ("is a" applies here, so Chrome counts as well)
It also stores your preferences using localStorage. (stupid EU law requires me to tell ya)


If you want to generate uniformly distributed random value between 0 and 1 in let's say JS, you can use Math.random(). Easy. If you want normally distributed number you can use Box-Muller transform. But what would the chart look like if I generated like 4000 normally distributed numbers using Box-Muller transform? Would it look like a bell curve or not?
Another question: What would the distribution of something like Math.pow(Math.random(), 2) look like? What about Math.random()+Math.random()?

If you're interested in questions above, this tool is for you. You will also see how Math.random()+Math.random() is different from 2*Math.random() :)
First, define a function or pick an existing one, then click on New Seed and see how the distribution really looks like. That simple!

When defining functions, write them in JS language. The main function will be named map, and should return values using the function put. To access a parameter named X from that function, use param['X']. To prevent unnecessary allocations, prefer using tmp.tmp to var tmp.


Transform function

Transform function:  

Function parameters:
NameTypeOptionsDefault value

Function code:

Parameters: 

Configuration

Numbers per frame:


Frame every[ms]:


Interpolation time:

Display settings

Display width:


Bar height:


Bar radius:


Bar spacing:


Bar gradient:

Bar background gradient:

Resolution:  , Max bar fill:  %

Generated 0 numbers.