ไฟล์:Largenumbers.svg

ไม่รองรับเนื้อหาของหน้าในภาษาอื่น
จากวิกิพีเดีย สารานุกรมเสรี

ดูภาพที่มีความละเอียดสูงกว่า((ไฟล์ SVG, 600 × 480 พิกเซล, ขนาดไฟล์: 25 กิโลไบต์))

เรนเดอร์ภาพนี้ใน
Wikimedia Commons logo รูปภาพหรือไฟล์เสียงนี้ ต้นฉบับอยู่ที่ คอมมอนส์ รายละเอียดด้านล่าง เป็นข้อความที่แสดงผลจาก ไฟล์ต้นฉบับในคอมมอนส์
คอมมอนส์เป็นเว็บไซต์ในโครงการสำหรับเก็บรวบรวมสื่อเสรี ที่ คุณสามารถช่วยได้

ความย่อ

 
W3C-validity not checked.
 
ไฟล์ภาพกราฟิกส์เวกเตอร์ไม่ได้ระบุการตรวจโดย W3C นี้ สร้างขึ้นโดยใช้ Gnuplot
คำอธิบาย
Català: Una il·lustració de la llei dels grans nombres, semblant a File:LLN_Die_Rolls.gif però utilitzant el format svg en comptes de gif. Això utilitza dades diferents i, per tant, sembla diferent. El codi font es troba a la secció següent. El codi està sota la mateixa "llicència" que l'obra en si.
English: An illustration of the w:law of large numbers, similar to File:LLN_Die_Rolls.gif but using the svg format instead of gif. This uses different data from that and hence it looks different. Source code is in the section below. The code is under the same "license" as the work itself.
วันที่ (UTC)
แหล่งที่มา งานของตัว
ผู้สร้างสรรค์ NYKevin
เวอร์ชันอื่น
Other related versions:File:LLN_Die_Rolls.gif
แปลไฟล์นี้

ไฟล์ SVG นี้มีข้อความที่สามารถแปลได้ โดยใช้เครื่องมือแปบภาษา SVG หรือใช้ตัวแก้ไข SVG ใดก็ได้ สำหรับข้อมูลเพิ่มเติม ดูที่เกี่ยวกับการแปลไฟล์

ไฟล์นี้แปลโดยใช้แท็ก SVG <switch> การแปลทั้งหมดนี้ถูกเก็บใว้ที่ไฟล์เดียวกันดูเพิ่มเติม...

ในการนำไฟล์นี้ไปใช้ในภาษาของคุณ (ถ้าพร้อมใชังาน) กรุณาใช้พารามิเตอร์ lang ตามด้วยรหัสภาษา เช่น [[File:Largenumbers.svg|lang=en]] สำหรับภาษาอังกฤษ

ในการแปลไฟล์นี้ไปเป็นภาษาของคุณ ลองใช้งานเครื่องมือแปลภาษา SVG หรืออีกวิธีโดยโหลดไฟล์ไปที่คอมพิวเตอร์ เพิ่มการแปลของคุณโดยใช้เครื่องมือที่คุณคุ้นชิน และอัพโหลดกลับอีกครั้งด้วยชื่อไฟล์เดียวกัน ถ้าไม่แน่ใจว่คุณควรจะทำเช่นไร ไปที่หน้าความช่วยเหลือที่กราฟิกแล็บ

Source code

Note that you will need to insert some paths. I've tried to make it obvious where to do so.

This code is all in the public domain (the cc0 waiver applies to it)

The code (in Java) which generated the data:

import java.io.*;
public class Main {
    public static void main(String[] args) {
        PrintStream output=null;
        try{
            output=new PrintStream("");//FIXME Insert a suitable path in the quote marks
        }catch(FileNotFoundException e){
            throw new RuntimeException(e);
        }
        //int diceValues[] = {0,0,0,0,0,0};//this variable may be uncommented and used for debugging
        double average=0;
        double total=0;
        output.println("#count average");//makes a header for the data; may be safely removed
        Random rnd=new Random(4124484382302655524l);
        //seed selected by trial and error
        for(int i=1;i<=1000;i++){
            int rand=rnd.nextInt(6);//now holds a random int from 0 to 5
            //diceValues[rand]++;//uncomment for debugging
            rand++;//convert to 1-indexed
            total+=rand;
            average=total/i;
            output.println(i+" "+(average));
        }
        //System.out.println(average);
    }

}

