1/35
end of exam 1 material
Probability: Definition
The probability of an event is the proportion of times the event would occur if we repeated a random trial over and over again under the same conditions.
Probability ranges between zero and one
Pr[A] or P(A) means “the probability of event A”
Probability: Random trial
Random trial: a process or experiment that has two or more possible outcomes
Flipping coin (random trial): heads or tails (possible outcomes)
Rolling die (random trial): 1, 2, 3, 4, 5, 6 (possible outcomes)
Probability: Event
Event (of interest): any potential subset of all possible outcomes
the possible results
so for example flipping a coin and getting heads, rolling a die and getting a 3
Venn diagrams
the area of the diagram represents all possible outcomes
a way of showing all the possible outcomes

Probability characters so know
U = or
∩ = and
A = NOT A
P(B | A) = Probability of B given (event) A
Mutually Exclusive
U = or
∩ = and
Two events are mutually exclusive if they cannot occur at the same time
P(A ∩ B) = 0
When rolling one die, it is impossible to obtain both 2 and 4 on a single roll. Therefore, P(2 ∩ 4 on one roll) = 0
for a single observation, it is impossible to be both under 18 years old
and 18 years or older. P(<18 ∩ ≥18) = 0
Discrete Probability Distribution
Describes the probabilities of each of the possible outcomes in a random trial.
Discrete Probability Distributions
Measured in indivisible units
For Discrete numerical variables
For Categorical variables
All the probabilities sum to 1


example:
if you have 2 dice the probability of getting the same number is lower
Between 6-7-8-9 is what you have the highest probability of getting
For 6 there are many different ways to combine the dice to get 6 vs. you have a lower probability of getting 2 because you need both dice to say 1

Continuous Probability Distribution
Can take on any real number value within some range
Because the variable is continuous, there are infinitely many possible values between any two points (for example, between −3 and +3 standard deviations)

Probability of Y being within some range is indicated by the area under the curve
For continuous random variables, the probability of any single exact value is zero, so including or excluding endpoints does not change the probability.
P(a < Y < b) = P(a ≤ Y ≤ b)

Difference between Continuous and discrete probability distributions
The main difference between a discrete and a continuous probability distribution is that discrete distributions deal with separate, countable values, while continuous distributions deal with any value within an unbroken range or interval


Addition Rule
U = or
∩= and

The addition rule: if two events A and B are mutually exclusive then
P (A ∪ B) = P (A) + P (B)
Can be extended to more than two events
Probabilities of all possible mutually exclusive events sum to one
The probability of an event not occurring is one minus the probability that it occurs P (not A) = 1 - P (A)
Addition Rule Practice problem:

a) What is the probability of a person having type O?
b) What is the probability of a person having allele A?
a) What is the probability of a person having type O?

b) What is the probability of a person having allele A?


Addition Rule Practice problem:

What is the probability of a person having anything but type O?
What is the probability of a person having anything but type O?


General Addition Rule (non mutually exclusive events)
Not all events are mutually exclusive, so extra term is needed so you don’t double-count outcomes
P (A ∪ B) = P (A) + P (B) – P (A ∩ B)

Practice Problem: General Addition Rule

What is the probability of a person being type O or Rh +?
What is the probability of a person being type O or Rh +?


Independent Events
Two events are independent if the occurrence of one does not inform us about the probability that the second will occur
Example: Two dice
Event A: the first die shows 3
Event B: the second die shows 5
The result of one die does not affect the probability of the other
Multiplication Rule
If two events are independent, the probability that they both occur is the probability of the first event multiplied by the probability of the second event
P (A ∩ B) = P (A) × P (B)
Can be extended to more than two events
Practice Problem: Multiplication rule
If in US: ~17% adults smoke and ~22% have high blood pressure, What
is the probability that a randomly chosen person is a smoker (S) and
has high blood pressure (HBP)?
If in US: ~17% adults smoke and ~22% have high blood pressure, What
is the probability that a randomly chosen person is a smoker (S) and
has high blood pressure (HBP)?
P (S ∩ HBP) = P (S) × P (HBP)
P (S ∩ HBP) = 0.17 x 0.22 =0.037

Probability Tree
Diagram used to calculate the probabilities of combination of events from multiple random trials
the total probability of all potential outcomes must sum to 1
U = or
∩ = and
A = NOT A
P(B | A) = Probability of B given A


Practice Problem: Probability
Probability that a child is a boy (sex determined at birth) : P(boy) = 0.512
Probability that a child is a girl (sex determined at birth) : 0.488
P(girl) = 1 – P(boy) = 0.488
Question: What is the probability that a couple has two children, with the first being a boy and the second a girl?
Probability that a child is a boy (sex determined at birth) : P(boy) = 0.512
Probability that a child is a girl (sex determined at birth) : 0.488
P(girl) = 1 – P(boy) = 0.488
What is the probability that a couple has two children, with the first being a boy and the second a girl?

Practice Problem: Probability
Probability that a child is a boy (sex determined at birth) : P(boy) = 0.512
Probability that a child is a girl (sex determined at birth) : 0.488
Question: What is the probability that a couple has two children, with one boy and one girl?
Probability that a child is a boy (sex determined at birth) : P(boy) = 0.512
Probability that a child is a girl (sex determined at birth) : 0.488
Question: What is the probability that a couple has two children, with one boy and one girl?
Two possible paths:
1) boy first, girl second; 2) girl first, boy second
Addition rule:
P (Boy ∩ Girl) = P (path1) + P (path2)
P (Boy ∩ Girl) = 0.25 + 0.25 = 0.50

Binomial distribution - Another way to find probability
formula:


n = number of trials (2)
x = number of success (1)
Practice Problem: Probability - SOLVE USING BINOMIAL DISTRIBUTION
Probability that a child is a boy (sex determined at birth) : P(boy) = 0.512
Probability that a child is a girl (sex determined at birth) : 0.488
Question: What is the probability that a couple has two children, with one boy and one girl?
Probability that a child is a boy (sex determined at birth) : P(boy) = 0.512
Probability that a child is a girl (sex determined at birth) : 0.488
Question: What is the probability that a couple has two children, with one boy and one girl?
P(one boy) = 0.50






Dependent Events
Two events are dependent if the occurrence of one event changes the probability of the other.
Example:
Nasonia wasps
Parasitic (lays eggs on fly pupae)
Female can manipulate sex of offspring
If host previously parasitized: produce more sons
If host not previously parasitized: produce more daughters


General Multiplication Rule
The general multiplication rule finds the probability that both of two
events occur, even if the two are dependent:
P (A ∩ B) = P A x P(B|A)
Example:
Host parasitized, and the mother wasp laid a male egg?
P ([A ∩ B] = 0.20 x 0.90 = 0.18

Conditional probability
Conditional probability is the probability of an event occurring given that a condition is met
P(B|A)
Example:

P (new egg is male | host is previously parasitized) = 0.90
Sampling Without Replacement
It makes events dependent because the first outcome changes the next probability.
Example:
From a deck of cards, you draw one ace and do not replace it before drawing a second card. What is the probability that the second card is also an ace?
Deck of cards=52
Aces = 4
P (second ace) = 3/51 = 0.06
Practice Problem: Probability
Among women voluntarily tested for sexually transmitted diseases in one university, 24% tested positive for human papilloma virus (HPV) only, 2% tested positive for Chlamydia only, and 4% tested positive for both HPV and Chlamydia (Tábora et al. 2005).
What probability rule should be used in this situation? Then calculate the probability that a woman tests positive for either HPV or Chlamydia.
answer:
general addition rule, 22%

Practice Problem: Probability
1980s Canada
52% adult men smoke
Smoker’s probability of lung cancer = 17.2%
Non-smoker’s probability of lung cancer = 1.3%
a) What is conditional probability of man getting cancer, given that he smoked?
b) Using general multiplication probability rule, calculate the probability that a man both smoked and eventually contracted lung cancer?
c) Using general multiplication probability rule, calculate the probability that a man both did not smoke and never contracted lung cancer?
1980s Canada
52% adult men smoke
Smoker’s probability of lung cancer = 17.2%
Non-smoker’s probability of lung cancer = 1.3%
a) What is conditional probability of man getting cancer, given that he smoked?
P (cancer | smoker) = 0.172
b) Using general multiplication probability rule, calculate the probability that a man both smoked and eventually contracted lung cancer?
P (S ∩ LC) = P (S)× P(LC ∣ S)
P (ManS ∩ ManLC) = 0.52 × 0.172 = 0.08944
c) Using general multiplication probability rule, calculate the probability that a man both did not smoke and never contracted lung cancer?
P(NS ∩ NLC) = P [non-smoker] P[no cancer | non-smoking]
P(NS ∩ NLC) = (1 − 0.52 ) x (1 − 0.013) = 0.47376
Practice Problem: Probability
The gene Prdm9 is thought to regulate hotspots of recombination (crossing over) in mammals, including humans. In the people of Han Chinese descent living in the Los Angeles area there are five alleles at the Prdm9 gene, labeled A1, A2, A3, A4, and A5. The relative frequencies with which these alleles occur in that population are 0.06, 0.03, 0.84, 0.03, and 0.04, respectively. Assume that in this population, the two alleles present in any individual are independently sampled from the population as a whole.
a) What is the probability that a single allele chosen at random from this population is either A1 or A4?
b) What is the probability that an individual has two A1 alleles (i.e., what is the probability that its first allele is A1 and its second allele is also A1)?
c) What is the probability that an individual is not A1A1?
d) What is the probability, if you drew two individuals at random from this population, that neither of them would have an A1A1 genotype?
a) What is the probability that a single allele chosen at random from this population is either A1 or A4?
P (A1 ∪ A4) = P (A1) + P (A4) – P (A1 ∩ A4)
P (A1 ∪ A4) = 0.06 + 0.03 + 0 = 0.09
b) What is the probability that an individual has two A1 alleles (i.e., what is the probability that its first allele is A1 and its second allele is also A1)?
P (A1∩ A1) = P (A1) X P (A1)
P (A1∩ A1) = 0.06 X 0.06 = 0.0036
c) What is the probability that an individual is not A1A1?
P (A1∩ A1) = 0.0036
P (not A1∩ A1) = 1- 0.0036 = 0.9964
d) What is the probability, if you drew two individuals at random from this population, that neither of them would have an A1A1 genotype?
P (not A1∩ A1) = 0.9964
P (ind1 not A1∩ A1 AND ind2 not A1∩ A1 ) = 0.9964 X 0.9964 = 0.992813
Practice Problem:
Studies have shown that the probability that a man washes his hands after using the restroom at an airport is 0.74, and the probability that a woman washes hers is 0.83 (American Society for Microbiology 2005). A waiting room in an airport contains 40 men and 60 women. Assume that individual men and women are equally likely to use the restroom.
What is the probability that the next individual who goes to the restroom will wash his or her hands?


Practice Problem: Probability
You are interviewed for a job as a snake handler, and as part of the interview you must pick up two rattlesnakes from a pit. The pit contains 8 snakes, 3 that are defanged and harmless and 5 that are dangerous. You pick up one snake with your right hand and another with your left hand.
What is the probability that you picked up NO dangerous snakes?

Practice problem: Binomial distribution

20% of adults have High Blood Pressure (HBP). You randomly select 10 adults.
What is the probability that exactly 2 have HBP?
n = number of trials (10)
x = number of success (2)
p = (0.20)


It is easier to use the binomial distribution because our number of trials is 10 (this would take a long time for probability)
Practice problem: Binomial distribution

In a certain population, the probability of a person carrying a specific recessive gene for lactose intolerance is 25%. You randomly select a group of 8 individuals from this population.
What is the probability that exactly 3 of them carry the gene?
n = number of trials (8)
x = number of success (3)
p = (0.25)


Practice problem: Probability
What is the probability that someone has high blood pressure given that they are a smoker?

Step 1 — Restrict the sample
We now ONLY look at smokers

Step 2 — Compute
P(HBP ∣ Smoker)= 120/200 =0.60
Practice problem: Probability
Deck of Cards (52)
What is the probability a card is a King given that it is red?
2 red kings
red cards are half the deck = 52/2 = 26

Practice problem: Probability
A population study includes 2,000 adults. 300 have diabetes.
Among those with diabetes, 120 have hypertension.
What is the probability that a randomly selected adult has hypertension given that they have diabetes?
P(Hypertension∣Diabetes) = 120/300 = 0.40