You are on page 1of 15

1 Estadstica descriptiva de una variable

1.1 Medidas de centralizacin:


Datos sin agrupar: x= 1 n
n

Media:

xi
i=1

Datos agrupados: 1 x= n
k k

ni xi =
i=1 i=1

fi xi

Mediana: Moda:
1.2

Valor que deja a izquierda y derecha el mismo nmero de observaciones, una vez orde-

nadas. Valor que aprarece ms repetido.

Medidas de dispersin:
Datos sin agrupar: 1 vx = n 1 (xi x) = n i=1
2 k 2 ni x2 i x = i=1 i=1 n n 2 x2 i x i=1

Varianza:

Datos agrupados: vx = 1 n
k 2 fi x2 i x

Desviacin tpica:

vx

2 Estadstica descriptiva de dos variables


2.1 Conceptos bsicos:
covx,y = 1 n
n

Covarianza:
2.2

(xi x)(yi y ) =
i=1

1 n

xi yi xy
i=1

Modelo de regresin lineal:


de

Recta de regresin
E.C.M. =

Y
n

sobre

es la recta

y = a + bx

que minimiza el error cuadrtico medio:

1 n

(yi a bxi )2
i=1

y = a + bx = y

covx,y covx,y covx,y x+ xyy = (x x vx vx vx


entre

Coeciente de correlacin muestral


covx,y r= vx vy

Varianza residual:
.

es el error cuadrtico medio cometido con la recta de regresin de

sobre

Varianza residual = vy 1
2.3

(covx,y )2 vx vy

= vy (1 r2 )

Aplicaciones del modelo de regresin lineal


y = a + b g (x)

Modelo general:

Denimos T = g (X ), hallamos la recta de regresin de Y sobre T y deshacemos el cambio para obtener la curva pedida.

Regresin logartmica: Regresin exponencial:

y = a + b log x y = aebx

3 Probabilidad
Unin de probabilidades: Regla de Laplace:
P (B ) =
i=1 n

P (n i=1 Ai ) =
i=1 k

P (Ai )
i<j

P (Ai Aj ) + + (1)n+1 P (n i=1 Ai )

P (bi ) =

k = n

casos favorables casos posibles

Probabilidad condicionada: Sucesos independientes: Regla de la multiplicacin: Regla de la probabilidad total: Regla de Bayes:
P (Aj |B ) =

P (A|B ) =

P (A B ) P (B )

P (A B ) = P (A)P (B )
n1 P (n i=1 Ai ) = P (A1 )P (A2 |A1 )P (A3 |A1 A2 ) . . . P (An | i=1 Ai ) n

P (B ) =
i=1

P (Ai )P (B |Ai )

n i=1

P (Aj )P (B |Aj ) P (Ai )P (B |Ai )

4 Variables aleatorias
P (A) = P (X A) = P { : X ( ) A}

Funcin de distribucin: Variables discretas:


Funcin de masa:

F (x) = P (, x] = P { : X ( ) x}

P (X = xi ) = P (xi ) = P { : X ( ) = xi } Media o esperanza: = E [X ] =


i

i = 1, . . . , n . . .

xi P (xi )

Varianza: 2 = V (X ) = E [(X )2 ] =
i

(xi )2 P (xi ) =
i

2 2 2 x2 i P (xi ) = E [X ]

Desviacin tpica:

Variables contnuas:
Funcin de densidad: a) f (x) 0, x b) f (x)dx = 1 P (A) =
A

f (x)dx f (x)dx = 0
{x}

P (x) =

Funcin de distribucin:
x

F (x) = P (, x] =

f (x)dx

Media o esperanza: = E [X ] = Varianza: 2 = V (X ) = E [(X )2 ] = Desviacin tpica: (x )2 f (x)dx = x2 f (x)dx 2 = E [X 2 ] 2 xf (x)dx

5 Vectores aleatorios
P (A) = P ((X, Y ) A) = P { : (X ( ), Y ( )) A}

Funcin de distribucin:
F (x, y ) = P {(t, u)
2

: t x, u y } = P { : X ( ) x, Y ( ) y }

(x, y )

Vectores discretos:
Funcin de masa conjunta: P (X = xi ; Y = yj ) = P { : X ( ) = xi , Y ( ) = yj } Funcin de masa marginal:
n

i = 1, . . . , m; j = 1, . . . n

P (X = xi ) =
j =1 m

P (X = xi ; Y = yj )

i = 1, . . . , m

P (Y = yj ) =
i=1