The gnuplot code:

set terminal svg
set output "OUTPUT PATH HERE"
set title "average dice value against number of rolls"
set xlabel "trials"
set ylabel "mean value"
plot [] [1:6] "PATH FROM JAVA CODE HERE" title "average" with lines, 3.5 title "y=3.5" with lines
#it is recommended that you copy and paste this code into a .plt file and run it in batch mode:
#If you must run this interactively, be sure to type "exit" or ^D (control-D) at the end,
#or gnuplot will leave off the </svg> closing tag.

MATLAB/Octave Source code

% Specify how many trials you want to run:
num_trials = 1000;

% Now grab all the dice rolls:
trials = randi(6, [1 num_trials]);

% Plot the results:
figure(1);

% Cumulative sum of the trial results divided by the index gives the
% average:
plot(cumsum(trials)./(1:num_trials), 'r-');

% Let's put a reference line at 3.5 just for fun (make the color a darker
% green as well):
hold on;
plot([1 num_trials], [3.5 3.5], 'color', [0 0.5 0]);

% Make it look pretty:
title('average dice value against number of rolls');
xlabel('trials');
ylabel('mean value');
legend('average', 'y=3.5');
axis([0 num_trials 1 6]);


การอนุญาตใช้สิทธิ

Creative Commons CC-Zero ไฟล์นี้มีให้ใช้ภายใต้ CC0 1.0 Universal Public Domain Dedication ของครีเอทีฟคอมมอนส์
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Annotations
InfoField
This image is annotated: View the annotations at Commons

คำบรรยายโดยย่อ

เพิ่มคำบรรยายทรรทัดเดียวเพื่อขยายความว่าไฟล์นี้มีอะไร

ไอเทมที่แสดงอยู่ในไฟล์นี้

ประกอบด้วย

ประวัติไฟล์

คลิกวันที่/เวลาเพื่อดูไฟล์ที่ปรากฏในขณะนั้น

วันที่/เวลารูปย่อขนาดผู้ใช้ความเห็น
ปัจจุบัน04:28, 1 กุมภาพันธ์ 2567รูปย่อสำหรับรุ่นเมื่อ 04:28, 1 กุมภาพันธ์ 2567600 × 480 (25 กิโลไบต์)ManlleusFile uploaded using svgtranslate tool (https://svgtranslate.toolforge.org/). Added translation for ca.
09:53, 3 กุมภาพันธ์ 2553รูปย่อสำหรับรุ่นเมื่อ 09:53, 3 กุมภาพันธ์ 2553600 × 480 (22 กิโลไบต์)NYKevinIn the interest of replicability, this one was generated using a known PRNG seed value. Will update Java source. Also, this one has axis labels!
06:53, 1 กุมภาพันธ์ 2553รูปย่อสำหรับรุ่นเมื่อ 06:53, 1 กุมภาพันธ์ 2553600 × 480 (21 กิโลไบต์)NYKevinBetter version, with better Java code (more precise). Will update source soon.
06:35, 1 กุมภาพันธ์ 2553รูปย่อสำหรับรุ่นเมื่อ 06:35, 1 กุมภาพันธ์ 2553600 × 480 (21 กิโลไบต์)NYKevinI mixed up x and y in the legend, will update gnuplot source code in a moment (already checked for svg closing tag).
06:08, 1 กุมภาพันธ์ 2553รูปย่อสำหรับรุ่นเมื่อ 06:08, 1 กุมภาพันธ์ 2553600 × 480 (21 กิโลไบต์)NYKevinApparently gnuplot forgot the <svg> closing tag?
06:06, 1 กุมภาพันธ์ 2553ไม่มีรูปย่อ (21 กิโลไบต์)NYKevinTrying again... looks like the last one had a problem?
06:04, 1 กุมภาพันธ์ 2553ไม่มีรูปย่อ (21 กิโลไบต์)NYKevin{{Information |Description={{en|1=An illustration of the w:law of large numbers, similar to File:LLN_Die_Rolls.gif but using the svg format instead of gif. This uses different data from that and hence it looks different. I will include source c

หน้าต่อไปนี้ โยงมาที่ภาพนี้:

การใช้ไฟล์ข้ามโครงการ

วิกิอื่นต่อไปนี้ใช้ไฟล์นี้:

ข้อมูลเกี่ยวกับภาพ