Introduction to biostatistics MMPH6002 handout Session 3 PDF

Title Introduction to biostatistics MMPH6002 handout Session 3
Author Charles Yiu
Course Introduction to biostatistics
Institution The University of Hong Kong
Pages 136
File Size 2.4 MB
File Type PDF
Total Downloads 811
Total Views 904

Summary

Session 3ProbabilityIntroduction to Biostatistics CMED6100 / MMPH6002 / CMED Dr. Eric Wan Yuk Fai (yfwan@hku) Department of Family Medicine and Primary Care University of Hong Kong 28 September 2019Course Outline Probability Rules of probability Conditional probability and Bayes theorem Odds Random ...


Description

Session 3 Probability Introduction to Biostatistics CMED6100 / MMPH6002 / CMED7100 Dr. Eric Wan Yuk Fai ([email protected]) Department of Family Medicine and Primary Care University of Hong Kong 28 September 2019 1

Cour Course se O Outlin utlin utline e 1. 2. 3. 4. 5. 6. 7.

Probability Rules of probability Conditional probability and Bayes theorem Odds Random variables Expectation Probability distributions

2

Object Objectiv iv ives es After this session, students will be able to: 1. Quote the classical, frequentist and subjective definitions of probability 2. Define and calculate probabilities in the combinations of two or more events and find out the conditional probabilities 3. Define random variables as quantities whose values are random and follow a probability distribution 4. Recognize binomial and normal distributions 5. Manipulate normal distributions to estimate percentiles and probabilities 3

Part I Probability

4

Pa Parrt I • Probability Interpretation • Rules of probability • Conditional probability • Bayes theorem • Odds

5

Pr Pro obability Inte nterrpretat retatiion How do you interpret the probabilities in the following cases? • The probability of tossing “6” on a fair 6-sided dice is one-sixth. • The chance of getting fail in this module is 2 percent. • The probability that Mrs X, newly diagnosed with the final stage of lung cancer, can still be survived in the next 10 years. • The probability that Mr Y, an elderly people weighted 250 kg with a new diagnosis of stomach cancer, has cancer that caused by obesity. 6

Pr Pro obability Inte nterrpretat retatiion • Random experiment: Events leading to at least two possible uncertain outcomes will occur. e.g., rolling a dice, tossing a coin, or asking a student on whether he/she likes this course or not, etc. • Basic Outcomes: The possible outcomes of a random experiment. • A probability measures of the “likelihood” of the occurrence of an event • e.g. If it has been raining for yesterday and today, the probability that it will continue to rain tomorrow is 60%

• Probability can also measure how likely the certain event occurs but we are uncertain about this event • e.g. The probability that the restaurant is now opening or not. • e.g. The probability of getting 80% score in the Practical 1 test 7

Pr Pro obability Inte nterrpretat retatiion • Usually use P(A) to denote the probability that event A occurs • Measured on a scale from 0 to 1 • P(A) = 0.5 means that there is a equal chance for the event A to occur and not to occur • P(A) = 0 means that the event A is impossible to occur. • e.g. The sun rises from the west.

• P(A) = 1 means that the event A certainly occurs. • e.g. The sun rises from the east.

8

Class Classic ic ical al P Prrobab obability ility • Sample space, S, means the set of all basic outcomes of a random experiment. • The classical probability use sample space to determine the possibility that an event will occur with the assumption that all outcomes in the sample space are equally likely to occur. • Probability of a particular event is the proportion of favorable outcomes among all the possible outcomes e.g. Tossing a fair coin • The possible outcomes, a “head” and a “tail”, are equally likely events with same probability of occurring. (i.e. 𝑆 = {𝐻, 𝑇} ) • The probability of obtaining a “head” (outcome of interest) = # favorable outcomes/ # all possible outcomes =1/2

9

Re Rellative fre req quency pro rob bability • Relative frequency probability measures the likelihood of occurrence for an event if the process is repeated in large number of trials and under same conditions • Relative frequency probability refers to the proportion of times that the event occurs 𝑛) in a large number of trial (n)

e.g. If we toss a coin for 1,000,000 times with “heads” came up for exactly 500,000 times, the probability of tossing “heads” would be ½ • If we tossed a coin for 10,000 times with 5000 trails already came up with head and 4999 trails came up with tails within the first 9,999 trails, is it guaranteed to come up with tail in the 10,000th trail?

10

Re Rellative fre req quency pro rob bability • In reality, the classical probability for an occurrence of an event may not be the same as the relative frequency probability. • However, the relative frequency probability will be asymptotically close to the classical probability if the experiment is repeated n times, where n tends to infinity.

