SST1102 Lecture3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

SST1102: Biostatistics

K. Mutangi

Lecture 3: Probability

K. Mutangi SST1102: Biostatistics


Denition of terms
Probability: : probability can be described in simple terms as
the likelihood of an event happening or not happening.
Experiment: it is any procedure that can be repeated
theoretically an innite number of times and has a well dened
set of possible outcomes
Sample outcome: is an eventuality from an experiment
Sample Space: is the totality of all sample outcomes, the
letter S is used to denote the sample space.
Event: any designated collection of sample outcomes,
including individual outcomes, the entire sample space and the
null set constitute an event.
Mutually exclusive events: Events A and B dened over the
sample space are said to be mutually exclusive if they have no
outcomes in common
that is, if A ∩ B = ∅ , where ∅ is the null set..
K. Mutangi SST1102: Biostatistics
Denition of terms

Independent Events: two events A and B are said to be


independent if P (A ∩ B ) = P (A)P (B )

Example
Consider an experiment of ipping a coin three times. What is the
sample space? Which sample outcomes make up the event A:
majority of coins show heads?

Solution:
S = {HHH ; HHT ; HTH ; THH ; HTT ; THT ; TTH ; TTT } is the
sample space. EventA = {HHH ; HHT ; HTH ; THH }

K. Mutangi SST1102: Biostatistics


Probability axioms

Let S have a nite number of members, then a necessary and


sucient set of axioms for a probability P are as follows
Axiom 1: Let A be any event dened over S. Then
0 ≤ P (A) ≤ 1:
Axiom 2: P (S ) = 1.
Axiom 3: Let A and B be any two events dened over S. Then
P (A ∪ B ) = P (A) + P (B ) − P (A ∩ B )
For any two mutually exclusive events A and B,
P (A ∪ B ) = P (A) + P (B ).
P (A0 ) = 1 − P (A) and that P (∅) = 0 where A0 means the
compliment of set A.
De Morgan's law: (A ∩ B )0 = A0 ∪ B 0 and (A ∪ B )0 = A0 ∩ B 0

K. Mutangi SST1102: Biostatistics


Probability example

Example
If P (A) = 13 , P (B ) = 21 and P (A ∪ B ) = 34 .
Find P (A ∩ B ) and P (A0 ∪ B 0 )

Using axiom 3, make (A ∩ B ) subject so that


P (A ∩ B ) = P (A) + P (B ) − P (A ∪ B ) = 121
Finding P (A0 ∪ B 0 ) requires the use of De Morgan's law
(A0 ∪ B 0 ) = (A ∩ B )0 hence P (A0 ∪ B 0 ) = P (A ∩ B )0
Thus P (A ∩ B )0 = 1 − P (A ∩ B ) = 1 − 12 1 11
= 12

K. Mutangi SST1102: Biostatistics


Probability example

Example
A die is loaded in such a way that the probability of any particular
face's showing is directly proportional to the number on the face.
What is the probability that an even number appears?

P [(i face appears)] = P [i ] = ki , i = 1, 2, 3, 4, 5, 6


6 6
P [S ] = P [i ] = ki
X X X

∀s ∈S i =1 i =1
⇒ k + 2k + 3k + 4k + 5k + 6k = 21k = 1 since P [S ] = 1.
Solving for k gives k = 21 1
and even numbers are: 2, 4 and 6.
P [A] = P [2] + P [4] + P [6] = 1221

K. Mutangi SST1102: Biostatistics


Conditional Probability

Conditional probability is a measure of the probability of an


event occuring, given that another event has already occured.

Denition
Let A and B be any two events dened on S such that P (B ) > 0.
The conditional probability of A, assuming that B has already
occurred, is written P (A|B ) and is given by P (A|B ) = PP(A(B∩B) )

K. Mutangi SST1102: Biostatistics


Conditional Probability

Example
In a group of 100 sports car buyers, 40 bought alarm systems, 30
purchased bucket seats and 20 purchased an alarm system and a
bucket seat. If a car buyer chosen at random bought an alarm
system, what is the probability they also bought bucket seats.

Let A = event that buyer bought an alarm system


B= buyer purchased a bucket seat.
Then P [A ∩ B ] = 0.2
P [B |A] = P P[A[∩AB] ] = 00..24 = 0.5

K. Mutangi SST1102: Biostatistics


Conditional Probability

Example
A bag contains red and blue marbles. Two marbles are drawn
without replacement. The probability of selecting a red marble and
then a blue marble is 0.28. The probability of selecting a red
marble on the rst draw is 0.5. what is the probability of selecting
a blue marble on the second draw given that the rst marble drawn
was red?

P [B |R ] = P P[B[R∩R] ] = 00..285 = 0.56

K. Mutangi SST1102: Biostatistics


Conditional Probability
Example
The following table shows the number of athletes who stretch
before exercising and how many had injuries within the past year.
injuries last year No injuries last year Total
Stretches 55 295 350
doesnt stretch 231 219 450
Total 286 514 800

[a]. Find P[athlete stretches before exercising]


[b]. Find P[athlete stretches before exercising| no injury in last
year]
let A = athlete stretches before exercise, B= no injury in last
year.
[a]. P [A] = 350
800 = 0.4375
[b]. p [A|B ] = PP[A[∩BB] ] = 514
295/800 295
/800 = 514 = 0.5739

K. Mutangi SST1102: Biostatistics


Multiplication Rule

Let A and B be any two events, then

P [A ∩ B ] = P [A|B ]P [B ]
Lets suppose we have several events B1 , B2 , . . . , Bk the
multiplication rule applies to each one of them

P [A ∩ B1 ] = P [A|B1 ]P [B1 ]
P [A ∩ B2 ] = P [A|B2 ]P [B2 ]
.. ..
. .
P [A ∩ B k ] = P [A|Bk ]P [Bk ]

K. Mutangi SST1102: Biostatistics


Partition
Denition
A partition of the sample space S, is a collection of disjoint events
B1 , B2 , . . . , Bk whose union is S. Such a partition divides any set A
into disjoint pieces.

B1 B2 B3 B4 B5 B6

K. Mutangi SST1102: Biostatistics


Law of Total Probability

Suppose we have a partition B1 , B2 , . . . , Bk , then any other


event A is a union of its pieces:

A = (A ∩ B1 ) ∪ (A ∩ B2 ) ∪ . . . ∪ (A ∩ Bk )
Since the pieces are disjoint, we have

P (A) = P (A ∩ B1 )+ P (A ∩ B2 )+. . .+ P (A ∩ Bk −1 )+ P (A ∩ Bk )
Applying the multiplication rule gives the following law

P (A) = P (A|B1 )P (B1 ) + P (A|B2 )P (B2 ) + . . . + P (A|Bk )P (Bk )

K. Mutangi SST1102: Biostatistics


Law of Total Probability

Example
Suppose we have two hats: one has 4 red balls and 6 green balls,
the other has 6 red and 4 green. We toss a fair coin, if heads, pick
a random ball from the rst hat, if tails from the second. What is
the probability of getting a red ball?

P (R ) = P (R |H )P (H ) + P (R |T )P (T ) = 104 12 + 106 12 = 12
The total probability of drawing a red ball is a weighted
average of the two conditional probabilities, where the weights
are the probabilities of each condition occuring.

K. Mutangi SST1102: Biostatistics


Baye's Law

Bayes' Theorem is really just the denition of conditional


probability with the Law of Total Probability forming part of it.
Suppose we have a partition B1 , B2 , . . . , Bk , for which we
know the probabilities P (A|Bj ), and we wish to compute
P (Bj |A).
P (Bj ∩ A) P (A|Bj )P (Bj )
P (Bj |A) = =
P (A) P (A)

We then use the law of total probability to compute the


denominator

P (A|Bj )P (Bj )
P (Bj |A) =
P (A|B1 )P (B1 ) + P (A|B2 )P (B2 ) + . . . + P (A|Bk )P (Bk )
K. Mutangi SST1102: Biostatistics
Baye's Law: Example

Example
Suppose that a new screening test is proposed for the detection of
fracture. The prevalence of fracture in the general population is
known to be 10%. The test has been investigated in fracture
subjects and was found to give positive result in 70% of such cases
(sensitivity). When given to subjects without fracture, the test
yielded a positive result of 20%. What is the proportion of subjects
with positive test who when followed up will actually be found to
have fracture?

Let prevalence of fracture= P (D ) = 0.10, the probability of


being positive in fracture subjects P (S |D ) = 0.70
Probability of being positive in non-fracture subjects
P (S |ND ) = 0.2

K. Mutangi SST1102: Biostatistics


Baye's Law: Example

Then the probability that a subject will have fracture given a


positive result is

P (S |D )P (D )
P (D |S ) =
P (S |D )P (D ) + P (S |ND )P (ND )
0.1 × 0.7
=
0.1 × 0.7 + 0.9 × 0.2
= 0.28

K. Mutangi SST1102: Biostatistics


Baye's Law: Exercise

20% of women in a community is diabetic. Of these, 75%


have low bone mineral density (BMD). Of those who did not
have diabetes, 20% have low BMD. What is the probability
that a randomly selected low BMD woman has diabetes?

K. Mutangi SST1102: Biostatistics

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy