Maestría en Matemáticas Aplicadas-Universidad Autónoma de Guerrero, México
Probabilidad -Ph.D MARÍA GUZMÁN MARTÍNEZ

Distribuciones Discretas

Distribución Bernoulli

\[ f_X=p^x(1-p)^{1-x}I_{\{0,1\}} \] Parametro \(p\).

Parametros \(n\) y \(p\).

par(mfrow=c(3, 2))
x <- 0:1 
##
P1 <- dbinom(x=x, size=1, prob=0.001)
plot(x=x, y=P1, type='h', las=1,lwd=6)
##
P2 <- dbinom(x=x, size=1, prob=0.1)
plot(x=x, y=P2, type='h', las=1,lwd=6)
##
P3 <- dbinom(x=x, size=1, prob=0.5)
plot(x=x, y=P3, type='h', las=1,lwd=6)
##
P4 <- dbinom(x=x, size=1, prob=0.7)
plot(x=x, y=P4, type='h', las=1,lwd=6)
##
P5 <- dbinom(x=x, size=1, prob=0.9)
plot(x=x, y=P5, type='h', las=1,lwd=6)
##
P6 <- dbinom(x=x, size=1, prob=1)
plot(x=x, y=P6, type='h', las=1,lwd=6)

Distribución Binomial

\[ f_X(x;n,p)= \binom{n}{x}p^x(1-p)^{n-p}I_{\{0,1,..n\}}(x) \] Parametros \(n\) y \(p\).

par(mfrow=c(3, 2))
x <- 0:30 
##
P1 <- dbinom(x=x, size=30, prob=0.001)
plot(x=x, y=P1, type='h', las=1,lwd=6)
##
P2 <- dbinom(x=x, size=30, prob=0.1)
plot(x=x, y=P2, type='h', las=1,lwd=6)
##
P3 <- dbinom(x=x, size=30, prob=0.5)
plot(x=x, y=P3, type='h', las=1,lwd=6)
##
P4 <- dbinom(x=x, size=30, prob=0.7)
plot(x=x, y=P4, type='h', las=1,lwd=6)
##
P5 <- dbinom(x=x, size=30, prob=0.9)
plot(x=x, y=P5, type='h', las=1,lwd=6)
##
P6 <- dbinom(x=x, size=30, prob=1)
plot(x=x, y=P6, type='h', las=1,lwd=6)

Distribución Hipergeométrica

\[ f_X(x;M,K,n)= \frac{\binom{K}{x}\binom{M-K}{n-x}}{\binom{M}{n}}I_{\{0,1,..n\}}(x) \] dhyper(x,m,n,k,Log|FALSE)

par(mfrow=c(3, 2))
x <- 0:30 
##
ph1 <- dhyper(x,m=10,n=10,k=10)
plot(x=x, y=ph1, type='h', las=1,lwd=6)
##
ph2 <- dhyper(x,m=40,n=10,k=10)
plot(x=x, y=ph2, type='h', las=1,lwd=6)
##
ph3 <- dhyper(x,m=10,n=80,k=90)
plot(x=x, y=ph3, type='h', las=1,lwd=6)
##
ph4 <- dhyper(x,m=10,n=300,k=10)
plot(x=x, y=ph4, type='h', las=1,lwd=6)
##
ph5 <- dhyper(x,m=500,n=10,k=400)
plot(x=x, y=ph5, type='h', las=1,lwd=6)
##
ph6 <- dhyper(x,m=10,n=1000,k=200)
plot(x=x, y=ph6, type='h', las=1,lwd=6)

##

Distribución Poisson

\[ f_X(x;M,K,n)= \frac{e^{-\lambda}\lambda^x}{x!}I_{\{0,1,..\}}(x) \]

Parametro \(\lambda\)

par(mfrow=c(3, 2))
x <- 0:30 
##
Po1 <- dpois(x=x,1,log = FALSE)
plot(x=x, y=Po1, type='h', las=1,lwd=6)
##
Po2 <- dpois(x=x,5,log = FALSE)
plot(x=x, y=Po2, type='h', las=1,lwd=6)
##
Po3 <- dpois(x=x,10,log = FALSE)
plot(x=x, y=Po3, type='h', las=1,lwd=6)
##
Po4 <- dpois(x=x,20,log = FALSE)
plot(x=x, y=Po4, type='h', las=1,lwd=6)
##
Po5 <- dpois(x=x,30,log = FALSE)
plot(x=x, y=Po5, type='h', las=1,lwd=6)
##
Po6 <- dpois(x=x,40,log = FALSE)
plot(x=x, y=Po6, type='h', las=1,lwd=6)

Distribución Binomial negativa

\[ f_X(x;r,p)=\binom{r+x-1}{x}p^r(1-p)^x= \binom{-r}{x}p^r(p-1)^x I_{\{0,1,..\}}(x) \]

par(mfrow=c(3, 2))
x <- 0:30 
##
Po1 <- dnbinom(x, 10, 0.6, log = FALSE)
plot(x=x, y=Po1, type='h', las=1,lwd=6)
##
Po2 <- dnbinom(x, 10, 0.6, log = FALSE)
plot(x=x, y=Po2, type='h', las=1,lwd=6)
##
Po3 <- dnbinom(x, 10, 0.6, log = FALSE)
plot(x=x, y=Po3, type='h', las=1,lwd=6)
##
Po4 <- dnbinom(x, 10, 0.6, log = FALSE)
plot(x=x, y=Po4, type='h', las=1,lwd=6)
##
Po5 <- dnbinom(x, 10, 0.6, log = FALSE)
plot(x=x, y=Po5, type='h', las=1,lwd=6)
##
Po6 <- dnbinom(x, 10, 0.6, log = FALSE)
plot(x=x, y=Po6, type='h', las=1,lwd=6)

Distribución Geométrica

\[ f_X(x;p)=p(1-p)^xI\{0,1,..\}(x) \]

par(mfrow=c(3, 2))
x <- 0:30 
##
Po1 <- dgeom(x=x,.3,log = FALSE)
plot(x=x, y=Po1, type='h', las=1,lwd=6)
##
Po2 <- dgeom(x=x,.5,log = FALSE)
plot(x=x, y=Po2, type='h', las=1,lwd=6)
##
Po3 <- dgeom(x=x,.7,log = FALSE)
plot(x=x, y=Po3, type='h', las=1,lwd=6)
##
Po4 <- dgeom(x=x,0.8,log = FALSE)
plot(x=x, y=Po4, type='h', las=1,lwd=6)
##
Po5 <- dgeom(x=x,0.9,log = FALSE)
plot(x=x, y=Po5, type='h', las=1,lwd=6)
##
Po6 <- dgeom(x=x,1,log = FALSE)
plot(x=x, y=Po6, type='h', las=1,lwd=6)

Distribución Logaritmica

\[ f_X(x;p)=\frac{(1-p)^x}{-x\ln p}I_{\{1,2..\}}(x) \] \[ f_X(x;p)=\frac{-(\theta)^x}{x\ln (1-\theta)}I_{\{1,2..\}}(x) \]

 ## library(help=VGAM) para funciones
library(VGAM)
## Loading required package: stats4
## Loading required package: splines
par(mfrow=c(3, 2))
x <- 1:30
logff1 <- dlog(x,shape=0.1,log=FALSE)
plot(x=x, y=logff1, type='h', las=1,lwd=6,ylab = expression(y))
##
logff2 <- dlog(x,shape=0.6,log=FALSE)
plot(x=x, y=logff2, type='h', las=1,lwd=6,ylab = expression(y))
##
logff3 <- dlog(x,shape=0.8,log=FALSE)
plot(x=x, y=logff3, type='h', las=1,lwd=6,ylab = expression(y))
##
logff4 <- dlog(x,shape=0.10,log=FALSE)
plot(x=x, y=logff4, type='h', las=1,lwd=6,ylab = expression(y))

Distribuciones Continuas

Distribución Uniforme continua

\[ f(x;a,b)=\frac{1}{b-a}I_{[a,b]}(x) \]