11

Subje Subjectiv ctiv ctive eP Prrobabil obability ity In Intterpr erpret et etaation • In subjective point of view, we focus on the uncertainty of our knowledge rather than the uncertainty of the event’s occurrence. • Subjective Probability measures the uncertainty about a person’s knowledge in the occurrence of event A • Neither equally likely outcomes nor the repeatable experiments • Mainly based on the individual’s own judgement, experience, information and belief • People with different beliefs (or different data) may place different probability on the occurrence of A e.g. Mr. A thinks that there is 25% of chance that will rain tomorrow. 12

Pr Pro oblems with these inte nterrpretati retatio o ns • What situations can give equally-likely outcomes in our daily life? • Can you imagine any non-repeatable situations? • Some classical statisticians argue that subjective interpretation probably suffers from a lack of objectivity because different people can assign different probabilities to the same event based on their own personal points of view • None of the interpretations is completely perfect 13

Pa Parrt I • Probability Interpretation • Rules of probability • Conditional probability • Bayes theorem • Odds

14

Rule Ruless of pr probabil obabil obability ity Suppose event A and B are subsets of a sample space S, we have the following rules: 1. Probability of an empty set ∅ is zero. ( i.e 𝑃𝑟 ∅ = 0 ) 2. Denote Pr 𝐴/ be the probability of event A that will not occur (Complementary event A) Pr 𝐴/ = 1 − Pr(𝐴)

3. It event A is a subset of event B, then Pr 𝐴 ≤ Pr 𝐵 4. 0 ≤ 𝑃𝑟 𝐴 ≤ 1 for any event A 5. 𝑃𝑟 𝑆 = 1

15

Rule Ruless of pr probabil obabil obability ity • Union

of A and B (i.e. 𝐴 ∪ 𝐵) refers to the The union object which are either elements of A and B. set of all

• Intersection The intersection of A and B (i.e. 𝐴 ∩ 𝐵) refers to the set of all objects which belong to both elements of A and B.

16

Rule Ruless of pr probabil obabil obability ity • Additional rule If events A and B are in the same Sample Space S, the probability that either event A or event B will occur is: 𝑃𝑟 𝐴 ∪ 𝐵 = 𝑃𝑟 𝐴 + 𝑃𝑟 𝐵 − Pr(𝐴 ∩ 𝐵)

17

Rule Ruless of pr probabil obabil obability ity • Additional rule Similarly, if events A, B and C are in the same Sample Space S, the probability that either event A, event B or event C will occur is: 𝑃𝑟 𝐴 ∪ 𝐵 ∪ 𝐶 = 𝑃𝑟 𝐴 + 𝑃𝑟 𝐵 + 𝑃𝑟 𝐶 − Pr 𝐴 ∩ 𝐵 − Pr 𝐴 ∩ 𝐶 − Pr 𝐵 ∩ 𝐶 + Pr 𝐴 ∩ 𝐵 ∩ 𝐶

18

Rule Ruless of pr probabil obabil obability ity • Event A and B are said to be disjoint if they have no common outcome. (i.e. 𝐴 ∩ 𝐵 = ∅)

• In other words, event A and B are mutually exclusive and cannot happen at the same time or together. (i.e. Pr 𝐴 ∩ 𝐵 = 0). The probability that either event A or B occurs is : 𝑃𝑟 𝐴 ∪ 𝐵 = 𝑃𝑟 𝐴 + 𝑃𝑟 𝐵 • Denote 𝑂@ be the mutually exclusive basic outcomes of an event for 𝑖 = 1, 2, … , 𝑘 𝑃𝑟 𝑂E ∪ 𝑂F ∪ ⋯ ∪ 𝑂H = ∑H@JE 𝑃𝑟 𝑂@

19

Pr Pro obabi billity Example (Addi dittiona nall Rul ule e) • A card is selected randomly from a standard deck, what is the probability of getting a face card or a black card?

20

Pr Pro obabi billity Example (Addi dittiona nall Rul ule e) • Pr(Getting a face card or a black card)

= Pr Getting a face card + Pr Getting a black card −Pr(Getting a face card with black in colour) 4×3 26 2×3 = + − 52 Spades, 52 52 EF F` ` Clubs = + − _F =

_F a Eb

_F

Spades, Hearts, Diamonds, Clubs

Jack, Queen, King 21

Ex Exaample on specif specifying ying pr probabilities obabilities • Imagine how long it will Assign probabilities to the take the shuttle bus to following possibilities: arrive at HKU? Journey time Probability • Apart from the travelling Less than 15 minutes time, what other factors 15 to less than 35 minutes will affect the duration for 35 to less than 55 minutes the whole journey? 55 to less than 75 minutes At least 75 minutes

22

Ex Exaample on specif specifying ying pr probabilities obabilities

Journey time < 15 minutes 15 to less than 35 minutes 35 to less than 55 minutes 55 to less than 75 minutes At least 75 minutes

Albert 1 0 0 0 0

Probability Billy 0.20 0.65 0.15 0 0

Chris 0 0 0.30 0.60 0.10

23

Ex Exaample on specif specifying ying pr probabilities obabilities • Referring to previous slide, what is the probability that Billy can take less than 35 minutes to arrive at HKU by shuttle bus? Pr(Billy takes < 35 minutes) = Pr 𝐵𝑖𝑙𝑙𝑦 𝑡𝑎𝑘𝑒𝑠 < 15 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 + Pr(𝐵𝑖𝑙𝑙𝑦 𝑡𝑎𝑘𝑒𝑠 𝑤𝑖𝑡ℎ𝑖𝑛 15 𝑡𝑜 35 𝑚𝑖𝑛𝑢𝑡𝑒𝑠) = 0.2 + 0.65 = 0.85 24

Rule Ruless of pr probabil obabil obability ity • A group of events 𝐸E , 𝐸F , … , 𝐸H are collectively exhaustive events if the union of events 𝐸E , 𝐸F , … and 𝐸H is the sample space S. (i. e. EE ∪ EF ∪ ⋯ ∪ Er = S)

• If a group of events 𝐸E , 𝐸F , … , 𝐸H are collectively exhaustive events, at least one of the events will occur. 25

Rule Ruless of pr probabil obabil obability ity • If a group of events 𝐸E , 𝐸F , … , 𝐸H arethen mutually and collectively exhaustive events, exactlyexclusive one and only one of the events will occur.

26

Rule Ruless of pr probabil obabil obability ity • Independent events If the occurrence of event A and the occurrence of event B are independent, then the probability that both event A and B occur is : Prob 𝐴 ∩ 𝐵 = 𝑃𝑟𝑜𝑏 𝐴 ×𝑃𝑟𝑜𝑏 𝐵

27

Pr Pro obabi billity Example (Inde dep pen end dent events) • Opinion poll on launching a new Chinese restaurant in HKU: Support (S) HKU Students (H)

0.515

Non-HKU Students (𝐻/ ) 0.157

Opposed (𝑺𝒄 ) 0.485 0.003

Is the factor for whether a HKU student or not independent of opinion in this poll?

28

Pr Pro obabi billity Example (Inde dep pen end dent events) • Opinion poll on launching a Chinese restaurant in HKU: Support (S) HKU Students (H)

0.515

Non-HKU Students (𝐻/ ) 0.157

Opposed (𝑺𝒄 ) 0.465 0.003

Pr 𝐻 = 0.515 + 0.465 = 0.98 Pr 𝑆 = 0.515 + 0.157 = 0.672 Pr 𝐻 ∩ 𝑆 = 0.515 Pr 𝐻 Pr 𝑆 = 0.98×0.672 = 0.6586 Since Pr 𝐻 ∩ 𝑆 ≠ Pr 𝐻 Pr 𝑆 , the factors for being a HKU student or not is not independent of opinion in this poll. 29

Mor More eP Prrobab obability ility Ex Examples amples • Example 1: Mr Z says that he has 3 children and at least one of them is a female. What is the probability of all the children are females?

30

Mor More eP Prrobab obability ility Ex Examples amples • Example 1 (Answer) It is known that one of the children must be female and the only possible outcome for other children is either male or female. The probability of Mr Z having all E E female children is =z F×F

31

Mor More eP Prrobab obability ility Ex Examples amples • Example 2: If two fair dice is rolled at random at the same time, what is the probability that the sum of two dice is at least 5?

32

