File:Monty Hall frequencies.svg

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

Original file(SVG file, nominally 630 × 630 pixels, file size: 58 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary[edit]

Description
English: Simulation of the Monty Hall problem, conditional (red) vs. unconditional (blue) frequencies
Deutsch: Simulation des Ziegenproblems, bedingte (rot) und unbedingte (blau) Häufigkeiten
Date
Source Own work
Author HilberTraum
SVG development
InfoField
 
The SVG code is valid.
 
This chart was created with R.
 
The file size of this SVG chart may be irrationally large because its text has been converted to paths inhibiting translations.
Source code
InfoField

R code

set.seed(452345)
 N <- 1000
 car <- sample(3, N, rep=TRUE)
 monty <- 2*(car==3) + 3*(car==2) + sample(2:3, N, rep=TRUE)*(car==1)
 
 M2 <- monty==2
 M3 <- monty==3
 C2 <- car==2
 C3 <- car==3
 
 cummean <- function(x) cumsum(x)/(1:length(x)) 
 
 svg()
 plot(c(1,N), c(0,1), type="n", xlab="Runde", ylab="rel. Häufigkeit")
 lines(which(M3), cummean(C2[M3]), col="red")
 lines(1:N, cummean(C2 & M3

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 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
current13:28, 27 February 2014Thumbnail for version as of 13:28, 27 February 2014630 × 630 (58 KB)HilberTraum (talk | contribs){{Information |Description ={{en|1=Simulation of the Monty Hall problem, conditional (blue) vs. unconditional (red) frequencies}} {{de|1=Simulation des Ziegenproblems, bedingte (blau) und unbedingte (rot) Häufigkeiten}} |Source ={{own}} |Au...

There are no pages that use this file.

File usage on other wikis

The following other wikis use this file:

Metadata