Você está na página 1de 31

Biostatistics

Probability
Probability
Probability provides a mathematical description
of randomness. A phenomenon is called random
if the outcome of an experiment is uncertain.
However, random phenomena often follow
recognizable patterns. This long-run regularity of
random phenomena can be described
mathematically. The mathematical study of
randomness is called probability theory.
Basic Probability Concepts
Foundation of statistics because of the
concept of sampling and the concept of
variation or dispersion and how likely an
observed difference is due to chance
Probability statements used frequently in
statistics
e.g., we say that we are 90% sure that an
observed treatment effect in a study is real

Elementary Properties of Probabilities - I
Probability of an event is a non-negative number
Given some process (or experiment) with n mutually
exclusive outcomes (events), E
1
, E
2
, , E
n
, the
probability of any event E
i
is assigned a nonnegative
number
P(E
i
) > 0
key concept is mutually exclusive outcomes - cannot
occur simultaneously
Given previous definition, not clear how to construct a
negative probability

Experiments and Events
A well-defined procedure resulting in an outcome, e.g., rolling a die,
tossing a coin, dealing cards.
Experiment: An experiment with the following characteristics:
The set of all possible outcomes is known before the experiment.
The outcome of the experiment is not known beforehand.
Space. The set of all possible outcomes of the experiment. We use S
to denote the sample space.
Event. Any subset of the sample space.
A and B are events, then :
A B, called the union of A and B is the event consisting of all
outcomes that are in A or in B or in both A and B.
AB, called the intersection of A and B. It consists of all outcomes
that are in both A and B
For any even A, Ac is called the complement of A, consists of all
outcomes in S that are not in A
Relative Frequency Interpretation of
Probability
If I flip a fair coin hundreds and hundreds of times,
the fraction of heads will be very close to 0.5. The
more I repeat the experiment, the closer to 0.5 the
relative frequency will be. This is the same result the
classical definition gives us. The relative frequency
interpretation of probability works especially well for
repeatable events, e.g., flipping a coin, rolling dice,
drawing cards, etc.
Probability Rules
Let P(A) = the probability that event A
occurs.
1. P(S) =1
2. 0 < = P(A) <=1
3. P(AC) =1- P(A)
() Unions and
() Intersections
Characteristics of Probabilities
Probabilities are expressed as fractions between 0.0
and 1.0
e.g., 0.01, 0.05, 0.10, 0.50, 0.80
Probability of a certain event = 1.0
Probability of an impossible event = 0.0
Application to biomedical research
e.g., ask if results of study or experiment could be due to
chance alone
e.g., significance level and power
e.g., sensitivity, specificity, predictive values

Elementary Properties of Probabilities - II
Sum of the probabilities of mutually exclusive
outcomes is equal to 1
Property of exhaustiveness
refers to the fact that the observer of the process must allow for
all possible outcomes
P(E
1
) + P(E
2
) + + P(E
n
) = 1
key concept is still mutually exclusive outcomes

Elementary Properties of Probabilities - III
Probability of occurrence of either of two
mutually exclusive events is equal to the
sum of their individual probabilities
Given two mutually exclusive events A and
B
P(A or B) = P(A) + P(B)
If not mutually exclusive, then problem
becomes more complex

