File:CovrarianceCorrelation.svg
From Wikipedia, the free encyclopedia
![Datoteka:CovarianceCorrelation.svg](http://upload.wikimedia.org/wikipedia/commons/thumb/f/fa/CovarianceCorrelation.svg/800px-CovarianceCorrelation.svg.png)
Veličina ovog PNG pregleda za ovu SVG datoteku: 800 × 365 piksela. Ostale rezolucije: 320 × 146 piksela | 640 × 292 piksela | 1.024 × 467 piksela | 1.280 × 584 piksela | 2.560 × 1.168 piksela | 1.260 × 575 piksela.
Izvorna datoteka (SVG datoteka, nominalno 1.260 × 575 piksela, veličina datoteke: 3,03 MB)
![]() | Ova datoteka je s Wikimedia Commonsa. Opis s njene stranice opisa datoteke prikazan je ispod. Commons je skladište slobodnih medija i datoteka za sve projekte fondacije Wikimedia. Možete i Vi pomoći. |
OpisCovarianceCorrelation.svg |
English: added covariance values to the plot of File:Correlation_examples.png using vector graphics (SVG file) |
Datum | (UTC) |
Izvor | |
Autor |
|
This is a retouched picture, which means that it has been digitally altered from its original version. The original can be viewed here: Correlation examples2.svg: ![]()
|
#Title: An example of the correlation of x and y for various distributions of (x,y) pairs
#Tags: Mathematics; Statistics; Correlation
#Author: Denis Boigelot
#Packets needed : mvtnorm (rmvnorm), RSVGTipsDevice (devSVGTips)
#How to use: output()
#
#This is an translated version in R of an Matematica 6 code by Imagecreator.
library(mvtnorm)
library(RSVGTipsDevice)
MyPlot <- function(xy, xlim = c(-4, 4), ylim = c(-4, 4), eps = 1e-15) {
title = round(cor(xy[,1], xy[,2]), 1)
if (sd(xy[,2]) < eps) title = "" # corr. coeff. is undefined
plot(xy, main = title, xlab = "", ylab = "",
col = "darkblue", pch = 16, cex = 0.2,
xaxt = "n", yaxt = "n", bty = "n",
xlim = xlim, ylim = ylim)
}
MvNormal <- function(n = 1000, cor = 0.8) {
for (i in cor) {
sd = matrix(c(1, i, i, 1), ncol = 2)
x = rmvnorm(n, c(0, 0), sd)
MyPlot(x)
}
}
rotation <- function(t, X) return(X %*% matrix(c(cos(t), sin(t), -sin(t), cos(t)), ncol = 2))
RotNormal <- function(n = 1000, t = pi/2) {
sd = matrix(c(1, 1, 1, 1), ncol = 2)
x = rmvnorm(n, c(0, 0), sd)
for (i in t)
MyPlot(rotation(i, x))
}
Others <- function(n = 1000) {
x = runif(n, -1, 1)
y = 4 * (x^2 - 1/2)^2 + runif(n, -1, 1)/3
MyPlot(cbind(x,y), xlim = c(-1, 1), ylim = c(-1/3, 1+1/3))
y = runif(n, -1, 1)
xy = rotation(-pi/8, cbind(x,y))
lim = sqrt(2+sqrt(2)) / sqrt(2)
MyPlot(xy, xlim = c(-lim, lim), ylim = c(-lim, lim))
xy = rotation(-pi/8, xy)
MyPlot(xy, xlim = c(-sqrt(2), sqrt(2)), ylim = c(-sqrt(2), sqrt(2)))
y = 2*x^2 + runif(n, -1, 1)
MyPlot(cbind(x,y), xlim = c(-1, 1), ylim = c(-1, 3))
y = (x^2 + runif(n, 0, 1/2)) * sample(seq(-1, 1, 2), n, replace = TRUE)
MyPlot(cbind(x,y), xlim = c(-1.5, 1.5), ylim = c(-1.5, 1.5))
y = cos(x*pi) + rnorm(n, 0, 1/8)
x = sin(x*pi) + rnorm(n, 0, 1/8)
MyPlot(cbind(x,y), xlim = c(-1.5, 1.5), ylim = c(-1.5, 1.5))
xy1 = rmvnorm(n/4, c( 3, 3))
xy2 = rmvnorm(n/4, c(-3, 3))
xy3 = rmvnorm(n/4, c(-3, -3))
xy4 = rmvnorm(n/4, c( 3, -3))
MyPlot(rbind(xy1, xy2, xy3, xy4), xlim = c(-3-4, 3+4), ylim = c(-3-4, 3+4))
}
output <- function() {
devSVGTips(width = 7, height = 3.2) # remove first and last line for no svg exporting
par(mfrow = c(3, 7), oma = c(0,0,0,0), mar=c(2,2,2,0))
MvNormal(800, c(1.0, 0.8, 0.4, 0.0, -0.4, -0.8, -1.0));
RotNormal(200, c(0, pi/12, pi/6, pi/4, pi/2-pi/6, pi/2-pi/12, pi/2));
Others(800)
dev.off() # remove first and last line for no svg exporting
}
Ja, vlasnik autorskog prava ovog djela, ovdje ga objavljujem pod sljedećom licencom:
![]() ![]() |
Ova datoteka je dostupna pod licencom Creative Commons CC0 1.0 Univerzalnom Posvetom Javne Domene. |
Osoba koja je učestvovala u radu na ovom dokumentu posvetila je rad javnoj domeni odricanjem od svih svojih prava na taj rad širom svijeta po zakonu o autorskim pravima i svim povezanim zakonskim pravima koja bi imao/imala, u mjeri dopuštenoj zakonom. Možete kopirati, mijenjati, distribuirati i prilagođavati rad, čak i u komercijalne svrhe, bez traženja dopuštenja.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Originalni zapisnik postavljanja
This image is a derivative work of the following images:
- File:Correlation_examples2.svg licensed with Cc-zero
- 2011-05-10T06:00:35Z DenisBoigelot 506x231 (2285771 Bytes) {{Information |Description ={{en|1=fd}} |Source ={{own}} |Author =[[User:DenisBoigelot|DenisBoigelot]] |Date = |Permission = |other_versions = }} fjdk
Uploaded with derivativeFX
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
prikazuje
Creative Commons CC0 License engleski
27 august 2011
media type engleski
image/svg+xml
checksum engleski
93e247f79949884233d4ef5337a46e69a4d5ceaa
data size engleski
3.175.815 Bajt
575 piksel
1.260 piksel
Historija datoteke
Kliknite na datum/vrijeme da vidite verziju datoteke iz tog vremena.
Datum/vrijeme | Smanjeni pregled | Dimenzije | Korisnik | Komentar | |
---|---|---|---|---|---|
trenutno | 10:42, 27 august 2011 | ![]() | 1.260 × 575 (3,03 MB) | Sigbert | {{Information |Description={{en|1= added covariance values to the plot of File:Correlation_examples.png using vector graphics (SVG file)}} |Source=*File:Correlation_examples2.svg |Date=2011-08-27 08:39 (UTC) |Author=*[[:File:Correlation_example |
Upotreba datoteke
Nema stranica koje koriste ovu datoteku.
Globalna upotreba datoteke
Sljedeći wikiji koriste ovu datoteku:
- Upotreba na de.wikipedia.org
Metapodaci
Ova datoteka sadržava dodatne podatke koje je vjerovatno dodala digitalna kamera ili skener u procesu snimanja, odnosno digitalizacije. Ako je datoteka mijenjana, podaci možda nisu u skladu sa stvarnim stanjem.
Širina | 1008pt |
---|---|
Visina | 460pt |