curve(dunif(x,min=0,max=1), from=0, to=10, col='red',lwd = 2,ylab = expression(y))
curve(dunif(x,min=0,max=2), from=0, to=10, col='green',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=4), from=0, to=10, col='blue',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=6), from=0, to=10, col='purple',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=8), from=0, to=10, col='orange',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=10), from=0, to=10, col='pink',lwd = 2, add=TRUE)

legend(6,1, legend=c("a=0,b=1", "min=0,max=2", "min=0,max=4","min=0,max=6","min=0,max=8","min=0,max=10"),
               col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

?quote
## starting httpd help server ... done
?expression
curve(dunif(x,min=0,max=1), from=0, to=10, col='red',lwd = 2,ylab = expression(y))
curve(dunif(x,min=0,max=2), from=0, to=10, col='green',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=4), from=0, to=10, col='blue',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=6), from=0, to=10, col='purple',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=8), from=0, to=10, col='orange',lwd = 2, add=TRUE)
curve(dunif(x,min=0,max=10), from=0, to=10, col='pink',lwd = 2, add=TRUE)

legend(6,1, legend=c("a=0,b=1", "a=0,b=2", "a=0,b=4","a=0,b=6","a=0,b=8","a=0,b=10"),
               col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

?quote
?expression

Distribución Normal

\[ f(x;\mu,\sigma)=\frac{1}{\sqrt{2\pi \sigma^2}}e^{-\frac{1}{2}(\frac{x-\mu}{\sigma})^2}I(-\infty,\infty)(x) \]

Parametros \(\alpha\) y \(\beta\)

curve(dnorm(x,mean = 0,sd=0.3), from=-10, to=10, col='red',lwd = 2,ylab = expression(y))
curve(dnorm(x,mean = 0,sd=0.5), from=-10, to=10, col='green',lwd = 2, add=TRUE)
curve(dnorm(x,mean = 0,sd=1), from=-10, to=10, col='blue',lwd = 2, add=TRUE)
curve(dnorm(x,mean = 3,sd=1), from=-10, to=10, col='purple',lwd = 2, add=TRUE)

legend(-10, 1.2, legend=c("mean = 0,sd=0,3", "mean = 0,sd=0.5", "mean = 0,sd=0.1","mean = 3,sd=1"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Distribución Exponencial

\[ f_X(x;\lambda)=\lambda e^{-\lambda x}I(0,\infty)(x) \]

curve(dexp(x,rate=0.3), from=0, to=30, col='red',lwd = 2,ylab = expression(y))
curve(dexp(x,rate=0.5), from=0, to=30, col='green',lwd = 2, add=TRUE)
curve(dexp(x,rate=0.8), from=0, to=30, col='blue',lwd = 2, add=TRUE)
curve(dexp(x,rate=1), from=0, to=30, col='purple',lwd = 2, add=TRUE)
curve(dexp(x,rate=1.3), from=0, to=30, col='orange',lwd = 2, add=TRUE)
curve(dexp(x,rate=1.5), from=0, to=30, col='pink',lwd = 2, add=TRUE)

legend(15,0.3, legend=c("rate=0.3", "rate=0.5", "rate=0.8","rate=1","rate=1.3","rate=1.5"),
       col=c("red","green","blue", "purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

Distribución Gamma

\[ f_X(x;\lambda)=\frac{\lambda}{\Gamma(r)}(\lambda x)^{r-1} e^{-\lambda x}I(0,\infty)(x) \]

curve(dgamma(x,shape = 1,rate=1), from=0, to=15, col='red',lwd = 2,ylab = expression(y))
curve(dgamma(x,shape = 1.5,rate=1), from=0, to=15, col='green',lwd = 2, add=TRUE)
curve(dgamma(x,shape = 2,rate=1), from=0, to=15, col='blue',lwd = 2, add=TRUE)
curve(dgamma(x,shape = 1.5,rate=1), from=0, to=15, col='purple',lwd = 2, add=TRUE)
curve(dgamma(x,shape = 3,rate=1), from=0, to=15, col='orange',lwd = 2, add=TRUE)
curve(dgamma(x,shape = 3.5,rate=1), from=0, to=15, col='pink',lwd = 2, add=TRUE)

legend(6,1, legend=c("shape = 1,rate=1", "shape = 1.5,rate=1", "shape = 2,rate=1","shape = 2.5,rate=1","shape = 3,rate=1","shape = 3.5,rate=1"),col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

Distribución Beta

\[ f_X(x;a,b)=\frac{1}{B(a,b)}x^{a-1}(1-x)^{b-1}I(0,1)(x) \]

Parametros \(a\) y \(b\)

curve(dbeta(x, shape1=0.5, shape2=0.5), from=0, to=1, col='red',lwd = 2,ylab = expression(y))
curve(dbeta(x, shape1=5, shape2=1), from=0, to=1, col='green',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=1, shape2=3), from=0, to=1, col='blue',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=2, shape2=2), from=0, to=1, col='purple',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=2, shape2=5), from=0, to=1, col='orange',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=8, shape2=8), from=0, to=1, col='pink',lwd = 2, add=TRUE)

legend(-1,2, legend=c("shape = 1,rate=1", "shape = 1.5,rate=1", "shape = 2,rate=1","shape = 2.5,rate=1","shape = 3,rate=1","shape = 3.5,rate=1"),col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

Con el pametro \(a\) fijo y Varando el parametro \(b\)

curve(dbeta(x, shape1=1, shape2=2), from=0, to=1, col='red',lwd = 2,ylab = expression(y))
curve(dbeta(x, shape1=1, shape2=5), from=0, to=1, col='green',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=1, shape2=10), from=0, to=1, col='blue',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=1, shape2=20), from=0, to=1, col='purple',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=1, shape2=30), from=0, to=1, col='orange',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=1, shape2=40), from=0, to=1, col='pink',lwd = 2, add=TRUE)

