File:Somme tirage 1 a 6d6 et loi normale.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Original file(SVG file, nominally 609 × 446 pixels, file size: 110 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Convergence of the sum of nd6 towards a normal distribution (central limit theorem).
Français : Convergence de la somme de nd6 vers une loi normale (théorème central limite).
Date
Source Own work
Author Christophe Dang Ngoc Chan (Cdang (talk))
Other versions see also File:Somme n tirages d6 1 a 5.svg

Scilab source

// Trace la fonction de densité de n tirages de dés à 6 faces
// et la loi normale selon le théorème central limite
 
// initialisation
 
clear;
clf;
 
nbmax = 6; // nombre max de tirages
 
cmap = [coolcolormap(nbmax); 0, 0, 0];
xset("colormap", cmap);
 
// Fonctions
 
function [frequences]=tirages(n)
    // calcule les fréquences de n tirage de dés par dénombrement
    // entrées : n : nombre de tirages (entier)
    // sorties : frequences : matrice de fréquences (réels)
 
    N = 6^n; // nombre de valeurs possibles
    resultats = zeros(N, n); // initialisation : résultats des tirages
    for i = 1:n // n° de colonne
        k = 6^(n - i); //à la colonne i : k valeurs 1, puis k valeurs 2...
        for j=0:6^(i - 1) - 1
            for jj = 1:6
                resultats((6*j + jj - 1)*k + 1:(6*j + jj)*k, i) = jj;
            end
        end
    end
    //disp(resultats);
    somme = sum(resultats, "c");
    frequences_non_triees = tabul(somme);
    frequences = gsort(frequences_non_triees, "lr", "i");
    frequences(:,2) = frequences(:,2)/N; // normalisation des fréquences
endfunction

// Programme principal

mu0 = mean(1:6);
sigma0 = st_deviation(1:6);

for i=1:nbmax
    XY = tirages(i);
    sigma = sigma0*sqrt(i);
    mu = i*mu0;
    x = 0:0.25:XY($, 1);
    y = pdfnormal(x, mu, sigma);
    subplot(2, 3, i)
    plot2d(x, y, style = nbmax+1)
    plot2d3(XY(:, 1), XY(:, 2), style = i)
    titre = string(i)+"d6";
    xtitle(titre, "valeur", "fréquence")
end

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:29, 5 November 2013Thumbnail for version as of 12:29, 5 November 2013609 × 446 (110 KB)Cdang (talk | contribs)One more case. Parameters of the normal law calculated from the central limit theorem and not from the data.
09:21, 5 November 2013Thumbnail for version as of 09:21, 5 November 2013605 × 455 (89 KB)Cdang (talk | contribs){{Information |Description={{en|1=Convergence of the sum of ''n''d6 towards a normal distribution (central limit theorem).}} {{fr|1=Convergence de la somme de ''n''d6 vers une loi normale (théorème central limite).}} |Source={{own}} |Date=2013-11-05 ...

The following page uses this file:

File usage on other wikis

The following other wikis use this file:

Metadata