P (X = xi ; Y = yj )

j = 1, . . . , n

Covarianza: Cov (X, Y ) = E [(X E [X ])(Y E [Y ])] = E [XY ] E [X ]E [Y ] X e Y estn

si Cov (X, Y ) = 0 X e Y son independientes si


incorreladas

P (X = xi ; Y = yj ) = P (X = xi )P (Y = yj ) Funcin de masa condicionada: P (X = xi ; Y = yj ) P (X = xi |Y = yj ) = P (Y = yj )

i = 1, . . . , m; j = 1, . . . , n

Cov (X, Y ) = 0)

i = 1, . . . , m

Vectores continuos:
Funcin de densidad conjunta: f (x, y ) 0 (x, y ) f ( x, y ) dxdy =1 2 P (A) =
A 2

f (x, y )dxdy

Funcin de densidad marginal: f (x) = f (y ) = Covarianza: Cov (X, Y ) = E [(X E [X ])(Y E [Y ])] = E [XY ] E [X ]E [Y ] X e Y son
independientes

f (x, y )dy f (x, y )dx

x y

si
x , y Cov (X, Y ) = 0 (incorreladas)

f (x, y ) = f (x)f (y )

Funcin de densidad condicionada: f (x, y ) f (x|y ) = f (x|Y = y ) = f (y )

x , f (y ) > 0

Propiedades:
a) E [kX ] = kE [X ] b) E [X + Y ] = E [X ] + E [Y ] c) V (kX ) = k2 V (X ) d) Si X e Y estn incorreladas: E [XY ] = E [X ]E [Y ] e) V (X1 + + Xn ) = V (X1 ) + + V (Xn ) + 2 i<j Cov (Xi , Xj ) f) Si X1 , . . . , Xn estn incorreladas: V (X1 + + Xn ) = V (X1 ) + + V (Xn ) g) V (X Y ) = V (X ) + V (Y ) 2Cov (X, Y ) h) Si X e Y estn incorreladas: V (X Y ) = V (X ) + V (Y )

6 Modelos de probabilidad ms comunes


6.1 Pruebas de Bernoulli
P (X = 0) = 1 p P (X = 1) = p P (X = x)px (1 p)1x para x = 0, 1

E [X ] = p V (X ) = E [X 2 ] p2 = p p2 = p(1 p)

6.2

Distribucin binomial B (n; p)


X=nmero de xitos obtenidos en n pruebas

P (X = x) =

n x p (1 p)nx k

para x = 0, 1, ..., n

E [X ] = np V (X ) = np(1 p) X B (n; p) Y B (n; 1 p) P (X = x) = P (Y = n x)

6.3

Otros modelos basados en Bernoulli

6.3.1 Distribucin geomtrica


X=nmero de fracasos hasta la aparicin del primer xito

P (X = x) = (1 p)x p

para x = 0, 1, ... 1p p

E [X ] =
x=0

x(1 p)x p =

6.3.2 Distribucin binomial negativa


X=nmero de fracasos hasta la aparicin del r-ximo xito

P (X = x) = E [X ] =

x+r1 r p (1 p)x x

para x = 0, 1, ...

r(1 p) p

6.4

Distribucin de Poisson
Lmite de B(n;p) cuando

n , p 0, np (0 < < ) ( n 30 y p 0, 1)

P (X = x) =

e x x!

para x = 0, 1, ...

E [X ] = lim np = V (X ) = lim(np)(1 p) =

6.5

Distribucin hipergeomtrica
X=nmero de xitos obtenidos en n observaciones al azar sin reemplazamiento (de una

poblacin N con D xitos)

P (X = x) = nD N

D x

N D nx N n

para max {0, n (N D)} x min {n, D}

E [X ] =

6.6

Distribucin normal N (; )
f (x) = 1 1 exp 2 2 x
2

para todo x

Propiedades
a) E [X ] = b) V (X ) = 2 c) P (X < z ) = P (X > + z ) d) X N (; ) Z = X N (0; 1) e) n (y p jo) B (n; p) N (np; np(1 p)) ( n 30 y 0, 1 < p < 0, 9) f) Si X1 N (1 ; 1 ), ..., Xn N (n ; n ) son independientes:
X1 + + Xn X1 X2 N ( = 1 + + n ; = N ( = 1 2 ; =
2 + + 2 ) 1 n

2 + 2 ) 1 2

6.7

Distribuciones asociadas a la normal


2

6.7.1 Distribucin
n 2 Xi i=1

de Pearson