legend(0.6,2, legend=c("shape2 = 2","shape2 = 5","shape2 = 10","shape2 = 20","shape2 = 30","shape2 = 40"),col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

Con el pametro \(b\) fijo y Varando el parametro \(a\)

curve(dbeta(x, shape1=2, shape2=1), from=0, to=1, col='red',lwd = 2,ylab = expression(y))
curve(dbeta(x, shape1=5, shape2=1), from=0, to=1, col='green',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=10, shape2=1), from=0, to=1, col='blue',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=20, shape2=1), from=0, to=1, col='purple',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=30, shape2=1), from=0, to=1, col='orange',lwd = 2, add=TRUE)
curve(dbeta(x, shape1=40, shape2=1), from=0, to=1, col='pink',lwd = 2, add=TRUE)

legend(0,2, legend=c("shape1 = 2","shape1 = 5","shape1 = 10","shape1 = 20","shape1 = 30","shape1 = 40"),col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

Distribución Cauchy

\[ f(x;\alpha,\beta)=\frac{1}{\pi \beta[1+(\frac{x-\alpha}{\beta})^2]}I(-\infty,\infty)(x) \] En Ubicación, ingrese un valor que represente la ubicación del pico de la distribución.
En Escala, ingrese un valor que represente la dispersión de la distribución.

curve(dcauchy(x,location = 0,scale=1), from=-20, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dcauchy(x,location = 0,scale=2), from=-20, to=20, col='green',lwd = 2, add=TRUE)
curve(dcauchy(x,location = 2,scale=1), from=-20, to=20, col='blue',lwd = 2, add=TRUE)
curve(dcauchy(x,location = 2,scale=2), from=-20, to=20, col='purple',lwd = 2, add=TRUE)
curve(dcauchy(x,location = 2,scale=3), from=-20, to=20, col='orange',lwd = 2, add=TRUE)
curve(dcauchy(x,location = 2,scale=5), from=-20, to=20, col='pink',lwd = 2, add=TRUE)

legend(-21.5,0.33, legend=c("location = 0,scale=1", "location = 0,scale=2", "location = 2,scale=1","location = 2,scale=2","location = 2,scale=3","location = 2,scale=5"),col=c("red", "green", "blue","purple","orange","pink"), lty=1, cex=1.2,box.col = "white")

Distribución Lognormal

\[ f(x;\mu,\sigma)=\frac{1}{x\sqrt{2\pi \sigma^2}}e^{-\frac{1}{2}(\frac{\ln x-\mu}{\sigma})^2}I(0,\infty)(x) \]

Modificando la media.

curve(dlnorm(x,meanlog = 0,sdlog = 1), from=0, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dlnorm(x,meanlog = 1,sdlog = 1), from=0, to=20, col='green',lwd = 2, add=TRUE)
curve(dlnorm(x,meanlog = 2,sdlog = 1), from=0, to=20, col='blue',lwd = 2, add=TRUE)
curve(dlnorm(x,meanlog = 3,sdlog = 1), from=0, to=20, col='purple',lwd = 2, add=TRUE)

legend(10,0.6, legend=c("meanlog = 0", "meanlog = 1", "meanlog = 2","meanlog = 3"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Modificando la varianza.

curve(dlnorm(x,meanlog = 1,sdlog = 1), from=0, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dlnorm(x,meanlog = 1,sdlog = 3), from=0, to=20, col='green',lwd = 2, add=TRUE)
curve(dlnorm(x,meanlog = 2,sdlog = 6), from=0, to=20, col='blue',lwd = 2, add=TRUE)
curve(dlnorm(x,meanlog = 3,sdlog = 9), from=0, to=20, col='purple',lwd = 2, add=TRUE)

legend(10,0.22, legend=c("sdlog = 1", "sdlog = 3", "sdlog = 6","sdlog = 9"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Distribución doble exponencial

\[ f(x;\alpha,\beta)=\frac{1}{2\beta}e^{(\frac{-|x-\alpha|}{\beta})}I_{(-\infty,\infty)}(x) \]

location \(a\) y Scale \(b\).

curve(dlaplace(x, location = 0, scale = 1, log = FALSE), from=0, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dlaplace(x, location = 1, scale = 1, log = FALSE), from=0, to=20, col='green',lwd = 2, add=TRUE)
curve(dlaplace(x, location = 3, scale = 1, log = FALSE), from=0, to=20, col='blue',lwd = 2, add=TRUE)
curve(dlaplace(x, location = 4, scale = 1, log = FALSE), from=0, to=20, col='purple',lwd = 2, add=TRUE)

legend(10,0.22, legend=c("sdlog = 1", "sdlog = 3", "sdlog = 6","sdlog = 9"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

## Distribución Weibull

\[ f_X(x;a,b)=abx^{b-1}e^{-ax^b-}I(0,\infty)(x) \]

curve(dweibull(x,shape = 0.5,scale = 1), from=0, to=10, col='red',lwd = 2,ylab = expression(y))
curve(dweibull(x,shape = 1,scale = 1), from=0, to=10, col='green',lwd = 2, add=TRUE)
curve(dweibull(x,shape = 1.5,scale = 1), from=0, to=10, col='blue',lwd = 2, add=TRUE)
curve(dweibull(x,shape = 2,scale = 1), from=0, to=10, col='purple',lwd = 2, add=TRUE)

legend(6,0.8, legend=c("shape = 0.5", "shape = 1", "shape = 1.5","shape = 2"),
                  col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Distribución Logistica

\[ f(x;\alpha,\beta)=\frac{1}{\beta}\frac{e^{(\frac{-(x-\alpha)}{\beta})}}{[1+e^{(\frac{-(x-\alpha)}{\beta})}]^2}I_{(-\infty,\infty)}(x) \]

En Ubicación, ingrese un valor que represente la ubicación del pico de la distribución.

En Escala, ingrese un valor que represente la dispersión de la distribución.

curve(dlogis(x,location = 0,scale = 1), from=-20, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dlogis(x,location = 0,scale = 3), from=-20, to=20, col='green',lwd = 2, add=TRUE)
curve(dlogis(x,location = 2,scale = 1), from=-20, to=20, col='blue',lwd = 2, add=TRUE)
curve(dlogis(x,location = 2,scale = 3), from=-20, to=20, col='purple',lwd = 2, add=TRUE)

legend(-20,0.25, legend=c("location = 0,scale=1", "location = 0,scale=3", "location = 2,scale=1","location = 2,scale=3"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Distribución pareto

\[ f(x,x_0,\theta)=\frac{\theta x^{\theta}_0}{x^{\theta+1}}I_{(x_0,\infty)}(x) \]

require(Pareto)
## Loading required package: Pareto
library(Pareto)
curve(dPareto(x,1,2,truncation = NULL), from=-10, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dPareto(x,2,2,truncation = NULL), from=-10, to=20, col='green',lwd = 2, add=TRUE)
curve(dPareto(x,3,2,truncation = NULL), from=-10, to=20, col='blue',lwd = 2, add=TRUE)
curve(dPareto(x,4,2,truncation = NULL), from=-10, to=20, col='purple',lwd = 2, add=TRUE)
legend(-10,1.2, legend=c("1,2", "2,2", "3,2","4,2"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Distribución t de Student

\[ f(x;v)=\frac{\Gamma(\frac{v+1}{2})}{\Gamma(\frac{v}{2})\sqrt{v\pi}}(1+\frac{x^2}{v})^{-(\frac{v+1}{2})}I_{(-\infty,\infty)}(x) \]

curve(dt(x, df=1), from=-20, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dt(x, df=0.8), from=-20, to=20, col='green',lwd = 2, add=TRUE)
curve(dt(x, df=0.4), from=-20, to=20, col='blue',lwd = 2, add=TRUE)
curve(dt(x, df=0.2), from=-20, to=20, col='purple',lwd = 2, add=TRUE)

legend(-21,0.27, legend=c("df=1", "df=0.8", "df=0.4","df=0.2"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Con parametros en decenas se observa la grafica de las distribuciones t se cruzan intersectan (parte inferior).

curve(dt(x, df=25), from=-4, to=4, col='blue',lwd = 2,ylab = expression(y)) 
curve(dt(x, df=10), from=-4, to=4, col='red',lwd = 2,add=TRUE)
curve(dt(x, df=2), from=-4, to=4, col='yellow',lwd = 2, add=TRUE)
legend(-4, .3, legend=c("df=6", "df=10", "df=30"),col=c("blue", "red","yellow"), lty=1, cex=1.2,box.col = "white")

Distribución Chi-cuadrada

\[ f(x;v)=\frac{1}{\Gamma(\frac{k}{2})}(\frac{1}{2})^{\frac{k}{2}}x^{\frac{k}{2}-1}e^{-(1/2)x}I_{(0,\infty)}(x) \]

curve(dchisq(x,df=2,ncp = 0), from=0, to=20, col='red',lwd = 2,ylab = expression(y))
curve(dchisq(x,df=4,ncp = 0), from=0, to=20, col='green',lwd = 2, add=TRUE)
curve(dchisq(x,df=6,ncp = 0), from=0, to=20, col='blue',lwd = 2, add=TRUE)
curve(dchisq(x,df=8,ncp = 0), from=0, to=20, col='purple',lwd = 2, add=TRUE)

legend(10,0.5, legend=c("df=2", "df=4", "df=4","df=8"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")

Distribución F

\[ f(x;v)=\frac{\Gamma(\frac{m+n}{2})}{\Gamma(\frac{m}{2})\Gamma(\frac{n}{2})}(\frac{m}{n})^{\frac{m}{2}}\frac{x^{(m-2)/2}}{[1+(m/n)x]^{\frac{m+n}{2}}}I_{(0,\infty)}(x) \]

curve(df(x,df1=8,df2=0.5), from=0, to=10, col='red',lwd = 2,ylab = expression(y))
curve(df(x,df1=4,df2=0.2), from=0, to=10, col='green',lwd = 2, add=TRUE)
curve(df(x,df1=0.2,df2=4), from=0, to=10, col='blue',lwd = 2, add=TRUE)
curve(df(x,df1=0.1,df2=8), from=0, to=10, col='purple',lwd = 2, add=TRUE)

legend(6,0.42, legend=c("df1=8,df2=0.5", "df1=4,df2=0.2", "df1=0.2,df2=4","df1=0.1,df2=8"),
       col=c("red", "green", "blue","purple"), lty=1, cex=1.2,box.col = "white")