0% found this document useful (0 votes)
14 views27 pages

Chapter 5

1) Probability is a measure of the chance of occurrence of an event ranging from 0 to 1, where 0 indicates impossibility and 1 indicates certainty. An experiment is a procedure with unpredictable outcomes. The sample space is the set of all possible outcomes. 2) The probability of an event E is defined as the number of outcomes in E divided by the total number of outcomes, if all outcomes are equally likely. Alternatively, probability can be defined as the limit of the relative frequency of an event as the number of trials increases indefinitely. 3) The union of events A and B consists of outcomes in A or B or both. The intersection consists of outcomes in both A and B. The complement of A

Uploaded by

Mohamed Ghareba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views27 pages

Chapter 5

1) Probability is a measure of the chance of occurrence of an event ranging from 0 to 1, where 0 indicates impossibility and 1 indicates certainty. An experiment is a procedure with unpredictable outcomes. The sample space is the set of all possible outcomes. 2) The probability of an event E is defined as the number of outcomes in E divided by the total number of outcomes, if all outcomes are equally likely. Alternatively, probability can be defined as the limit of the relative frequency of an event as the number of trials increases indefinitely. 3) The union of events A and B consists of outcomes in A or B or both. The intersection consists of outcomes in both A and B. The complement of A

Uploaded by

Mohamed Ghareba
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Faculty of medicine and Pharmacy / Al-mergib University - Academic year 2022/2023

Biostatistics for Premedical students - Dr. A. A. Aziz - Dr. M.O. Alshrani

Chapter 5
Probability

1
Chapter 3
Basic Probability Concepts

5.1
3.1 General Definitions and Concepts

As we have defined statistics, in broad terms, it deals with two major components,
descriptive measures, and inference. Probability is the foundation for making
inference about the population based on the sample as representative part of the
population. In other words, probability is the link between population and sample in
such a way that we can have an understanding about the degree of uncertainty in
making decision about the population characteristics on the basis of sample char-
acteristics with the help of underlying probabilities.
Probability
Probability is a measure used to measure the chance of the occurrence of some
event. Probability measure ranges from 0 to 1, where 0 indicates impossibility and 1
indicates the certainty of the occurrence of an event.
Experiment
An experiment is a procedure (or process) that we perform whose outcomes are not
predictable in advance.
Example: Experiment with coin tossing results in two outcomes, head or tail, but
the outcome is not known until the coin is tossed or until the experiment is con-
ducted. Here, the two outcomes, head and tail, are exhaustive, because one of these
two outcomes must occur in each experiment and there are no other possible
outcomes in this experiment.
Sample Space
The sample space of an experiment is the set of all possible outcomes of an
experiment. Also, it is called the universal set and is denoted by X.
Example In the coin tossing experiment with a single coin, the possible outcomes
are head (H) or tail (T). Hence, the sample space is X ¼ fH; T g.

© Springer Nature Singapore Pte Ltd. 2018 73


M. A. Islam and A. Al-Shiha, Foundations of Biostatistics,
https://doi.org/10.1007/978-981-10-8627-4_3
74 3 Basic Probability Concepts

Event
Any subset of the sample space X is called an event. For example, in the coin
tossing experiment, an event called success may occur if the outcome is a head (H).
If a tail (T) appears, then it may be called failure. It may be noted that
(i) /  X is an event is an impossible event, and
(ii) X  X is an event is a sure or certain event.
An example is shown here to illustrate the sample space and events.
Let us consider selecting a patient from a hospital room with six beds numbered
from 1 to 6 and observing the patient of the selected bed. Here, the patients are
identified by their respective bed numbers.
This experiment has six possible outcomes or elements.
The sample space is X ¼ f1; 2; 3; 4; 5; 6g.
Consider the following events and the elements corresponding to the events:
E1 = getting an even number ¼ f2; 4; 6g  X,
E2 = getting a number less than 4 ¼ f1; 2; 3g  X,
E3 = getting 1 or 3 ¼ f1; 3g  X,
E4 = getting an odd number ¼ f1; 3; 5g  X,
E5 = getting a negative number ¼ fg ¼ /  X, and
E6 = getting a number less than 10 ¼ f1; 2; 3; 4; 5; 6g ¼ X  X.

Notation nðXÞ = number of outcomes (elements) in X and


nðEÞ = number of outcomes (elements) in the event E.
Equally Likely Outcomes
The outcomes of an experiment are equally likely if the outcomes have the same
chance of occurrence. In other words, an experiment resulting in equally likely
outcomes is equally probable. It implies that if the sample space contains n equally
likely outcomes, then it is likely that probability of each outcome is 1/n. In case of
the coin tossing example, the outcomes are (H, T) and the outcomes are equally
likely for a fair coin. The probabilities of outcomes, Head or Tail, are equally likely
with probability 1/2 for each outcome.
Mutually Exclusive Outcomes
In an experiment, if only one outcome is observed at a time excluding the occur-
rence of any other outcome, then it is called mutually exclusive.
Example: In the coin tossing experiment, if the outcome is observed to be head,
the occurrence of tail is not possible at the same time and vice versa.

3.2 Probability of an Event

If the experiment has nðXÞ equally likely outcomes, then the probability of the
event E is denoted by P(E) and is defined by:
3.2 Probability of an Event 75

nðEÞ number of outcomes in E


PðEÞ ¼ ¼ :
nðXÞ number of outcomes in X

This is the classical definition of probability and under this definition the ex-
periment should satisfy the condition of equally likely as an essential precondition
which may not be true in many practical situations.
Example: If we conduct an experiment with a fair coin, then the outcomes H or
T are equally likely but if we consider outcomes of defective and non-defective
products from an experiment, the condition of equally likely outcomes may be
violated because outcomes are not necessarily equally likely. In that case, we may
use an alternative definition known as the relative frequency or empirical definition
to measure the probability as stated below.
Let an event E occurs nðEÞ times in a series of n trials, where n is the total
number of trials or sample size, the trials are conducted under the same conditions
in the experiment. Here, the ratio nðEÞn is the relative frequency of the event E in
n trials. If n tends to infinity, then we can define the probability of E as follows:

nðEÞ
PðEÞ ¼ lim :
n!1 n

Example 3.1 (Example of Classical Probability)


In the experiment for selecting patients identified by bed number of six patients
as discussed in the previous example, suppose the bed number is selected at ran-
dom. Determine the probabilities of the following events:
E1 = the patient staying in a bed with even number,
E2 = the patient staying in a bed with a number less than 4, and
E3 = the patient staying in a bed with numbers 1 or 3.

Solution

X ¼ f1; 2; 3; 4; 5; 6g ; nð X Þ ¼ 6
E1 ¼ f2; 4; 6g ; nðE1 Þ ¼ 3
E2 ¼ f1; 2; 3g ; nðE2 Þ ¼ 3
E3 ¼ f1; 3g ; nðE3 Þ ¼ 2
The outcomes are equally likely. Then, by definition the probabilities of the
events, E1 ; E2 ; and E3 are

3 3 2
PðE1 Þ ¼ ; PðE2 Þ ¼ ; and PðE3 Þ ¼ :
6 6 6

Some Operations on Events


Let A and B be two events defined on the sample space X.
76 3 Basic Probability Concepts

(i) Union of Two events: (A [ B)


The event A [ B consists of all outcomes in A or in B or in both A and B. The
event A [ B occurs if A occurs, or B occurs, or both A and B occur.

(ii) Intersection of Two Events: (A \ B)


The event A \ B consists of all outcomes in both A and B. The event A \ B
occurs if both A and B occur.

(iii) Complement of an Event: (A) or (AC ) or (A0 )


The complement of the event A is denoted by A. The event A consists of all
outcomes of X that are not in A. The event A occurs if A does not.

Example 3.2 (Classical Probability)


Experiment: Selecting a patient randomly from a hospital room having six beds
numbered 1, 2, 3, 4, 5, and 6.
Define the following events:
E1 ¼ f2; 4; 6g = selected an even number.
E2 ¼ f1; 2; 3g = selecting a number <4.
E4 ¼ f1; 3; 5g = selecting an odd number.
3.2 Probability of an Event 77

(1) E1 [ E2 ¼ f1; 2; 3; 4; 6g ¼ selecting an even number or a number less than 4:

nðE1 [ E2 Þ 5
PðE1 [ E2 Þ ¼ ¼
nðXÞ 6

(2) E1 [ E4 ¼ f1; 2; 3; 4; 5; 6g ¼ X ¼ selecting an even number or an odd number:

nðE1 [ E4 Þ 6
PðE1 [ E4 Þ ¼ ¼ ¼ 1:
nð X Þ 6

It can be shown that E1 [ E4 ¼ X where E1 and E4 are called exhaustive events.


The union of these events gives the whole sample space.
(3) E1 \ E2 ¼ f2g = selecting an even number and a number less than 4.

nðE1 \ E2 Þ 1
PðE1 \ E2 Þ ¼ ¼
nðXÞ 6
78 3 Basic Probability Concepts

(4) E1 \ E4 ¼ / = selecting an even number and an odd number.

nðE1 \ E4 Þ nð/Þ 0
PðE1 \ E4 Þ ¼ ¼ ¼ ¼ 0:
nðXÞ 6 6

Note: E1 \ E4 ¼ /. In this case, E1 and E4 are called disjoint (or mutually


exclusive) events. These kinds of events cannot occur simultaneously (together
at the same time).
(5) The complement of E1

E1 ¼ not selecting an even number ¼ f2; 4; 6g ¼ f1; 3; 5g


¼ selecting an odd number:
¼ E4 :

Mutually Exclusive (Disjoint) Events


The events A and B are disjoint (or mutually exclusive) if
3.2 Probability of an Event 79

A \ B ¼ /:

In this case, it is impossible that both events occur simultaneously (i.e., together
in the same time). Hence,
(i) PðA \ BÞ ¼ 0
(ii) PðA [ BÞ ¼ PðAÞ þ PðBÞ:
If A \ B 6¼ /, then A and B are not mutually exclusive (not disjoint).

A \ B 6¼ / A \ B=/
A and B are not mutually exclusive A and B are mutually exclusive (disjoint)
It is possible that both events may occur at the It is impossible that both events occur at the
same time. same time.

Exhaustive Events
The events A1 ; A2 ; . . .; An are exhaustive events if

A1 [ A2 [ . . . [ An ¼ X:
For this case, PðA1 [ A2 [ . . . [ An Þ ¼ PðXÞ ¼ 1.
Note
1. A [ A ¼ X (A and A are exhaustive events),
2. A \ A ¼ / (A and A are mutually exclusive (disjoint) events),
3. nðAÞ ¼ nðXÞ  nðAÞ, and
 
4. P A ¼ 1  PðAÞ.
80 3 Basic Probability Concepts

General Probability Rules


1. 0  Pð AÞ  1,
2. PðXÞ ¼ 1,
3. Pð/Þ ¼ 0, and
 
4. P A ¼ 1  Pð AÞ.

The Addition Rule


For any two events A and B:

PðA [ BÞ ¼ Pð AÞ þ PðBÞ  PðA \ BÞ

and for any three events A, B, and C:

PðA [ B [ CÞ ¼ PðAÞ þ PðBÞ þ PðCÞ  PðA \ BÞ  PðA \ CÞ


 PðB \ CÞ þ PðA \ B \ CÞ:

PðA [ BÞ ¼ Pð AÞ þ PðBÞ  PðA \ BÞ

Special Cases
1. For mutually exclusive (disjoint) events A and B,

PðA [ BÞ ¼ Pð AÞ þ PðBÞ:

2. For mutually exclusive (disjoint) events E1 ; E2 ; . . .; En ,

PðE1 [ E2 [    [ En Þ ¼ PðE1 Þ þ PðE2 Þ þ    þ PðEn Þ:


3.2 Probability of an Event 81

If the events A1 ; A2 ; . . .; An are exhaustive and mutually exclusive (disjoint)


events, then

PðA1 [ A2 [    [ An Þ ¼ PðA1 Þ þ PðA2 Þ þ    þ PðAn Þ ¼ PðXÞ ¼ 1:

3.3 Marginal Probability

Given some variable that can be broken down into (m) categories designated by
A1 ; A2 ; . . .; Am and another jointly occurring variable that is broken down into
(s) categories designated by B1 ; B2 ; . . .; Bs (Tables 3.1 and 3.2).
The marginal probability of Ai , PðAi Þ, is equal to the sum of the joint proba-
bilities of Ai with all categories of B. That is

PðAi Þ ¼ PðAi \ B1 Þ þ PðAi \ B2 Þ þ    þ PðAi \ Bs Þ


Xs
¼ PðAi \ Bj Þ:
j¼1

For example,

PðA2 Þ ¼ PðA2 \ B1 Þ þ PðA2 \ B2 Þ þ    þ PðA2 \ Bs Þ


Xs
¼ PðA2 \ Bj Þ:
j¼1

We define the marginal probability of Bj , PðBj Þ, in a similar way.


Example 3.3 (Relative Frequency or Empirical)
Let us consider a bivariate table for variables A and B. There are three categories
for both the variables, A1 ; A2 ; and A3 for A and B1 ; B2 ; and B3 for B (Tables 3.3
and 3.4).

Table 3.1 Joint frequency distribution for m categories of A and s categories of B


B1 B2 … Bs Total
A1 nðA1 \ B1 Þ nðA1 \ B2 Þ … nðA1 \ Bs Þ nðA1 Þ
A2 nðA2 \ B1 Þ nðA2 \ B2 Þ … nðA2 \ Bs Þ nðA2 Þ
. . . . . .
. . . . . .
. . . . . .
Am nðAm \ B1 Þ nðAm \ B2 Þ … nðAm \ Bs Þ nðAm Þ
Total nðB1 Þ nðB2 Þ … nðBs Þ n
82 3 Basic Probability Concepts

Table 3.2 Joint probability distribution for m categories of A and s categories of B


B1 B2 … Bs Marginal
probability
A1 PðA1 \ B1 Þ PðA1 \ B2 Þ … PðA1 \ Bs Þ P(A1 )
A2 PðA2 \ B1 Þ PðA2 \ B2 Þ … PðA2 \ Bs Þ P(A2 )
. . . . . .
. . . . . .
. . . . . .
Am PðAm \ B1 Þ PðAm \ B2 Þ … PðAm \ Bs Þ P(Am )
Marginal PðB1 Þ PðB2 Þ … PðBs Þ 1.00
probability

Table 3.3 Number of B1 B2 B3 Total


elements in each cell
A1 50 30 70 150
A2 20 70 10 100
A3 30 100 120 250
Total 100 200 200 500

Table 3.4 Probabilities of B1 B2 B3 Marginal


events probability
A1 0.1 0.06 0.14 0.3
A2 0.04 0.14 0.02 0.2
A3 0.06 0.2 0.24 0.5
Marginal 0.2 0.4 0.4 1
probability

For example,

PðA2 Þ ¼ PðA2 \ B1 Þ þ PðA2 \ B2 Þ þ PðA2 \ B3 Þ


¼ 0:04 þ 0:14 þ 0:02
¼ 0:2:

3.4 Applications of Relative Frequency or Empirical


Probability

Example 3.4 Let us consider a hypothetical data on four types of diseases of 200
patients from a hospital as shown below:
3.4 Applications of Relative Frequency or Empirical Probability 83

Disease type A B C D Total


Number of patients 90 80 20 10 200

Experiment: Selecting a patient at random and observe his/her disease type.


Total number of trials, sample size, in this case, is
n ¼ 200:
Define the events
E1 = the disease type of the selected patient is A,
E2 = the disease type of the selected patient is B,
E3 = the disease type of the selected patient is C, and
E4 = the disease type of the selected patient is D.
Number of elements for each event is shown below:
nðE1 Þ ¼ 90; nðE2 Þ ¼ 80;
nðE3 Þ ¼ 20; nðE4 Þ ¼ 10:

Probabilities of the events are


90 80
PðE1 Þ ¼ ¼ 0:45; PðE2 Þ ¼  0:40;
200 200
20 10
PðE3 Þ ¼ ¼ 0:1; PðE4 Þ ¼ ¼ 0:05:
200 200

Some Operations on the Events


1. E2 \ E4 = the disease type of the selected patients is “B” and “D”.
E2 \ E4 ¼ / (disjoint events/mutually exclusive events)

PðE2 \ E4 Þ ¼ Pð/Þ ¼ 0:

2. E2 [ E4 = the disease type of the selected patients is “B” or “D”.


8
> nðE2 [ E4 Þ 80 þ 10 90
>
< nðXÞ ¼ 200 ¼ 200 ¼ 0:45
PðE2 [ E4 Þ ¼ or
>
>
: PðE Þ þ PðE Þ ¼ 80 þ 10 ¼ 90 ¼ 0:45;
2 4
200 200 200

since E2 \ E4 ¼ /.
3. E 1 = the disease type of the selected patients is not “A”.
nðE1 Þ ¼ n  nðE1 Þ ¼ 200  90 ¼ 110
nðE 1 Þ 110
PðE 1 Þ ¼ ¼ ¼ 0:55:
n 200
84 3 Basic Probability Concepts

Another solution

PðE1C Þ ¼ 1  PðE1 Þ ¼ 1  0:45 ¼ 0:55:

It may be noted here that E1 ; E2 ; E3 ; E4 are mutually disjoint since Ei \ Ej ¼ /


ði 6¼ jÞ, and E1 ; E2 ; E3 ; E4 are exhaustive events since E1 [ E2 [ E3 [ E4 ¼ X.
Example 3.5 (Relative Frequency or Empirical Probability)
The breast cancer databases (see Mangasarian et al. 1990) from the University of
Wisconsin Hospitals include data on two variables, clump thickness categories
1–10 (A) and class referring to whether the case is malignant or benign (B). The
study includes data on 699 instances. After combining clump thickness categories
1 and 2 as A1, 3 and 4 as A2, 5 and above as A3, and denoting the benign category as
B1 and malignant category as B2, Table 3.5 summarizes the cross-classified data for
clump thickness and class.
Experiment: Selecting a case randomly.
The number of elements of the sample space is n ¼ 699. Here, n = 699 is the
sample size.
Some events and corresponding probabilities are shown below:

A3 = the selected case has clump thickness of category 5 or higher

nðA3 Þ 316
PðA3 Þ ¼ ¼ ¼ 0:4521:
n 699

B2 = the selected case belongs to the malignant class

nðB2 Þ 241
PðB2 Þ ¼ ¼ ¼ 0:3447:
n 699

A3 \ B2 = the selected subject has clump thickness category 5 or above and the
case is malignant,
nðA3 \ B2 Þ 210
PðA3 \ B2 Þ ¼ ¼ ¼ 0:3004:
n 699

Table 3.5 Data on two Clump thickness Class


variables, clump thickness,
Benign (B1) Malignant (B2) Total
and class referring to whether
the case is malignant or A1 188 7 195
benign (B) A2 164 24 188
A3 106 210 316
Total 458 241 699
3.4 Applications of Relative Frequency or Empirical Probability 85

A3 [ B2 = the selected subject has clump thickness category 5 or above or the


case is malignant, and
PðA3 [ B2 Þ ¼ PðA3 Þ þ PðB2 Þ  PðA3 \ B2 Þ
316 241 210
¼ þ 
699 699 699
¼ 0:4521 þ 0:3448  0:3004
¼ 0:4965:

A1 ¼ the selected subject does not belong to clump thickness categories 1 or 2


¼ A1 [ A2 [ A3

 
P A1 ¼ 1  PðA1 Þ
nðA1 Þ
¼1
n
195
¼1 ¼ 0:7210:
699

A2 [ A3 = the selected subject belongs to clump thickness categories either


A2 or A3
nðA2 [ A3 Þ 188 þ 316
PðA2 [ A3 Þ ¼ ¼ ¼ 0:7210
n 699
188 316
PðA2 [ A3 Þ ¼ PðA2 Þ þ PðA3 Þ ¼ þ ¼ 0:7210;
699 699

since A2 \ A3 ¼ /.

Example 3.6 (Relative Frequency or Empirical Probability)


Let us consider a sample from a population of patients having health problems
during a specified period. It was observed that 20% of the patients visited physi-
cians but 41% of the patients had some medication. It was also observed that 15%
of the patients visited physicians and used some prescribed medications.
In other words, among the patients having health problems,
20% of the patients visited physicians for consultation.
41% of the patients used some medications.
15% of the patients visited physicians and used some medications.
Experiment: Selecting a patient having health problems from this population.
Define the events
D = The selected patient visited physician.
M = The selected patient used medication.
D \ M = The selected patient visited physician and used some sort of medication.
86 3 Basic Probability Concepts

Table 3.6 (a) An incomplete (a)


two-way table representing
M M Total
percentage of respondents by
whether visited physician and D 15 ? 20
whether used any medication. D ? ? ?
(b) A complete two-way table
Total 41 ? 100
representing percentage of
respondents by whether (b)
visited physician and whether M M Total
used any medication D 15 5 20
D 26 54 80
Total 41 59 100

Percentages:

%ðDÞ ¼ 20% %ðM Þ ¼ 41% %ðD \ M Þ ¼ 15%:

The complement events


D = The selected patient did not visit any physician.
M = The selected patient did not use any medication (Table 3.6).
The probabilities of the given events are

%ðDÞ 20%
PðDÞ ¼ ¼ ¼ 0:2
100% 100%
%ð M Þ 41%
PðM Þ ¼ ¼ ¼ 0:41
100% 100%
% ðD \ M Þ 15%
PðD \ M Þ ¼ ¼ ¼ 0:15:
100% 100%

Calculating probabilities of some events are illustrated below:

D [ M = the selected patient visited physician or used medication

PðD [ M Þ ¼ PðDÞ þ ðM Þ  PðD \ M Þ


¼ 0:20 þ 0:41  0:15 ¼ 0:46:

M = The selected patient did not use medication


 
P M ¼ 1  PðM Þ ¼ 1  0:41 ¼ 0:59;
  59
P M ¼ ¼ 0:59:
100
3.4 Applications of Relative Frequency or Empirical Probability 87

D = The selected patient did not visit physician


 
P D ¼ 1  PðDÞ ¼ 1  0:20 ¼ 0:80;
  80
P D ¼ ¼ 0:80:
100

D \ M = the selected patient did not visit physician and did not use medication.
  54
P D\M ¼ ¼ 0:54:
100

D \ M = the selected patient did not visit physician and used medication.
  5
P D\M ¼ ¼ 0:05:
100

D \ M = the selected patient visited physician and did not use medication.
  5
P D\M ¼ ¼ 0:05:
100

D [ M = the selected patient visited physician or did not use medication.


     
P D [ M ¼ PðDÞ þ M  P D \ M
¼ 0:20 þ 0:59  0:26 ¼ 0:53:

D [ M = the selected patient did not visit physician or used medication.


     
P D [ M ¼ P D þ ðM Þ  P D \ M
¼ 0:80 þ 0:41  0:26 ¼ 0:95:

D [ M = the selected patient did not visit physician or did not use medication.
       
P D[M ¼ P D þ M  P D\M
¼ 0:80 þ 0:59  0:54 ¼ 0:85:

3.5 Conditional Probability

The conditional probability of the event A when we know that the event B has
already occurred is defined by
88 3 Basic Probability Concepts

PðA \ BÞ
PðAjBÞ ¼ ; PðBÞ 6¼ 0:
PðBÞ

P(A|B) = The conditional probability of A given B.


The following figure shows the events graphically:

Notes:

1. PðAjBÞ ¼ PðPAð\BÞBÞ ¼ nðnAð\BÞ=n


BÞ=nðXÞ nðA \ BÞ
ðXÞ ¼ nðBÞ
2. PðBjAÞ ¼ PðPAð\AÞBÞ
3. For calculating PðAjBÞ, we may use any one of the following:

i. PðAjBÞ ¼ PðPAð\BÞBÞ
ii. PðAjBÞ ¼ nðnAð\BÞBÞ
iii. Using the restricted table directly.

Multiplication Rules of Probability


For any two events A and B, we have

PðA \ BÞ ¼ PðBÞPðAjBÞ;
PðA \ BÞ ¼ Pð AÞPðBjAÞ:

Example 3.7 Let us consider a hypothetical set of data on 600 adult males classified
by their ages and smoking habits as summarized in Table 3.7.
Consider the following event:
(B1|A2) = smokes daily given that age is between 30 and 39

Table 3.7 Two-way table displaying number of respondents by age and smoking habit of
respondents smoking habit
Daily ðB1 Þ Occasionally ðB2 Þ Not at all ðB3 Þ Total
Age 20–29 ðA1 Þ 57 18 13 88
30–39 ðA2 Þ 200 55 90 345
40–49 ðA3 Þ 50 40 55 145
50+ ðA4 Þ 7 0 15 22
Total 314 113 173 600
3.5 Conditional Probability 89

nðB1 Þ 314
PðB1 Þ ¼ ¼ ¼ 0:523
n 600
PðB1 \ A2 Þ
PðB1 jA2 Þ ¼
PðA2 Þ
0:333
¼ ¼ 0:579
0:575
( )
PðB1 \ A2 Þ ¼ nðB1 n\ A2 Þ ¼ 200
600 ¼ 0:333
nðA2 Þ
PðA2 Þ ¼ n ¼ 600 ¼ 0:575
345

Another solution

nðB1 \ A2 Þ 200
PðB1 jA2 Þ ¼ ¼ ¼ 0:579:
nðA2 Þ 345

Notice that

PðB1 Þ ¼ 0:523
PðB1 jA2 Þ ¼ 0:579
PðB1 jA2 Þ [ PðB1 Þ; PðB1 Þ 6¼ PðB1 jA2 Þ:

Example 3.8 (Multiplication Rule of Probability)


It was found from a study that 20% of the patients with some general health
problems visited physicians and out of those who visited physicians 75% were
prescribed some medications. If a person with health problem is selected randomly
from the population, what is the probability that the person will use medicine? What
is the percentage of patients who use medication?
Solution
Define the following events:
A = the event of visiting physician,
B = the event of using medication, and
A \ B ¼ the event of visiting physician and using medication
¼ the event of experiencing both events:
Therefore, the probability of visiting physician and using medication is P(A \ B).
From the given information, the probability of visiting physician is
 
20%
Pð AÞ ¼ 0:2 ¼ 0:2 :
100%
90 3 Basic Probability Concepts

The probability of using medication given that the patient visited physician is
 
75%
PðBjAÞ ¼ 0:75 ¼ 0:75 :
100%

Now, we use the multiplication rule to find P(A \ B) as follows:


PðA \ BÞ ¼ Pð AÞPðBjAÞ ¼ ð0:2Þð0:75Þ ¼ 0:15:

We can conclude that 15% of the patients with general health problems visited
physician and used medication.
Independent Events
There are three cases in a conditional probability for occurrence of A if B is given:
(i) PðAjBÞ [ Pð AÞ
(given B increases the probability of occurrence of A),
(ii) PðAjBÞ\Pð AÞ
(given B decreases the probability of occurrence of A), and
(iii) PðAjBÞ ¼ Pð AÞ
(given B has no effect on the probability of occurrence of A). In this case, A is
independent of B.
Independent Events: Two events A and B are independent if one of the fol-
lowing conditions is satisfied:
(i) PðAjBÞ ¼ Pð AÞ;
(ii) PðBjAÞ ¼ PðBÞ; and
(iii) PðB \ AÞ ¼ Pð AÞPðBÞ:
Note: The third condition is the multiplication rule of independent events.
Example 3.9 Suppose that A and B are two events such that

Pð AÞ ¼ 0:5; PðBÞ ¼ 0:6; PðA \ BÞ ¼ 0:2:


These two events are not independent because

Pð AÞPðBÞ ¼ 0:5  0:6 ¼ 0:3;


PðA \ BÞ ¼ 0:2;
PðA \ BÞ 6¼ Pð AÞPðBÞ:

Also,
PðA \ BÞ 0:2
PðAÞ ¼ 0:5 6¼ PðAjBÞ ¼ ¼ ¼ 0:3333 and
PðBÞ 0:6
PðA \ BÞ 0:2
PðBÞ ¼ 0:6 6¼ PðBjAÞ ¼ ¼ ¼ 0:4:
PðAÞ 0:5

For this example, we may calculate probabilities of all events.


3.5 Conditional Probability 91

We can use a two-way table of the probabilities as follows:

B B Total
A 0.2 ? 0.5
A ? ? ?
Total 0.6 ? 1.00

We complete Table 3.8:


PðAÞ ¼ 0:5
PðBÞ ¼ 0:4
PðA \ BÞ ¼ 0:3
PðA \ BÞ ¼ 0:4
PðA \ BÞ ¼ 0:1
PðA [ BÞ ¼ PðAÞ þ PðBÞ  PðA \ BÞ ¼ 0:5 þ 0:6  0:2 ¼ 0:9
PðA [ BÞ ¼ PðAÞ þ PðBÞ  PðA \ BÞ ¼ 0:5 þ 0:4  0:3 ¼ 0:6:

The Addition Rule for Independent Events


If the events A and B are independent, then

PðA [ BÞ ¼ Pð AÞ þ PðBÞ  PðA \ BÞ


¼ Pð AÞ þ PðBÞ  PðAÞPðBÞ:

Example 3.10 Suppose that 12 patients admitted with fever (F = high fever,
F = low fever) in a hospital are selected randomly and asked their opinion about
whether they were satisfied with the services in the hospital (S = satisfied, S = not
satisfied). The table below summarizes the data.

F (high fever) F (low fever) Total


S (satisfied) 2 1 3
S (not satisfied) 6 3 9
Total 8 4 12

The experiment is to randomly choose one of these patients. Consider the fol-
lowing events:

Table 3.8 A two-way table B B Total


displaying probabilities
A 0.2 0.3 0.5
A 0.4 0.1 0.5
Total 0.6 0.4 1.00
92 3 Basic Probability Concepts

S = satisfied with service and


F = high fever.
(a) Find the probabilities of the following events:
1. the chosen patient is satisfied with service in the hospital,
2. the chosen patient is suffering from high fever,
3. the chosen patient is satisfied with service and suffering from high fever, and
4. the chosen patient is satisfied with service and is not suffering from high
fever.
(b) Find the probability of choosing a patient who is suffering from high fever
given that the patient has high fever.
(c) Are the events S and F independent? Why?
(d) Are the events S and F disjoint? Why?

Solution
(a) The experiment has n = 12.
P(patient is satisfied with service)

nðSÞ 3
P ð SÞ ¼ ¼ ¼ 0:25:
n 12

P(patient suffers from high fever)

nðFÞ 8
PðF Þ ¼ ¼ ¼ 0:6667:
n 12

P(satisfied with service and suffers from high fever)

nðS \ FÞ 2
PðS \ FÞ ¼ ¼ ¼ 0:16667:
n 12

P(satisfied with service and does not suffer from high fever)

nðS \ FÞ 1
PðS \ FÞ ¼ ¼ ¼ 0:0833:
n 12

(b) The probability of selecting a patient who suffers from high fever given that the
patient is satisfied with service is

PðS \ FÞ 2=12
PðFjSÞ ¼ ¼ ¼ 0:6667:
PðSÞ 0:25

(c) The events S and F are independent because PðFjSÞ ¼ PðFÞ.


(d) The events S and F are not disjoint because S \ F 6¼ /; nðS \ FÞ ¼ 2.
3.6 Conditional Probability, Bayes’ Theorem, and Applications 93

3.6 Conditional Probability, Bayes’ Theorem,


and Applications

Bayes’ theorem gives a posterior probability using the estimate used for a prior
probability. This procedure is performed using the concept of the conditional
probability. Let us consider that there are two states regarding the disease and two
states stating the result of a test then the outcomes are

We define the following events:


D: the individual has the disease (presence of the disease),
D: the individual does not have the disease (absence of the disease),
T: the individual has a positive screening test result, and
T: the individual has a negative screening test result.
There are four possible situations as shown in the following table:

Status of the disease


+ve (D: Present) −ve (D: Absent)
Result of the test +ve (T) Correct diagnosis False positive result
−ve (T) False-negative result Correct diagnosis

We are interested in the true status of the disease for given test result which is a
posterior probability. This is essentially a conditional probability, for instance,
probability of being suffered from disease for the given fact that the screening test
result shows positive. On the other hand, the estimate of the prevalence of the
disease in the population may be considered as the prior probability which is a
marginal probability and does not depend on any other condition. This helps us to
understand or confirm how good the true status of the disease is for a given test
result.
There are two false results that can happen in an experiment concerning disease
status and test results.
1. A false-positive result: This is defined by a conditional probability

PðTjDÞ ¼ Pðpositive resultjabsence of the diseaseÞ

and this result happens when a test shows a positive status if the true status is
known to be negative.
94 3 Basic Probability Concepts

2. A false-negative result: The false negative can be defined by the following


conditional probability:

PðTjDÞ ¼ Pðnegative resultjpresence of the diseaseÞ;

where the conditional probability states that a test shows a negative status;
however, the true status is known to be positive.

Two Important Measures: The Sensitivity and Specificity of a Test


1. The Sensitivity: The conditional probability of a positive test given that the
disease status is the presence of disease is

PðTjDÞ ¼ Pðpositive result of the testjpresence of the diseaseÞ;

which is known as sensitivity of a test.


2. The specificity: The specificity is defined as

PðTjDÞ ¼ Pðnegative result of the testjabsence of the diseaseÞ;

which is the probability of a negative test result given the absence of the disease.
To clarify these concepts, suppose we have a sample of (n) subjects who are
cross-classified according to disease status and screening test result (Table 3.9).
For example, there are “a” subjects who have the disease and whose screening
test result was positive.
From this table, we may compute the following conditional probabilities:
1. The probability of false-positive result

nðT \ DÞ b
PðTjDÞ ¼ ¼ :
nðDÞ bþd

2. The probability of false negative result

nðT \ DÞ c
PðTjDÞ ¼ ¼ :
nðDÞ aþc

Table 3.9 Table displaying Test result Disease


test result and true status of
Present (D) Absent (D) Total
disease
Positive (T) a b a+b=n
(T)
Negative c d c+d=n
(T) (T)
Total a+c=n b+d=n n
(D) (D)
3.6 Conditional Probability, Bayes’ Theorem, and Applications 95

3. The sensitivity of the screening test

nðT \ DÞ a
PðTjDÞ ¼ ¼ :
nðDÞ aþc

4. The specificity of the screening test

nðT \ DÞ d
PðTjDÞ ¼¼ ¼ :
nðDÞ bþd

The following conditional probabilities are used in biostatistics very extensively.


The predictive value positive: The predictive value positive is defined as the
conditional probability

PðDjTÞ ¼ Pðthe subject has the diseasejpositive resultÞ;

where the conditional probability states the chance of a subject has the disease
given that the subject has a positive test result.
The predictive value negative: The predictive value negative is defined as the
conditional probability

PðDjTÞ ¼ Pðthe subject does not have the diseasejnegative resultÞ;

where the conditional probability states chance of a subject does not have the
disease, given that the subject has a negative test result.
We calculate these conditional probabilities using the knowledge of the
following:
1. The sensitivity of the test = PðTjDÞ,
2. The specificity of the test = PðTjDÞ, and
3. The probability of the relevant disease in the general population, P(D). It is
usually obtained from another independent study or source.
We know that

PðT \ DÞ
PðDjTÞ ¼ :
PðTÞ

Using the rules of probability, we have defined earlier, it can be shown that

PðTÞ ¼ PðT \ DÞ þ PðT \ DÞ;


PðT \ DÞ ¼ PðTjDÞPðDÞ;
PðT \ DÞ ¼ PðTjDÞPðDÞ;
PðTÞ ¼ PðTjDÞPðDÞ þ PðTjDÞPðDÞ:
96 3 Basic Probability Concepts

Therefore, we reach the following version of Bayes’ theorem:

PðTjDÞPðDÞ
PðDjTÞ ¼ :
PðTjDÞPðDÞ þ PðTjDÞPðDÞ

It is noteworthy that

PðTjDÞ ¼ sensitivity;
PðTjDÞ ¼ 1  PðTjDÞ ¼ 1specificity;
P(D) = The probability of the relevant disease in the general population,

PðDÞ ¼ 1  PðDÞ:

To compute the predictive value negative of a test, we use the following


statement of Bayes’ theorem:

PðTjDÞPðDÞ
PðDjTÞ ¼ :
PðTjDÞPðDÞ þ PðTjDÞPðDÞ

It may be noted that PðTjDÞ = specificity and PðTjDÞ ¼ 1  PðTjDÞ =


1 − sensitivity.
Example 3.11 Let us consider a study to examine the relationship between disease
and a screening test result. Two samples were drawn from the population, one for
the patients with symptoms of disease and another sample without symptoms of the
disease. For both the samples, the screening tests were performed in order to
confirm the disease status. The results are summarized in Table 3.10.
Based on another independent study, it is known that the percentage of patients
with disease (the rate of prevalence of the disease) is 8 per 100.

Table 3.10 Table displaying Disease status


test result and status of
Test result Present ðDÞ Absent (D) Total
disease for the respondents
with or without symptoms of Positive (T) 950 20 970
a disease Negative (T) 50 980 1030
Total 1000 1000 2000
3.6 Conditional Probability, Bayes’ Theorem, and Applications 97

Solution
Using these data, we estimate the following probabilities:
1. The sensitivity of the test

nðT \ DÞ 950
PðTjDÞ ¼ ¼ ¼ 0:95:
nðDÞ 1000

2. The specificity of the test:

nðT \ DÞ 980
PðTjDÞ ¼ ¼ ¼ 0:98:
nðDÞ 1000

3. The probability of the disease in the general population, P(D).


The rate of disease in the relevant general population, P(D), cannot be computed
from the sample data given in the table. However, it is estimated from a different
study that 8% of the population suffered from the disease. Therefore, P(D) can be
estimated as

8%
PðDÞ ¼ ¼ 0:08:
100%

4. The predictive value positive of the test.


We wish to estimate the probability that a subject who is positive on the test has
the disease. We use the Bayes’ theorem as follows:

PðTjDÞPðDÞ
PðDjTÞ ¼ :
PðTjDÞPðDÞ þ PðTjDÞPðDÞ

From the data displayed in table, we compute

950
PðTjDÞ ¼ ¼ 0:95; and
1000
nðT \ DÞ 20
PðTjDÞ ¼ ¼ ¼ 0:02:
nðDÞ 1000

Substituting these results, we get

ð0:95ÞPðDÞ
PðDjTÞ ¼
ð0:95ÞPðDÞ þ ð0:02ÞPðDÞ
ð0:95Þð0:08Þ
¼ ¼ 0:81:
ð0:95Þð0:08Þ þ ð0:02Þð1  0:08Þ
98 3 Basic Probability Concepts

As we see, in this case, the predictive value positive of the test is moderately
high.
5. The predictive value negative of the test
We wish to estimate the probability that a subject who is negative on the test
does not have the disease. Using the Bayes’ formula, we obtain

PðTjDÞPðDÞ
PðDjTÞ ¼ :
PðTjDÞPðDÞ þ PðTjDÞPðDÞ

To compute PðDjTÞ, we first compute the following probabilities:

980
PðTjDÞ ¼ ¼ 0:98;
1000
PðDÞ ¼ 1  PðDÞ ¼ 1  0:08 ¼ 0:92;
nðT \ DÞ 50
PðTjDÞ ¼ ¼ ¼ 0:05:
nðDÞ 1000

Substituting these values, we find

PðTjDÞPðDÞ
PðDjTÞ ¼
PðTjDÞPðDÞ þ PðTjDÞPðDÞ
ð0:98Þð0:92Þ
¼
ð0:98Þð0:92Þ þ ð0:05Þð0:08Þ
¼ 0:996:

As we see, the predictive value negative is very high.

3.7 Summary

The basic probability concepts are introduced in this chapter. It has been mentioned
in Chap. 1 that probability plays a vital role to link the measures based on samples
to the corresponding population values. The concept of random sampling provides
the foundation for such links that depend on the concepts of probability. The
definitions of probability along with experiment, sample space, event, equally
likely, and mutually exclusive outcomes are highlighted. The important operations
on events are discussed with examples. The concepts of marginal and conditional
probabilities are discussed in a self-explanatory manner with several examples. The
multiplication rules of probability and the concept of independent events are
introduced in this chapter. The applications of conditional probability and Bayes’
theorem in analyzing epidemiological data are shown. The measures of sensitivity
and specificity of tests are illustrated with examples.

You might also like