Elementary Properties of Probabilities - IV
For two independent events, A and B, occurrence of
event A has no effect on probability of event B
P(A B) = P(B) + P(A)
P(A | B) = P(A)
P(B | A) = P(B)
P(A B) = P(A) x P(B)*
* Key concept in contingency table analysis

) (
) (
B P
B A P
) (
) (
A P
B A P
) (
) (
) ( * ) (
B P
A P
B P A P
=
Conditional Probability and Independence
-The conditional probability of A given B is P(A/B) =


if A and B are independent
-P(B/A) =
=

Multiplicative rule
P(AB) =P(A)*P(B) if A and B are independent

P(A/B) =


) (
) (
B P
B A P
=
) (
) (
) ( * ) (
A P
B P
B P A P
=
Elementary Properties of Probabilities - V
Conditional probability
Conditional probability of B given A is given
by:
P(B | A) = P(A B) / P(A)
Probability of the occurrence of event B
given that event A has already occurred.
Ex. given that a test for bladder cancer is
positive, what is the probability that the
patient has bladder cancer

Mutually Exclusive vs. Independent
Mutually Exclusive Events: If event A happens, then
event B cannot, or vice-versa.
Independent Events: The outcome of event A has no
effect on the outcome of event B.
So, if A and B are mutually exclusive, they cannot be
independent.
If A and B are independent, they cannot be mutually
exclusive.
Relative Frequency Interpretation of Probability
If I flip a fair coin hundreds and hundreds of times,
the fraction of heads will be very close to 0.5. The
more I repeat the experiment, the closer to 0.5 the
relative frequency will be. This is the same result the
classical definition gives us. The relative frequency
interpretation of probability works especially well for
repeatable events, e.g., flipping a coin, rolling dice,
drawing cards, etc.
Elementary Properties of Probabilities - VI
Given some variable that can be broken down into m
categories designated A
1
, A
2
, , A
m
and another
jointly occurring variable that is broken down into n
categories designated by B
1
, B
2
, , B
n
, the marginal
probability of A
i
, P(A
i
), is equal to the sum of the joint
probabilities of A
i
with all the categories of B. That is,




) ( = ) (
j
B
i
A P
i
A P
Elementary Properties of Probabilities - VII
For two events A and B, where P(A) + P(B) =
1, then



) ( 1 ) ( A P A P =
Elementary Properties of Probabilities - VIII
Multiplicative Law
For any two events A and B,
P(A B) = P(A) P(B | A)
Joint probability of A and B = Probability of B times Probability
of A given B
Addition Law
For any two events A and B
P(A B) = P(A) + P(B) - P(A B)
Probability of A or B = Probability of A plus Probability of B
minus the joint Probability of A and B
Male Female Total
Medical; 35 25 60
Dental 16 24 40
Total 51 49 100
Screening Tests
False Positives
Test indicates a positive status when the true status is
negative
False Negatives
Test indicates a negative status when the true status is
positive

Disease
Test
Result
Present Absent Total
Positive a b a + b
Negative c d c + d
Total a + c b + d n

Results of a screening test are often put in a two by two
table:



Screening test
result

Affected

Unaffected

Total
positive



true positives

(a)
false positives

(b)
screened
positives
negative



false negatives

(c)
true negatives

(d)
screened
negatives

total


affected
individuals

Unaffected
individuals

total screened


True disease state

HIV Infected
+ -
ELISA
+
9990
(TP)
10
(FP)
-
10
(FN)
9990
(TN)

10,000
TP+FN
10,000
FP+TN
Sensitivity =
TP/(TP+FN)
9990/(9990+10)
=.999 or 99.9%
Specificity=
TN/(FP+TN)
9990/(9990+10)
=.999 or 99.9%

Disease

+ -
Test
+
9990
True Positive
(TP)
990
False Positive
(FP)
All with
Positive Test
TP+FP
Positive
Predictive Value=
TP/(TP+FP)
9990/(9990+990)
=91%
-
10
False Negative
(FN)
989,010
True Negative
(TN)
All with
Negative Test
FN+TN
Negative
Predictive Value=
TN/(FN+TN)
989,010/(10+989,0
10)
=99.999%

All with Disease
10,000
All without
Disease
999,000
Everyone=
TP+FP+FN+TN
Sensitivity=
TP/(TP+FN)
9990/(9990+10)
Specificity=
TN/(FP+TN)
989,010/
(989,010+990)
Pre-Test Probability=
(TP+FN)/(TP+FP+FN+TN)
(in this case = prevalence)
10,000/1,000,000 = 1%

Disease

+ -
Test
+
999
(TP)
999
(FP)
All with
Positive Test
TP+FP
1998
Positive Predictive
Value=
TP/(TP+FP)
=50%
-
1
(FN)
998,001
(TN)
All with
Negative
Test
FN+TN
Negative
Predictive Value=
TN/(FN+TN)
=99.999%

All with
Disease
1000
All without
Disease
999,000
Everyone
TP+FP+FN+TN
Sensitivity
99.9%
Specificity
99.9%
Pre-Test Probability
0.1%

Disease

+ -
Test
+
99,900
(TP)
900
(FP)
All with
Positive Test
100,800
Positive Predictive
Value=
TP/(TP+FP)
99,900/100,800
=99%
-
100
(FN)
899,100
(TN)
All with
Negative
Test
899,200
Negative Predictive
Value=
TN/(FN+TN)
899,100/899,200
=99.99%

All with Disease
100,000
All without
Disease
900,000
Everyone
TP+FP+FN+TN
Sensitivity
99.9%
Specificity
99.9%
Pre-Test Probability
10%
Questions about Screening Tests
Given that a patient has the disease, what is the
probability of a positive test results?
Given that a patient does not have the disease, what
is the probability of a negative test result?
Given a positive screening test, what is the
probability that the patient has the disease?
Given a negative screening test, what is the
probability that the patient does not have the
disease?

Sensitivity and Specificity
Sensitivity of a test is the probability of a positive test
result given the presence of the disease
a / (a + c)
Specificity of a test is the probability of a negative test
result given the absence of the disease
d / (b + d)
Predictive Values
Predictive value positive of a test is the probability
that the subject has the disease given that the
subject has a positive screening test
P(D | T)
Predictive value negative of a test is the probability
that a subject does not have the disease, given that
the subject has a negative screening test
P(D- | T-)
Bayes Theorem
Predictive value positive




Predictive value negative



) ( ) | ( ) ( ) | (
) ( ) | (
) | (
D P D T P D P D T P
D P D T P
T D P
+
=
) ( ) | ( ) ( ) | (
) ( ) | (
) | (
D P D T P D P D T P
D P D T P
T D P
+
=
)) ( 1 ( ) 1 ( ) (
) (
) | (
D P x y specificit D P x y sensitivit
D P x y sensitivit
T D P
+
=
) ( ) 1 ( )) ( 1 (
)) ( 1 (
) | (
D P x y sensitivit D P x y specificit
D P x y specificit
T D P
+

=
Prevalence and Incidence
Prevalence is the probability of having the
disease or condition at a given point in time
regardless of the duration

Incidence is the probability that someone without
the disease or condition will contract it during a
specified period of time

Você também pode gostar