File:Simpsons-vector.svg

From Wikimedia Commons, the free media repository

Jump to: navigation, search

Simpsons-vector.svg(SVG file, nominally 430 × 430 pixels, file size: 10 KB)

[edit] Summary

Description

Illustration of w:Simpson's paradox applied to vectors

Date

26 August 2007(2007-08-26)

Source

Own work

Author

User:Schutz

Permission
(Reusing this image)

see below

The graphic was created by User:Schutz for Wikipedia on 26 August 2007, using the R statistical project. The program that generated and exported the graphic is given below; the uploaded version was generated by converting the EPS file generated by R to SVG format using pstoedit command. The layout was slightly modified using Inkscape before upload.

 success1 <- c( 8, 1)
 total1   <- c(10,10)
 success2 <- c( 6, 3)
 total2   <- c( 6,17)
 
 printaddvec <- function( vec1, vec2, ...) {
   segments( vec1[1], vec1[2], vec1[1]+vec2[1], vec1[2]+vec2[2], lty=3, ... )
   segments( vec2[1], vec2[2], vec1[1]+vec2[1], vec1[2]+vec2[2], lty=3, ... )
 
   arrows(0,0, vec1[1], vec1[2], angle=20, code=2, lwd=2, ...)
   arrows(0,0, vec2[1], vec2[2], angle=20, code=2, lwd=2, ...)
   arrows(0,0, vec1[1]+vec2[1], vec1[2]+vec2[2], angle=20, code=2,
          lwd=2, lty=2, ...)
 
   # Redraw the end of the arrows
   arrows(0.99*(vec1[1]+vec2[1]), 0.99*(vec1[2]+vec2[2]),
          vec1[1]+vec2[1], vec1[2]+vec2[2], code=2, lwd=2, angle=20, ...)
 }
 
 postscript("simpsons-vector.eps", paper="special", height=5, width=5,
            horizontal=F)
 par(xaxs="i")
 par(yaxs="i")
 par(cex=1.2)
 par(las=1)
 par(mgp=c(2.5 ,1 ,0))
 par(mar=c(4.1, 4.1, 0.6, 0.6))
 
 plot(0, type="n", xlim=c(0,25), ylim=c(0,10), pty="s", xlab="Total", ylab="Successes")
 
 printaddvec( c(total1[1], success1[1]), c(total1[2], success1[2]), col="blue")
 printaddvec( c(total2[1], success2[1]), c(total2[2], success2[2]), col="red")
 
 text(total1[2], success1[2]+0.0, "1", pos=4, col="blue", cex=1.2)
 text(total2[2], success2[2]+0.0, "1", pos=4, col="red",  cex=1.2)
 text(total1[1]+0.0, success1[1], "2", pos=3, col="blue", cex=1.2)
 text(total2[1]+0.0, success2[1], "2", pos=3, col="red",  cex=1.2)
 text(sum(total1), sum(success1)+0.0, "+", pos=3, col="blue", cex=1.2)
 text(sum(total2), sum(success2)+0.0, "+", pos=3, col="red", cex=1.2)
 
 dev.off()

[edit] Licensing

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".

Afrikaans | Alemannisch | Aragonés | العربية | Asturianu | Беларуская | Беларуская (тарашкевіца) | Български | বাংলা | ইমার ঠার/বিষ্ণুপ্রিয়া মণিপুরী | Brezhoneg | Bosanski | Català | Cebuano | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | فارسی | Suomi | Français | Gaeilge | Galego | עברית | Hrvatski | Magyar | Հայերեն | Bahasa Indonesia | Ido | Íslenska | Italiano | 日本語 | ქართული | ភាសាខ្មែរ | 한국어 | Kurdî / كوردی | Latina | Lëtzebuergesch | Lietuvių | 文言 | Македонски | Bahasa Melayu | Malti | Nnapulitano | Plattdüütsch | Nederlands | ‪Norsk (nynorsk)‬ | ‪Norsk (bokmål)‬ | Occitan | Polski | Português | Română | Русский | Slovenčina | Slovenščina | Shqip | Српски / Srpski | Svenska | Kiswahili | తెలుగు | ไทย | Tagalog | Türkçe | Українська | اردو | Vèneto | Tiếng Việt | Volapük | Yorùbá | 中文 | ‪中文(简体)‬ | ‪中文(繁體)‬ | +/−

Creative Commons license
Creative Commons Attribution iconCreative Commons Share Alike icon
This file is licensed under the Creative Commons Attribution ShareAlike 3.0, Attribution ShareAlike 2.5, Attribution ShareAlike 2.0 and Attribution ShareAlike 1.0 License. In short: you are free to share and make derivative works of the file under the conditions that you appropriately attribute it, and that you distribute it only under a license identical to this one. Official license.

Afrikaans | Беларуская | Беларуская (тарашкевіца) | Български | Català | Česky | Dansk | Deutsch | Ελληνικά | English | Esperanto | Español | Eesti | Euskara | Estremeñu | Suomi | Français | עברית | Hrvatski | Հայերեն | Italiano | 日本語 | 한국어 | Lietuvių | Македонски | Plattdüütsch | Nederlands | ‪Norsk (bokmål)‬ | Occitan | Polski | Piemontèis | Português | Română | Русский | Slovenčina | ไทย | Vèneto | Tiếng Việt | 中文 | ‪中文(简体)‬ | ‪中文(繁體)‬ | +/−

You may select the license of your choice.


Rlogo.png

This chart was created with R.

File history

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

Date/TimeThumbnailDimensionsUserComment
current15:46, 26 August 2007Thumbnail for version as of 15:46, 26 August 2007430×430 (10 KB)Schutz (talk | contribs) ({{Information |Description=Illustration of w:Simpson's paradox applied to vectors |Source=self-made |Date=26 August 2007 |Author=User:Schutz |Permission=see below }} The graphic was created by User:Schutz for Wikipedia on 26 August 2007, usin)

The following page links to this file:

Global file usage

The following other wikis use this file: