File:Coeficiente de variación.svg

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

Original file(SVG file, nominally 677 × 618 pixels, file size: 140 KB)

Captions

Captions

Coeficiente de variación igual entre dos distribuciones, en la misma gráfica y en gráficas individuales cuando la desviación estándar es proporcional a la media.

Summary[edit]

Description
Español: En la gráfica superior, se muestran dos distribuciones de frecuencias en las que ambas tienen el mismo coeficiente de variación pero diferentes medias y desviaciones estándar. Las mismas distribuciones aparecen abajo con diferentes escalas pero se muestra la misma dispersión de datos debido al cambio de escala en la abscisa. El código R para las dos gráficas es como sigue:
#Gráfica 1:
svg("CV2.svg",width = 8, height = 4)
set.seed(3)
cv = 25
media = 40
sd = media*cv/100
c1 <- rgb(173,216,230,max = 255, alpha = 80, names = "lt.blue")
c2 <- rgb(255,192,203, max = 255, alpha = 80, names = "lt.pink")
normals = rnorm(1000, mean=media, sd=sd)
h1a <- hist(normals, breaks=15, prob=FALSE, 
  ylim=c(0,250),
  xlim=c(0,media3*sd),
  main="Dos distribuciones con el mismo coeficiente de variación",
  ylab="Frecuencia",
  xlab="longitud", plot=FALSE)
cv2 = 25
media2 = 80
sd2 = media2*cv2/100 
normals2 = rnorm(1000, mean=media2, sd=sd2)
h2a <- hist(normals2, breaks=10, prob=FALSE, 
  ylim=c(0,250),
  xlim=c(0,140),
  main="Dos distribuciones con el mismo coeficiente de variación",
  ylab="Frecuencia",
  xlab="Longitud",plot=FALSE)
plot(h1a,xlim=c(0,140),main="Dos distribuciones con el mismo coeficiente de variación",
  ylab="Frecuencia",
  xlab="Longitud", col=c1)
plot(h2a, add=TRUE, col=c2)
curve(dnorm(x,media,sd)*diff(h1a$mids[1:2])*length(normals), from=media-3*sd, to = media+3*sd,
  col="darkblue", lwd=2,
  add=TRUE,
  yaxt="n")
curve(dnorm(x,media2,sd2)*diff(h2a$mids[1:2])*length(normals2), from=media2-3*sd2, to = media2+3*sd2,
  col="darkblue", lwd=2,
  add=TRUE,
  yaxt="n")
text(10,175,"CV=25%\nMedia=40\nDS=10",cex=1)
text(120,175,"CV=25%\nMedia=80\nDS=20",cex=1)
dev.off()


#Gráfica 2:
svg("CV.svg",width = 8, height = 4)
set.seed = 1
c1 <- rgb(173,216,230,max = 255, alpha = 80, names = "lt.blue")
c2 <- rgb(255,192,203, max = 255, alpha = 80, names = "lt.pink")
cv = 25
media = 40
sd = media*cv/100
par(mfrow=c(1,2))
normals = rnorm(1000, mean=media, sd=sd)
h <- hist(normals, breaks=15, prob=FALSE, 
  ylim=c(0,250),
  xlim=c(0,media+3*sd),
  main="",
  ylab="Frecuencia",
  xlab="Longitud",col=c1)
curve(dnorm(x,media,sd)*diff(h$mids[1:2])*length(normals), from=media-3*sd, to = media+3*sd,
  col="darkblue", lwd=2,
  add=TRUE,
  yaxt="n")
print("desviación estándar")   
sd(normals)
print("coeficiente de variación")
sd(normals)/mean(normals)
text(10,200,"CV=25%\nMedia=40\nDS=10",cex=1)
cv = 25
media = 80
sd = media*cv/100 
normals = rnorm(1000, mean=media, sd=sd)
h <- hist(normals, breaks=10, prob=FALSE, 
  ylim=c(0,250),
  xlim=c(0,media+3*sd),
  main="",
  ylab="Frecuencia",
  xlab="Longitud",col=c2)
curve(dnorm(x,media,sd)*diff(h$mids[1:2])*length(normals), from=media-3*sd, to = media+3*sd,
  col="darkblue", lwd=2,
  add=TRUE,
  yaxt="n")
print("desviación estándar")   
sd(normals)
print("coeficiente de variación")
sd(normals)/mean(normals)
text(20,200,"CV=25%\nMedia=80\nDS=20",cex=1)
dev.off()
Date  Edit this at Structured Data on Commons
Source Own work Edit this at Structured Data on Commons
Author Smelgar Edit this at Structured Data on Commons

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 4.0 International 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.

File history

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

Date/TimeThumbnailDimensionsUserComment
current01:24, 8 August 2021Thumbnail for version as of 01:24, 8 August 2021677 × 618 (140 KB)Smelgar (talk | contribs)Se agregó el 100 en la gráfica inferior derecha y se movió el texto de la segunda gráfica
16:42, 7 August 2021Thumbnail for version as of 16:42, 7 August 2021677 × 618 (139 KB)Smelgar (talk | contribs)Se cambió los colores y se volvió transparente el fondo
14:38, 6 August 2021Thumbnail for version as of 14:38, 6 August 2021720 × 719 (150 KB)Smelgar (talk | contribs)Se agregó otro título
14:30, 6 August 2021Thumbnail for version as of 14:30, 6 August 2021720 × 719 (150 KB)Smelgar (talk | contribs)Se corrigió el título
14:26, 6 August 2021Thumbnail for version as of 14:26, 6 August 2021720 × 719 (150 KB)Smelgar (talk | contribs)Se corrigieron números y títulos
04:22, 6 August 2021Thumbnail for version as of 04:22, 6 August 2021720 × 719 (120 KB)Smelgar (talk | contribs)Se corrigió la leyenda de las gráficas.
04:14, 6 August 2021Thumbnail for version as of 04:14, 6 August 2021720 × 719 (126 KB)Smelgar (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata