Upload
others
View
8
Download
0
Embed Size (px)
Citation preview
Lecture 2: Probability
21st of October 2015
Lecture 2: Probability 21st of October 2015 1 / 56
Outline
In this and the following lecture we will learn about
why we need to learn about probability
what probability is
how to assign probabilities
how to manipulate probabilities and calculate probabilities of complexevents
Lecture 2: Probability 21st of October 2015 2 / 56
populationabout aHypothesis
STATISTICSStudyDesign
Propose anexperiment
Takea
sample
STATISTICALTEST
ExamineResults
Lecture 2: Probability 21st of October 2015 3 / 56
Why do we need probability?
The conclusion we make about a hypothesis depend upon the samplewe take.
The sample we take may lead us to the wrong conclusion about thepopulation.
We need to know what the chances are of this happening.
Probability is the study of chance.
Lecture 2: Probability 21st of October 2015 4 / 56
Baby boom example
Hypothesis: Boys weight more than girls at birth.
Data from our sample:Sample mean of boys weights = xboys = 3375.308Sample mean of girls weights = xgirls = 3132.444Difference between sample means: D = xboys − xgirls = 242.8632
Statistical analysis:
Does this allow us to conclude that in the population boys are bornheavier than girls?
Is the difference higher than would be expected by chance?
If yes then we can be confident that in the population boys areheavier than girls on average at birth.
Lecture 2: Probability 21st of October 2015 5 / 56
Chance experiment
In probability we consider chance experiment: situation whose outcome isuncertain.
Examples:
Rolling a dice
Tossing a coin
Counting number of people with glasses in the class
Occurence of a given phenotype in a population
Measuring glucose
Drug trial
Launching a rover on Mars
Lecture 2: Probability 21st of October 2015 6 / 56
Sample space
The sample space for an experiment is the set of all possible outcomes.
Examples:
Rolling a dice: Ω = 1, 2, 3, 4, 5, 6Tossing a coin: Ω = Head, TailCounting people in the class: Ω = 0, 1, 2 . . . nOccurence of a given phenotype in a population (percentage):Ω = [0, 100]
Drug trial : Measure of disease progress
Launching a rover on Mars: Ω = Crash, Land
Lecture 2: Probability 21st of October 2015 7 / 56
Puzzle 1
You are dealt two cards successively without replacement from a standarddeck of 52 playing cards.
Find the probability that the first card is a six and the second card is aQueen.
Lecture 2: Probability 21st of October 2015 8 / 56
Puzzle 2
You have reached the final of a game show. The host shows you threedoors and tell you that there is a prize behind one of the door. You pick adoor. The host then opens one of the door you did not pick: there is noprice behind this door. He then asks you if you want to change from thedoor you chose to the other remaining door.
Is it to your advantage to switch your choice?
Lecture 2: Probability 21st of October 2015 9 / 56
Simple example: Rolling a die
Consider the experiment of rolling a fair six-sided die.
The sample space of our experiment is the set S = 1, 2, 3, 4, 5, 6.
A particular outcome is called a sample point.Example: The outcome ”the top face shows a three” is the sample point 3.
A collection of possible outcomes is called an event.Examples:
The event A1, that the die shows an even number is the subsetA1 = 2, 4, 6 of the sample space.
The event A2 that the die shows a number larger than 4 is the subsetA2 = 5, 6.
Lecture 2: Probability 21st of October 2015 10 / 56
Calculating simple probabilities
The probability of an event is a number between 0 and 1, inclusive, thatindicates how likely the event is to occur.
The higher the probability of an event, the more certain we are that theevent will occur.
In some settings (like the example of the fair die considered above) it isnatural to assume that all the sample points are equally likely.
In this case, we can calculate the probability of an event A as
P (A) =|A||S|
,
where |A| denotes the number of sample points in the event A.
Lecture 2: Probability 21st of October 2015 11 / 56
Die example (continued)
S = 1, 2, 3, 4, 5, 6 A1 = 2, 4, 6 A2 = 5, 6
P (A1) =|A1||S|
=3
6=
1
2
S
2
1 3
4 6
5
A1
P (A2) =|A2||S|
=2
6=
1
3
S
2
1 3
4 6
5 A2
Lecture 2: Probability 21st of October 2015 12 / 56
Intersection
What about P (face is even, and larger than 4) ?
We can write this event in set notation as A1 ∩A2.
This is the intersection of the two events, A1 and A2
i.e the set of elements which belong to both A1 and A2.
A1 ∩A2 = 6 ⇒ P (A1 ∩A2) =|A1 ∩A2||S|
=1
6
S
2
1 3
4 6
5 A2
A1
Lecture 2: Probability 21st of October 2015 13 / 56
Union
What about P (face is even, or larger than 4) ?
We can write this event in set notation as A1 ∪A2.
This is the union of the two events, A1 and A2
i.e the set of elements which belong either A1 and A2 or both.
A1 ∪A2 = 2, 4, 5, 6 ⇒ P (A1 ∪A2) =|A1 ∪A2||S|
=4
6=
2
3
S
2
1 3
4 6
5 A2
A1
Lecture 2: Probability 21st of October 2015 14 / 56
Complement
What about P (face is not even) ?
We can write this event in set notation as Ac1.
This is the complement of the event, A1
i.e the set of elements which do not belong to A1.
Ac1 = 1, 3, 5 ⇒ P (Ac
1) =|Ac
1||S|
=3
6=
1
2
S
2
1 3
4 6
5
A1
Lecture 2: Probability 21st of October 2015 15 / 56
Probability in more general settings
In many settings, either the sample space is infinite or all possibleoutcomes of the experiment are not equally likely. We still wish toassociate probabilities with events of interest.
Luckily, there are some rules/laws that allow us to calculate andmanipulate such probabilities with ease.
Lecture 2: Probability 21st of October 2015 16 / 56
Probability Axioms (Building Blocks)
There are three axioms which we need in order to develop our laws
1 0 ≤ P (A) ≤ 1 for any event A.
2 P (S) = 1.
3 If A1, . . . , An are mutually exclusive events, then
P (A1 ∪ . . . ∪An) = P (A1) + . . . + P (An).
A set of events are mutually exclusive if at most one of the eventscan occur in a given experiment.
Lecture 2: Probability 21st of October 2015 17 / 56
Complement Law
If A is an event, the set of all outcomes that are not in A is called thecomplement of the event A, denoted A.
The rule isA = 1− P (A)
Example:S = the set of students at Oxford. We are picking a student at random.A = the event that the randomly selected student suffers from depression
We are told that 8% of students suffer from depression, so P (A) = 0.08.What is the probability that a student does not suffer from depression?
P (A) = 1− 0.08 = 0.92.
Lecture 2: Probability 21st of October 2015 18 / 56
Addition Law (Union)
Suppose,
A = a randomly selected student from the class has brown eyesB = a randomly selected student from the class has blue eyes
What is the probability that a student has brown eyes OR blue eyes?
This is the union of the two events A and B, denoted A∪B.
In general for two events
P (A ∪B) = P (A) + P (B)− P (A ∩B)
Lecture 2: Probability 21st of October 2015 19 / 56
A B
A∩B
S
If we simply add P (A) and P (B) we will count the sample points in theintersection A ∩B twice and thus we need to subtract P (A ∩B) fromP (A) + P (B) to calculate P (A ∪B).
Lecture 2: Probability 21st of October 2015 20 / 56
Example: SNPs
Single nucleotide polymorphisms (SNPs) are nucleotide positions in agenome which exhibit variation amongst individuals in a species. In somestudies in humans, SNPs are discovered in European populations.
Suppose that of such SNPs,
70% also show variation in an African population,
80% show variation in an Asian population
and 60% show variation in both the African and Asian population.
Suppose one such SNP is chosen at random, what is the probability that itis variable in either the African or the Asian population?
Lecture 2: Probability 21st of October 2015 21 / 56
Write A for the event that the SNP is variable in Africa, and B for theevent that it is variable in Asia.
We are told
P (A) = 0.7
P (B) = 0.8
P (A ∩B) = 0.6.
We require P (A ∪B). From the addition rule:
P (A ∪B) = P (A) + P (B)− P (A ∩B)
= 0.7 + 0.8− 0.6
= 0.9.
Lecture 2: Probability 21st of October 2015 22 / 56
Frequency concept of probability
In tossing a fair coin, both outcomes have the same probability.
This is not the case in general.
Example: Drug effect.
If the drug is found to be effective 30% of the time, we might assigna probability of 0.3 that the probability is effective and a probabilityof 0.7 that it is not effective.
This illustrate the frequency concept of probability:if we have a probability p that an experiment will result in outcomeA, then if we repeat this experiment a large number of times weshould expect that the fraction of times that A will occur is about p.
Lecture 2: Probability 21st of October 2015 23 / 56
Independent events
Two events are independent if the occurrence of one of the eventsgives us no information about whether or not the other event occurs.
Independent events have no influence on each other
Example: You toss a fair coin and it comes up ”Head” three times, what isthe chance that the next toss will also be a ”Head”?
The chance is simply just like ANY toss of the coin.
What happened in the past will not affect the current toss!
The coin tosses are said to be independent.
Lecture 2: Probability 21st of October 2015 24 / 56
Probability of independent events
In probability theory we say that two events, A and B, are independent ifand only if the probability that they both occur is equal to the product ofthe probabilities of the two individual events, i.e.
P (A ∩B) = P (A)P (B)
Lecture 2: Probability 21st of October 2015 25 / 56
Example: Blue eyes and blond hair
Blond hair and blue eyes are two traits often thought to be related toone another.
Calculate the probability of having both blond hair and blue eyestogether if 20% of people have blond hair, 30% of people have blueeyes, and blond hair and blue eyes are independent.
Solution:
A = blond hair
B = blue eyes
Aussming independence of A and B
P (A ∩B) = P (A)P (B) =20
100× 30
100=
600
10000=
6
100
Lecture 2: Probability 21st of October 2015 26 / 56
Example: Blue eyes and blond hair
Suppose that as before, 20% of people have blond hair, and 30% ofpeople have blue eyes.
If 15% of people have both blond hair and blue eyes, are blond hairand blue eyes independent?
Solution:
If blue eyes and blond hair are independent events, the probability ofhaving both blond hair and blue eyes is:
P (A ∩B) = P (A)P (B) =6
100
Since 15% of people have both blond hair and blue eyes and15100 6=
6100 then blue eyes and blond hair are not independent events.
Lecture 2: Probability 21st of October 2015 27 / 56
Summary of this lecture
Define chance experiment, sample space and event
Understand the concept of the probability of an event
Show how to manipulate intersection, union and complement ofevents
Show how to compute analytically probability for simple chanceexperiments
Define independence between event
Lecture 2: Probability 21st of October 2015 28 / 56