File:1d6 choisi parmi n.svg
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
![File:1d6 choisi parmi n.svg](https://upload.wikimedia.org/wikipedia/commons/thumb/0/0d/1d6_choisi_parmi_n.svg/495px-1d6_choisi_parmi_n.svg.png?20131105135043)
Size of this PNG preview of this SVG file: 495 × 448 pixels. Other resolutions: 265 × 240 pixels | 530 × 480 pixels | 849 × 768 pixels | 1,131 × 1,024 pixels | 2,263 × 2,048 pixels.
Original file (SVG file, nominally 495 × 448 pixels, file size: 54 KB)
File information
Structured data
Captions
Captions
Add a one-line explanation of what this file represents
Summary
[edit]Description1d6 choisi parmi n.svg |
English: Probability for the best six-sided die chosen amongst n (1 to 5).
Français : robabilité pour un dé à six faces choisi parmi n (de 1 à 5). |
Date | |
Source | Own work |
Author | Christophe Dang Ngoc Chan (Cdang ) |
Other versions | subsets: 1d6 choisi parmi n fonction de densite.svg, 1d6 choisi parmi n fonction de masse.svg |
SVG development InfoField | ![]() This W3C-invalid vector image was created with Scilab by cdang. ![]() This file uses embedded text that can be easily translated using a text editor. |
Source code InfoField | Scilab source codeclear; clf;
nbmax = 5;
resultat = zeros(6^nbmax, nbmax); // initialisation
for i = 1:nbmax // colonne
serie = 6^(nbmax - i);
nbseries = 6^(i - 1);
for j = 1:nbseries
init = 6*serie*(j - 1) + 1;
for k = 1:6
i0 = init + (k - 1)*serie;
resultat(i0:i0 + serie - 1, i) = k;
end
end
end
// sélection du meilleur dé
meilleur = zeros(resultat);
for i = 1:nbmax
meilleur(:, i) = max(resultat(:, 1:i), "c");
end
// frequences
freq1d = tabul(meilleur(:, 1), "i");
freq2d = tabul(meilleur(:, 2), "i");
freq3d = tabul(meilleur(:, 3), "i");
freq4d = tabul(meilleur(:, 4), "i");
freq5d = tabul(meilleur(:, 5), "i");
// normalisation
freq1d(:, 2) = 100*freq1d(:, 2)/sum(freq1d(:, 2));
freq2d(:, 2) = 100*freq2d(:, 2)/sum(freq2d(:, 2));
freq3d(:, 2) = 100*freq3d(:, 2)/sum(freq3d(:, 2));
freq4d(:, 2) = 100*freq4d(:, 2)/sum(freq4d(:, 2));
freq5d(:, 2) = 100*freq5d(:, 2)/sum(freq5d(:, 2));
cumul1d = freq1d();
cumul1d(:, 2) = cumsum(freq1d(:, 2));
cumul2d = freq2d();
cumul2d(:, 2) = cumsum(freq2d(:, 2));
cumul3d = freq3d();
cumul3d(:, 2) = cumsum(freq3d(:, 2));
cumul4d = freq4d();
cumul4d(:, 2) = cumsum(freq4d(:, 2));
cumul5d = freq5d();
cumul5d(:, 2) = cumsum(freq5d(:, 2));
// Tracé
subplot(2, 1, 1)
plot2d(freq1d(:, 1), freq1d(:, 2), style = 1)
plot2d(freq2d(:, 1), freq2d(:, 2), style = 2)
plot2d(freq3d(:, 1), freq3d(:, 2), style = 3)
plot2d(freq4d(:, 1), freq4d(:, 2), style = 4)
plot2d(freq5d(:, 1), freq5d(:, 2), style = 5)
legend(["1d6" ; "2d6" ; "3d6" ; "4d6" ; "5d6"], "in_upper_left");
xtitle("Fréquence (probabilité d''obtenir une valeur)", "résultat",...
"probabilité (%)")
subplot(2, 1, 2)
plot2d(cumul1d(:, 1), cumul1d(:, 2), style = 1)
plot2d(cumul2d(:, 1), cumul2d(:, 2), style = 2)
plot2d(cumul3d(:, 1), cumul3d(:, 2), style = 3)
plot2d(cumul4d(:, 1), cumul4d(:, 2), style = 4)
plot2d(cumul5d(:, 1), cumul5d(:, 2), style = 5)
legend(["1d6" ; "2d6" ; "3d6" ; "4d6" ; "5d6"], "in_upper_left");
xtitle("Fréquence cumulées (probabilité de faire moins qu''une valeur)",...
"résultat", "probabilité (%)")
|
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following licenses:
![]() |
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.http://www.gnu.org/copyleft/fdl.htmlGFDLGNU Free Documentation Licensetruetrue |
![w:en:Creative Commons](https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/CC_some_rights_reserved.svg/90px-CC_some_rights_reserved.svg.png)
![attribution](https://upload.wikimedia.org/wikipedia/commons/thumb/1/11/Cc-by_new_white.svg/24px-Cc-by_new_white.svg.png)
![share alike](https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Cc-sa_white.svg/24px-Cc-sa_white.svg.png)
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/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 13:50, 5 November 2013 | ![]() | 495 × 448 (54 KB) | Cdang (talk | contribs) | {{Information |Description={{en|1=Probability for the best six-sided die chosen amongst ''n'' (1 to 5).}} {{fr|1=robabilité pour un dé à six faces choisi parmi ''n'' (de 1 à 5).}} |Source={{own}} |Date=2013-11-05 |Author= Christophe Dang Ngoc Chan ... |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Short title | Meilleur dé choisi parmi n |
---|---|
Width | 495 |
Height | 448 |