English: 100 visualizations of an empirical distribution function, generated using JavaScript. The grey bars show the samples corresponding to the ECDF and the green curve is the theoretical distribution from which the samples have been drawn.
These graphs were generated using the following HTML/JavaScript code. It uses File:ECDF-0.png—a blank graph, blue.png—a single blue pixel, and grey.png—a single grey pixel. For more information contact nagualdesign:
<!DOCTYPEhtml><htmllang="en"><head><script>functiongaussian(){// Generate a random number; mean=0, standard deviation=1returnMath.sqrt(-2*Math.log(Math.random()))*Math.cos((2*Math.PI)*Math.random());}functionrun(){// Set number of graphs, samples per graph, number of columnsvargraphs=100,samples=20,columns=10,content='',s=newArray;for(set=0;set<graphs;set++){// Generate a set of samples, scaled from -100 to +100s[set]=newArray;for(sample=0;sample<samples;sample++)s[set][sample]=Math.round(gaussian()*25);// Sort samples into ascending orders[set].sort(function(a,b){returna-b});// Display blank graphvaroffsetX=(set-(columns*Math.floor(set/columns)))*250,offsetY=Math.floor(set/columns)*250;content+='<img src="ECDF-0.png" style="position:absolute; top:'+offsetY+'px; left:'+offsetX+'px; z-index:-1;">';for(sample=0;sample<samples;sample++){// Step function 'tread'content+='<img src="blue.png" width="'+(1+Math.abs(s[set][sample-1]-s[set][sample]))+'px" height="1px" style="position:absolute; top:'+(210+offsetY-((200/samples)*sample))+'px; left:'+(s[set][sample-1]+139+offsetX)+'px;">';// Step function 'riser'content+='<img src="blue.png" width="1px" height="'+(200/samples)+'px" style="position:absolute; top:'+(211+offsetY-((200/samples)*(sample+1)))+'px; left:'+(s[set][sample]+139+offsetX)+'px;">';// Display samplescontent+='<img src="grey.png" width="1px" height="9px" style="position:absolute; top:'+(201+offsetY)+'px; left:'+(s[set][sample]+139+offsetX)+'px;">';}}document.body.innerHTML=content;}</script></head><bodyonLoad="run();"></body></html>
Conditions d’utilisation
Public domainPublic domainfalsefalse
Moi, propriétaire des droits d’auteur sur cette œuvre, la place dans le domaine public. Ceci s'applique dans le monde entier. Dans certains pays, ceci peut ne pas être possible ; dans ce cas : J’accorde à toute personne le droit d’utiliser cette œuvre dans n’importe quel but, sans aucune condition, sauf celles requises par la loi.
Légendes
Ajoutez en une ligne la description de ce que représente ce fichier
== {{int:filedesc}} == {{Information |Description={{en|1=100 visualizations of an empirical distribution function, generated using JavaScript. The grey bars show the samples corresponding to the ECDF and the green...