Previous Lecture: Data types and Representations in Molecular Biology
62 Slides822.62 KB
Previous Lecture: Data types and Representations in Molecular Biology
This Lecture Introduction to Biostatistics and Bioinformatics Probability By Judy Zhong Assistant Professor Division of Biostatistics Department of Population Health [email protected]
Beyond descriptive statistics 3 When we have a data set, we usually want to do more with the data than just describe them Keep in mind that data are information of a sample selected or generated from a population, and our goal is to make inferences about the population
Research question: center of a population 4 Population Mean
Research question: center of a population 5 Population Mean Random sample 1 Random sample 2 . . . Random sample n Sample is representative of the population
Research question: center of a population 6 Population Mean Random sample 1 Sample mean 1 Random sample 2 Sample mean 2 . . . . . . Random sample n Sample mean n Sample is representative of the population
Research question: center of a population 7 Population Mean Random sample 1 Sample mean 1 Random sample 2 Sample mean 2 . . . . . . Random sample n Sample mean n How to describe the uncertainty in sample means?
Sample Population 8 To make inferences about population mean (or something else), we need to assess the degree of accuracy to which the sample mean represent the population mean Therefore: Our goal: from sample to population (statistics) To begin with: from population to sample (probability)
Randomness 9 Things may happen randomly, for examples o Comparison of treatment effects in clinical trials o Calculation of the risk of breast cancer
Randomness 10 Things may happen randomly, for examples o Comparison of treatment effects in clinical trials o Calculation of the risk of breast cancer Probability o Study of randomness o Language of uncertainty
Probability theory 11 Probability of an event the likelihood of the occurrence of an event What is a natural way to estimate the probability of an outcome?
12 Example: the probability of a male birth
13 Example: the probability of a male birth Probability frequency of occurrences frequency of all possible 0 Probability 1 occurrences
Basic probability concepts Study of Randomness
Random experiment 15 An experiment for which the outcome cannot be predicted with certainty But all possible outcomes can be identified prior to its performance And it may be repeated under the same conditions
16 The probability of an event is the relative frequency of this set of outcomes over an indefinitely large number of trials
17 The probability of an event is the relative frequency of this set of outcomes over an indefinitely large number of trials In real life, experiments cannot be conducted in infinite number of times Therefore, probabilities of events are estimated from the empirical probabilities obtained from large samples
Notation 18 The set of all possible outcomes of a random experiment is called the sample space, denoted by Ω Let A denote a subset of the sample space, A Ω o A is called an event o { } is often used to denote an event
Basic definition 19 Let Ω denote the set comprised of the totality of all elements in our space of interest o A null set A has no elements o If A Ω , Ā (complement of A) is the set of all elements of which do not belong to A
Basic definition 20 For two sets A and B, o A B : Union of A and B is the set of all elements which belong to at least one of A and B o A B : Intersection of A and B is the set of all elements that belong to each of the sets A and B o A B : A is a subset of B, each element of a set A is also an element of a set B
Example 21 Let A {1, 2, 3} and B {3, 4, 5} o A B {3}
Example 22 Let A {1, 2, 3} and B {3, 4, 5} o A B {3} Let Ω {1, 2, 3, 4, 5, 6, 7, 8, .}: the positive integers, and let A {2, 4, 6, 8, . . .} o Ā {1, 3, 5, 7, 9, . . .}
Example 23 Let A {1, 2, 3} and B {3, 4, 5} o A B {3} Let Ω {1, 2, 3, 4, 5, 6, 7, 8, .}: the positive integers, and let A {2, 4, 6, 8, . . .} o Ā {1, 3, 5, 7, 9, . . .} A {1, 2, 3} and B {1, 2, 3, 4} o A B A {1, 2, 3} and B {3, 4, 5} o A B {1, 2, 3, 4, 5}
Laws of probability 24 Let Ω be the sample space for a probability measure P o 0 P(A) 1, for all events A o P(Ω) 1 o P( ) 0
Laws of probability 25 Let Ω be the sample space for a probability measure P o 0 P(A) 1, for all events A o P(Ω) 1 o P( ) 0 o If A B Ω, P(A) P(B) o P(Ā) 1 P(A)
Mutually exclusive events 26 Events that cannot occur at the same time o Let A , A , A , . . . , A be k subsets of Ω 1 2 3 k o Ai Aj Ø for all pairs (i, j) such that i j
Example 27 o Blood type: o o Let A be the event that a person has type A blood, B event having type B blood, C having type AB blood and D having type O blood A, B, C & D are mutually exclusive
Independent events 28 o Knowing the outcome of one event provides no further information on the outcome of the other event
Independent events 29 o o Knowing the outcome of one event provides no further information on the outcome of the other event Two events A and B are called independent events if P(A B) P(A) P(B)
Dependent events 30 o o Knowing the outcome of one event increases the knowledge of the outcome of another event Two events A and B are dependent events if P(A B) P(A) P(B)
31 Multiplication law of probability Let A1,A2, . . . , Ak be mutually independent events P(A1 A2 . . . Ak) P(A1) P(A2) . . . P(Ak)
Addition law of probability 32 For any events A and B, P(A B) P(A) P(B) P(A B)
Addition law of probability 33 For any events A and B, P(A B) P(A) P(B) P(A B) If two events A and B are mutually exclusive, P(A B) P(A) P(B) P(A) P(B)
Addition law of probability 34 For any events A and B, P(A B) P(A) P(B) P(A B) If two events A and B are mutually exclusive, P(A B) P(A) P(B) If two events A and B are independent, P(A B) P(A) P(B) P(A) P(B)
Mutually exclusive versus mutually independent 35 ? o o A “It rained on Tuesday” and B “It didn’t rain on Tuesday” ? o o A “It rained on Tuesday” and B “My chair broke at work”
Mutually exclusive versus mutually independent 36 o Mutually exclusive o o A “It rained on Tuesday” and B “It didn’t rain on Tuesday” Mutually independent o A “It rained on Tuesday” and B “My chair broke at work”
Note 37 If P(A B) P(A) P(B), A and B are NOT mutually exclusive If P(A B) P(A) P(B), A and B are NOT mutually independent
Note 38 If P(A B) P(A) P(B), A and B are NOT mutually exclusive If P(A B) P(A) P(B), A and B are NOT mutually independent Mutually independent and mutually exclusive are not equivalent A: It rained today & B: I left my umbrella at home Is it mutually independent or mutually exclusive?
Syphilis Example 39 o o o o Define the following events: A {Doctor 1 makes a positive diagnosis} B {Doctor 2 makes a positive diagnosis} Doctor 1 diagnoses 10% of all patients as positive: P(A) 0.1 Doctor 2 diagnoses 17% of all patients as positive: P(B) 0.17 Both doctors diagnose 8% of all patients as positive: P(A B) 0.08 Are the events A and B independent?
Solution 40 o o o o P(A B) 0.08 P(A) P(B) 0.1 0.17 0.017 P(A B) P(A) P(B) A and B are dependent events
41 If A and B are independent we can write P(A B) P(A) P(B) P(A B) P(A) P(B) P(A) P(B)
42 If A and B are dependent, how can we compute P(A B)?
43 If A and B are dependent, how can we compute P(A B)? Conditional probability
44 The conditional probability of A given B is denoted o P(A B) P(A B)/P(B) The conditional probability of B given A is denoted o P(B A) P(A B)/P(A) Equivalently, o P(A B) P(A) P(B A) o P(A B) P(B) P(A B)
45 If A and B are independent,
46 If A and B are independent, we have P(A B) P(A B)/P(B) [P(A) P(B)]/P(B) P(A) P(B A) P(A B)/P(A) [P(A) P(B)]/P(A) P(B)
47 If A and B are independent, we have P(A B) P(A) P(B A) P(B) As a result, If A and B are independent, the event B is not influenced by the event A, and vice versa
Note 48 If A and B are mutually exclusive, and A occurs, then P(B A) 0 (if A occurs, B cannot)
Total probability rule 49 For any event A & B, o P(B) P(B A) P(A) P(B Ā) P(Ā)
Total probability rule 50 For any event A & B, o P(B) P(B A) P(A) P(B Ā) P(Ā) Because o P(B) P(B A) P(B Ā) o P(B) P(A) P(B A) P(Ā) P(B Ā)
Example 3.18: Breast Cancer 51 Physicians recommend that all women over age 50 be screened for breast cancer. The definitive test for identifying breast tumors is a breast biopsy. However, this procedure is too expensive and invasive to recommend for all women over 50. Instead, they are encouraged to have a mammogram every 1 to 2 years. Women with positive mammogram are then tested further with a biopsy Ideally, the probability of breast cancer among women who are mammogram positive would be 1 and the probability of breast cancer among women who are mammogram negative would be 0. The two events {mammogram positive} and {breast cancer} would then be completely dependent; the results of the screening test would determine the disease state The opposite extreme is achieved when the events {mammogram positive} and {breast cancer} are completely independent. In this case, the probability of breast cancer would be the same regardless of whether the mammogram is positive or negative, and the mammogram would not be the useful in screening for breast cancer and should not be used
Relative risk For any two events, the relative risk of B given A is defined as A RR Pr(B A)/Pr(B ) Note that if A and B are independent, then the RR is 1. If two events A and B are dependent, then RR is different from 1. Heuristically, the more the dependence between two events increases, the further the RR will be from 1
Back to the breast cancer example 53 o Suppose that among 100,000 women with negative mammograms 20 will be diagnosed with breast cancer within 2 years, or o Suppose that among 1 woman in 10 with positive mammograms will be diagnosed with breast cancer within 2 years, or Pr(B A) 0.1. Pr( B A ) 20 / 105 0.0002 The two events A and B would be highly dependent, because o o In other words, women with positive mammograms are RRtimes Pr( B A) /likely Pr( B toA develop ) 0.1 / 0breast .0002 cancer 500 over the 500 more next 2 years than are women with negative mammograms
See breast cancer example again Let A {mammogram } and B {breast cancer} In the above example, Pr(B A) 0.1 and Pr(B Ā) 0.0002 Suppose that 7% of the general population of women will have positive mammogram. What is the probability of developing breast cancer over the next 2 years among women in the general population? Using total probability rule: Pr(B) Pr(B A) Pr(A) Pr(B Ā) Pr(Ā) 0.1*0.07 0.002*0.93 0.00719
Exhaustive events 55 A set of events is jointly or collectively exhaustive if at least one of the events must occur Their union must cover all the event within the entire sample space
Exhaustive events 56 A set of events is jointly or collectively exhaustive if at least one of the events must occur Their union must cover all the event within the entire sample space For example, o Events A and B are collectively exhaustive if A B Ω o A and Ā are collectively exhaustive
Exhaustive events A set of events A1, , Ak is exhaustive if at least one of the events must occur More important, Assume that events A1, , Ak are mutually exclusive and exhaustive; that is, as least one of the events must occur and no two events can occur simultaneously. Thus, exact one of the events must occur
Total-probability rule (general version) Let A1, , Ak be mutually exclusive and exhaustive events. The unconditional probability of B (Pr(B)) can be written as a weighted average of the conditional probability of B given Ai (Pr(B Ai)) as follows: Pr( B ) Pr( B A ) Pr( A ) . Pr( B A ) Pr( B A ) Pr( A ) k 1 1 k k k j 1 1. 2. Proof: Pr(B) Pr(B A1) Pr(B Ak), because A1 Ak are mutually exclusive and exhaustive events Pr(B A1) Pr(A1)*Pr(B A1), , Pr(B Ak) Pr(Ak)*Pr(B Ak), by the definition of conditional probability
Review 59 o Probability Study of randomness o o o o Mutually exclusive o o 0 P(A) 1 for any event A P(Ω) 1, P( ) 0 A’s complement Ā, and P(Ā) 1 P(A) P(A B) 0 Mutually independent o P(A B) P(A) P(B)
Review 60 o Addition law of probability o o P(A B) P(A) P(B) P(A B) Multiplication law of probability (for mutually independent events, A1, A2, . . . , Ak ) o P(A1 A2 . . . Ak) P(A1) P(A2) . . . P(Ak)
Review 61 Conditional Probability: P( A B) P( A B) P( B) If A and B are independent, o o P(A B) P(A) P(B A) P(B) For any event A & B, o P(B) P(B A) P(A) P(B Ā) P(Ā)
Next Lecture: Sequence Alignment Concepts