Beruflich Dokumente
Kultur Dokumente
UNED
F. J. Dez Vegas
Dpto. Inteligencia Artificial. UNED
fjdiez@dia.uned.es
www.ia.uned.es/~fjdiez
Teorema de Bayes
X
Sabamos que
P ( x| y ) =
P ( x, y )
P (y )
P ( x , y ) = P ( x )P ( y | x )
P (y ) =
P (y| x ) P (x )
P ( x, y ) P ( x ) P ( y | x )
=
=
P (y )
P (y )
P (x ) P (y| x )
P (x' ) P (y| x' )
x'
UNED
P ( + b|+ a ) P ( + a ) + P ( + b| a ) P ( a )
P ( + a|+ b ) =
=
P ( +a ) P ( + b|+ a )
P ( + b)
0'03 0'8
= 0'7122
0'0337
Prevalencia: P(+e)
Sensibilidad: P(+h|+e)
Especificidad: P(h|e)
Incidencia absoluta
Incidencia relativa
En situaciones estables:
UNED
P ( + e |+ h ) =
VPP =
P rev S e ns
P re v S ens + (1 P re v ) (1 E sp ec )
VPN =
P ( e ) P ( h| e )
P ( + e ) P ( h|+ e ) + P ( e ) P ( h| e )
( 1 P re v) E s p e c
P re v ( 1 S e n s ) + ( 1 P re v ) E s p e c
Ejemplo
Prev
001
008
001
001
Sens
099
099
0999
099
Espec
099
099
099
0999
Vpp
05
084
0502
09
Vpn
09999
09995
099999
09999
UNED
Advertencia
X
Ejemplo:
La prevalencia de X es el 1
P(+x) = 0001
La sensibilidad de Y es el 98% P(+y|+x) = 098
La especificidad de Y es el 96% P(y|x) = 096
Por tanto, la fiabilidad de Y es:
F = P(+x,+y) + P(x,y)
= P(+y|+x) P(+x) + P(y|x) P(x)
= 098 0001 + 096 0999 = 096002
Es decir, la prueba Y determina el valor correcto de X
en el 96% de los casos.
Sin embargo, un resultado positivo en Y no significa que el
paciente tenga un 96% de probabilidad de padecer X.
De hecho, Vpp = P(+x|+y) = 0024 = 24% 96%
P ( + e ) P ( h |+ e ) + P ( e ) P ( h | e )
P ( e ) P ( h| e )
P ( e| h ) =
P ( + e ) P ( h | + e ) + P ( e ) P ( h | e )
P ( + e| h ) =
R P p re
P (+e )
P (e )
P ( + e| h )
P ( + e ) P ( h |+ e )
=
P ( e| h )
P ( e ) P ( h| e )
R P post
P ( + e| h )
P ( e| h )
RV
P ( h |+ e )
P ( h| e )
UNED
Ejemplo
P ( + e ) = 0 '0 3
R P p re =
R P p o s t = R P p re R V
h
severo
m oderado
leve
ausente
P(h|+e)
035
045
016
004
P ( + e| h ) =
P(h|e)
001
003
016
080
0 '0 3
= 0 '0 3 0 9
1 0 '0 3
P ( + e| h ) =
RV
35
15
1
005
R P post
1 + R P post
RP post
10825
04640
00309
00015
P(+e|h)
05198
03169
00300
00015
P ( + e ) P ( h |+ e )
P ( + e ) P ( h | + e ) + ( 1 P ( + e )) P ( h | e )