File:ECDF-100.png

頁面內容唔支援其他語言。
出自維基百科,自由嘅百科全書

原本檔案(2,500 × 2,500 像素,檔案大細:139 KB ,MIME類型:image/png

摘要

描述
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.
日期
來源 自己作品
作者 nagualdesign


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:

<!DOCTYPE html>
<html lang="en">
<head>
  <script>
    function gaussian() {
      // Generate a random number; mean=0, standard deviation=1
      return Math.sqrt(-2*Math.log(Math.random()))*Math.cos((2*Math.PI)*Math.random());    
    }

    function run() {
      // Set number of graphs, samples per graph, number of columns
      var graphs=100, samples=20, columns=10, content='', s=new Array;
      for (set=0; set<graphs; set++) {
        // Generate a set of samples, scaled from -100 to +100
        s[set]=new Array;
        for (sample=0; sample<samples; sample++) s[set][sample]=Math.round(gaussian()*25);

        // Sort samples into ascending order
        s[set].sort(function(a, b){return a-b});

        // Display blank graph
        var offsetX=(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 samples
          content+='<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>
<body onLoad="run();">
</body>
</html>

協議

Public domain I, the copyright holder of this work, release this work into the public domain. This applies worldwide.
In some countries this may not be legally possible; if so:
I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

圖中顯示嘅係

30 1 2018

檔案歷史

撳個日期/時間去睇響嗰個時間出現過嘅檔案。

日期/時間縮圖尺寸用戶註解
現時2018年2月6號 (二) 05:11響2018年2月6號 (二) 05:11嘅縮圖版本2,500 × 2,500(139 KB)NagualdesignImproved antialiasing.
2018年1月30號 (二) 13:46響2018年1月30號 (二) 13:46嘅縮圖版本2,500 × 2,500(143 KB)NagualdesignUpdated.
2018年1月30號 (二) 11:48響2018年1月30號 (二) 11:48嘅縮圖版本2,500 × 2,500(152 KB)Nagualdesign== {{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...

以下嘅1版用到呢個檔:

全域檔案使用情況

Metadata