6.7.2 Distribucin t de Studen


Y
1 n n i=1 2 Xi

6.7.3 Distribucin
1 m 1 n m 2 i=1 Xi n 2 i=1 Yi

de Fisher-Snedecor

6.8

Distribucin normal multivariante N (; )

6.8.1 Distribucin normal bivariante


= (1 , 2 ) =
2 1 Cov (X, Y ) 2 Cov (X, Y ) 2

1 f (x, y ) = ( 2 )2

1 x 1 exp (x 1 , y 2 )1 2 y 2 ||

Propiedades
a) Distribucin marginal de X: N ( = 1 ; = 1 ) b) Distribucin marginal de Y: N ( = 2 ; = 2 ) c) Distribucin de (Y|X=x):
N = 2 + Cov (X, Y ) (x 1 ); = 2 2 1 1 2

donde es el coeciente de correlacin:


= Cov (X, Y ) 1 2

Los valores de la esperanza forman la recta:


y = 2 + Cov (X, Y ) (x 1 ) 2 1

2 Su varianza es: 2 (1 2 ) d) Si (X, Y ) N (; ) y Cov (X, Y ) = 0, X e Y son independientes.

7 Muestreo aleatorio 8 Estimacin puntual

9 Estimacin por intervalos de conanza


Distribucin
X N (, )

Intervalo ...
1 para

Condiciones
conocida desconocida

Frmula
I = x z/2 n s I = x tn1;/2 n I= (n 1)s2 (n 1)s2 , 2 2 n1;/2 n1;1/2

1 para 2

X B (1, p)(1)

1 para p

I = x z/2

x(1 x) n

X P oisson()(1)

1 para

I = x z/2

x n

Dos poblaciones poblaciones independientes


X N (1 ; 1 ) 1 para 1 2 1 , 2 conocidas I = x y z/2
2 1 2 + 2 m n (2)

Y N (2 ; 2 )

1 = 2 desconocidas

I = x y tm+n2;/2 sp

1 1 + m n
(3)

1 = 2 desconocidas
2 2 1 para 1 /2

I = x y tf ;/2
2 s2 1 /s2

s2 s2 1 + 2 m n

I=

Fm1;n1;/2

s2 1 Fn1;m1;/2 s2 2

Diferencia de proporciones (muestras grandes e independientes)


X B (1, p1 ) Y B (1, p2 ) 1 para p1 p2 I = x y z/2 x(1 x) y (1 y ) + m n

Cuasi-varianza muestral: S 2 = (1) Muestras grandes (2) s2 p =

1 n1

(Xi X )2 =
i=1

1 n1

2 (Xi nX ) i=1

(3) f =entero ms prximo a

2 (m 1)s2 1 + (n 1)s2 m+n2 2 2 (s2 1 /m + s2 /n)


2 /m)2 (S1 m1

2 /n)2 (S2 n1

10

10 Contraste de hiptesis paramtricas


Distribucin
X N (, )

Hiptesis
H0 : = 0

Condiciones
conocida desconocida

Frmula
R= |x 0 | > z/2 n s |x 0 | > tn1;/2 n x 0 > z n s x 0 > tn1; n x 0 < z1 n s x 0 < tn1;1 n n1 2 2 / [2 n1;1/2 , n1;/2 ] 2 s 0 n1 2 2 2 s > n1; 0 n1 2 2 2 s < n1;1 0

R=

H0 : 0

conocida desconocida

R=

R=

H0 : 0

conocida desconocida

R=

R=

H0 : = 0

R=

H0 : 0

R=

H0 : 0

R=

X B (1, p)(1)

H 0 : p = p0

R=

|x p0 | > z/2

p0 (1 p0 ) n

H 0 : p p0

R=

x p0 > z

p0 (1 p0 ) n p0 (1 p0 ) n

H 0 : p p0

R=

x p0 < z1

X P oisson()(1)

H0 : = 0 H0 : 0 H0 : 0

R = {|x 0 | > z/2 R = {x 0 > z R = {x 0 < z1

0 /n}

0 /n} 0 /n}

(1) Muestras grandes

11

Distribucin Hiptesis Condiciones Dos poblaciones grandes independientes


X N (1 , 1 ) H0 : 1 = 2 1 , 2 conocidas

Frmula
R = |x y | > z/2 R= 2 2 1 2 + n1 n2 1 1 + n1 n2 s2 2 (3)
(2)

Y N (2 , 2 )

1 = 2

|x y | > tn1 +n2 2;/2 sp

1 = 2

R = |x y | > tf ;/2 R = x y > z R=


2 1

s2 1 n1

n2

H0 : 1 2

1 , 2 conocidas

n1

2 2

n2 1 1 + n1 n2
(2)

1 = 2

x y > tn1 +n2 2; sp

1 = 2

R = x y > t f ; R = x y < z1 R=

(3) 2 s2 s 1 + 2 n1 n2 2 2 1 2 + n1 n2 1 1 + n1 n2 s2 2 (3)
(2)

H0 : 1 2

1 , 2 conocidas

1 = 2

x y < tn1 +n2 2;1 sp

1 = 2

R = x y < tf ;1

s2 1 n1

n2

H0 : 1 = 2 H0 : 1 2 H0 : 1 2

2 R = {s2 / [Fn1 1;n2 1;1/2 , Fn1 1;n2 1;/2 ]} 1 /s2 2 R = {s2 1 /s2 > Fn1 1;n2 1; } 2 R = {s2 1 /s2 < Fn1 1;n2 1;1 }

(2) s2 p =

(3) f =entero ms prximo a

2 (n1 1)s2 1 + (n2 1)s2 n1 + n 2 2 2 2 (s2 1 /n1 + s2 /n2 )


2 (s2 1 /n1 ) n2 1

2 ( s2 2 /n2 ) n2 1

12

Distribucin Hiptesis Condiciones Frmula Comparacin de proporciones (muestras grandes independientes)


(4)

X B (1, p1 )

H 0 : p1 = p2

R=

|x y | > z/2

p(1 p)

1 1 + n1 n2
(4)

Y B (1, p2 )

H 0 : p1 p2

R=

x y > z

p(1 p)

1 1 + n1 n2
(4)

H 0 : p1 p2 xi + yi n1 x + n2 y = n1 + n 2 n1 + n2

R=

x y < z1

p(1 p)

1 1 + n1 n2

(4) p =

13

11 Contrastes 2
11.1 Contraste de la bondad del ajuste (primer caso)
modelo de probabilidad X es P

Rechazamos la hiptesis nula H0 :El


k

si:

i=1

(Oi ei )2 = ei

i1

2 Oi n > 2 k1; ei

11.2

Contraste de la bondad del ajuste (segundo caso)


modelo de probabilidad X es algn

Rechazamos la hiptesis nula H0 :El


k

P  si:

i=1

(Oi ei )2 = ei

i1

2 Oi n > 2 k1r ; ei

11.3

Contraste de homogeneidad de poblaciones


p poblaciones tienen una distribucin comn

Rechazamos la hiptesis nula H0 :Las


p k

si:

j =1 i=1

(Oij eij )2 = eij

j =1 i=1

2 Oij n > 2 (k1)(p1); eij

11.4

Contraste de independencia
e Y son independientes

Rechazamos la hiptesis nula H0 :X


p k

si:

j =1 i=1

(Oij eij )2 = eij

j =1 i=1

2 Oij n > 2 (k1)(p1); eij

14

12 Regresin y anlisis de la varianza


12.1 Regresin lineal simple
X

12.1.1 Inuencia de

sobre

Para H0 : = 0, rechazamos la hiptesis nula si:


|t| = covx,y
1 n2 (vx vy 2 ) covx,y

> tn2;/2

Para H0 : 0, rechazamos la hiptesis nula si:


t= covx,y
1 n2 (vx vy 2 ) covx,y

> tn2;

Para H0 : 0, rechazamos la hiptesis nula si:


t= covx,y
1 n2 (vx vy 2 ) covx,y

< tn2;1

12.1.2 Prediccin de
I = y+

mediante un intervalo de conanza


1+ 1 (x0 x)2 + (xi x)2 n

covx,y (x0 x) tn2;/2 SR vx

donde
2 SR =

1 n2

(yi y )2
i=1

siendo
y =y covx,y covx,y x+ x0 vx vx

12.2

Anlisis de la varianza unifactorial


m i=1

F =

m i=1

ni (xi. x.. )2 m1 ni 2 > Fm1;nm; j =1 (xij xi. ) nm

Tabla de anlisis de la varianza: Fuente de variacin Entre grupos Dentro de los grupos Suma de cuadrados
m i=1

G.l.
m1

Cuadrado medio
m i=1

Estadstico

ni (xi. x.. )2
ni j =1 (xij

ni (xi. x.. )2 m1
ni j =1 (xij

m i=1

xi. )2

nm

m i=1

xi. )2

nm

15

You might also like