Mor More eP Prrobab obability ility Ex Examples amples • Example 2 (Answer) The sum of 2 dice is at least 2. For simplicity, we only need to consider the complementary event cases. i.e. the cases for the sum of 2 dice equal to 2, 3 and 4 only. • The probability that the sum of two dice is at least 5 = 1 – Prob(sum=2) – Prob(sum=3) – Prob(sum=4) E F b = 1− − − `×` =`

_

`×`

`×`

33

Pa Parrt I • Probability Interpretation • Rules of probability • Conditional probability • Bayes theorem • Odds

34

Condit Conditional ional P Prrobability • For any two events A and B, the conditional probability of event A given the occurrence of event B is written as Prob (A|B) and is given by: 𝑃𝑟𝑜𝑏(𝐴 ∩ 𝐵) , 𝑃𝑟𝑜𝑏 𝐴 𝐵 = 𝑃𝑟𝑜𝑏(𝐵)

provided}that}Prob B > 0

35

Ex Exaample – dr draw aw a ccar ar ard d • I have 3 cards with colour on the two sides as: • Blue-Blue • Blue-Red • Red-Red

• Now I shuffle these 3 cards and randomly show you the face of one card • Suppose you see the face-up colour is blue • What is the probability that the other side (face-down) is also blue for this card? 36

Calcul Calculaate the ccondition ondition onditional al pr probabil obabil obability ity Prob (The other side is blue | The top side is blue) = Prob (The other side is blue AND The top side is blue) / Prob (The top side is blue) = Prob (Both sides are blue) / Prob (The top side is blue) = (1/3) / (3/6) = 2/3

37

Re Reaasoning without calculation • The probability you see “blue” on the other side is 1/2, because in total there are 6 sides on the 3 cards, with 3 sides blue and another 3 sides red • When you find the blue side up, two out of three times you will have picked blue-blue The other side is Blue

The other side is Red

The other side is Blue 38

Lis Listt out al alll poss possibilit ibilit ibilities ies A1

B1 A2

C1 B2

Face-up is Blue?

The other side

A1 (Blue) is showed

Yes

A2 (Blue)

A2 (Blue) is showed

Yes

A1 (Blue)

B1 (Blue) is showed

Yes

B2 (Red)

B2 (Red) is showed

No

B1 (Blue)

C1 (Red) is showed

No

C2 (Red)

C2 (Red) is showed

No

C1 (Red)

Possible outcome

C2

Unconditional Conditional Probability Probability 2/3 3/6 = 1/2

39

Condit Conditional ional p prrobability • Recall the theorem for independent events shown in slide 27: Two events A and B are independent if and only if 𝑃𝑟𝑜𝑏 𝐴 ∩ 𝐵 = 𝑃𝑟𝑜𝑏 𝐴 ×𝑃𝑟𝑜𝑏 𝐵

• Corollary,}we}have}the}following:

Events}A}and}B}are}independent}if}and}only}if Prob B A = Prob(B) 40

Condit Conditional ional P Prrobability Ex Examples amples • Mrs. X has taken the breast cancer test recently in QM Hospital and shows a negative result. She wondered whether this breast cancer test result is accurate or not. Her doctor tries to convince her that this breast cancer test statistics is accurate using some statistics in the past.

41

Condit Conditional ional P Prrobability Ex Examples amples • Here is the statistics showing the number of patients with and without breast cancer taking this Breast Cancer screening test with positive and negative test result. Test Positive

Test Negative

Total

With Breast Cancer

19000

1000

20000

Without Breast Cancer

30000

150000

180000

Total

49000

151000

200000

• Mrs. X wants to know the probability of getting a breast cancer given that the test result is negative. Can you help Mrs. X to find such probability?

42

Condit Conditional ional P Prrobability Ex Examples amples • Pr(having breast cancer | Test result is negative)

Pr(𝑃𝑎𝑡𝑖𝑒𝑛𝑡𝑠 ℎ𝑎𝑣𝑒 𝑏𝑟𝑒𝑎𝑠𝑡 𝑐𝑎𝑛𝑐𝑒𝑟 ∩ 𝑇ℎ𝑒 𝑡𝑒𝑠𝑡 𝑟𝑒𝑠𝑢𝑙𝑡 𝑖𝑠 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒) = Pr(𝑇ℎ𝑒 𝑡𝑒𝑠𝑡 𝑟𝑒𝑠𝑢𝑙𝑡 𝑖𝑠 𝑛𝑒𝑔𝑎𝑡𝑖𝑣𝑒) =

1000 151000

= E_E E

≈ 0.0066

1000 200000

151000 200000

43

Condit Conditional ional P Prrobability Ex Examples amples • In a survey about the food quality in HKU canteen, 3000 persons were asked about whether or not he/she is a HKU student or staff and rate their satisfaction on the food quality: Very good

Good

Poor

HKU Student

0.01

0.17

0.50

Non-HKU student

0.13

0.35

0.30

• Suppose one person is chosen at random • Given that the person is a HKU student or staff, what is the probability that he or she thinks that the food quality in HKU canteen is poor? 44

Ex nal P Exaample of Conditio Conditional Prrobability Prob (The person thinks that food quality is poor | The person is a HKU student or staff) Prob (The HKU Staff or student thinks that food quality is poor) = Prob (HKU student or staff)

= ‰.‰EŠ‰.E‹Š‰._‰ ‰._‰

≈ 0.7353

45

Pa Parrt I • Probability Interpretation • Rules of probability • Conditional probability • Bayes theorem • Odds

46

La Law w of TTot ot otal al P Prrob obabilit abilit abilityy • If 0 < 𝑃𝑟𝑜𝑏 𝐵 < 1, then we have the following:

𝑃𝑟𝑜𝑏 𝐴 = 𝑃𝑟𝑜𝑏 𝐴 𝐵 ×𝑃𝑟𝑜𝑏 𝐵 + 𝑃𝑟𝑜𝑏(𝐴|𝐵/ )×𝑃𝑟𝑜𝑏 𝐵/ for any event A.

• In general, if 𝐵E , 𝐵F , … , 𝐵H are mutually exclusive and exhaustive events, then for any event A, we have: Ž

𝑃𝑟𝑜𝑏(𝐴) = •𝑃𝑟𝑜𝑏 𝐴|𝐵Ž ×𝑃𝑟𝑜𝑏 𝐵Ž @JE

47

Ba Bayyes the theor or orem em • Recall the formula for conditional probability for the occurrence of event B given that event A occurs: 𝑃𝑟𝑜𝑏 𝐴 ∩ 𝐵 = 𝑃𝑟𝑜𝑏 𝐴 𝐵 ×𝑃𝑟𝑜𝑏(𝐵)

• Similarly, for the conditional probability of B given A 𝑃𝑟𝑜𝑏 𝐵 ∩ 𝐴 = 𝑃𝑟𝑜𝑏 𝐵 𝐴 ×𝑃𝑟𝑜𝑏 𝐴 • Since 𝑃𝑟𝑜𝑏 𝐴 ∩ 𝐵 = 𝑃𝑟𝑜𝑏 𝐵 ∩ 𝐴 , we have: 𝑃𝑟𝑜𝑏 𝐴 𝐵 ×𝑃𝑟𝑜𝑏 𝐵 = 𝑃𝑟𝑜𝑏 𝐵 𝐴 ×𝑃𝑟𝑜𝑏 𝐴 𝑃𝑟𝑜𝑏 𝐵 𝐴 ×𝑃𝑟𝑜𝑏(𝐴) ∴ Prob 𝐴 𝐵 = 𝑃𝑟𝑜𝑏(𝐵) This is called Bayes theorem.

48

Mammogr Mammogram am Ex Example ample • Recall the conditional probability example in slide 42: Mrs. X has a 10% chance of suffering from breast cancer (Base rate of breast cancer disease) according to past statistics. • Mammography screening can help to determine the sensitivity and specificity. • The sensitivity of the test means the proportion of people with positive test result given that he/she really has disease. • The specificity of the test means the proportion of people with negative test result given that he/she does not have disease. 49

Mammogr am Ex ample Mammogram Example

• Recall}the}result}table}in}our}example:

• Sensitivity = Prob Positive test Breast cancer E“‰‰‰ = F‰‰‰‰

= 0.95 • Speci”icity = Prob Negative test No Breast cancer E_‰‰‰‰ = Ea‰‰‰‰ ≈ 0.8333

50

Mammogr am Ex ample Mammogram Example

• Recall}the}result}table}in}our}example:

• What is the probability that Mrs. X has breast cancer given that the screening result is positive? From the above table, E“‰‰‰ probability of interest = z“‰‰‰ = 0.3878 51

Mammogr am Ex ample Mammogram Example • Now, let’s apply the Bayes theorem to check if it can give the same result: Prob Positive test Breast cancer Prob Breast cancer Positive test ×Prob Positive test = Prob Breast cancer

Now we know that Prob Breast cancer = 0.10 and sensitivity = Prob Positive test Breast cancer = 0.95 • How can we find the Probability of getting a positive test result based on the above information in this slide?

52

Mammogr am Ex ample Mammogram Example • The overall probability of a positive mammogram depends on the proportion of true positives and the proportion of false positives

Prob True positives = Prob Patients with 𝑝𝑜𝑠𝑖𝑡𝑖𝑣𝑒 𝑟𝑒𝑠𝑢𝑙𝑡 𝑎𝑛𝑑 𝑏𝑟𝑒𝑎𝑠𝑡 𝑐𝑎𝑛𝑐𝑒𝑟 = Sensitivity×Prob Breast ca...


Similar Free PDFs