# Lectures 5 and 6: Introduction to Probability theory

(version 7 Jan 2008) This material is copyrighted and MAY NOT be used for commercial purposes

 You are visitor number since 7 Jan 2008 The birthday problem: ## Introduction to Probability

• Events are possible outcomes of some random processes
• Examples of events :
• you pass this class
• The genotype of a random individual is Bb
• the weight of a random individual is less than 150 pounds

• We can define the probability of a particular event, say A, as the fraction of outcomes in which event A occurs.

• Denote Probability of A by Pr(A), or Prob(A)

• For example, when flipping a coin once, the possible outcome is heads or tails.

• Pr(Head) = 0.75 means that chance is 75% that the coin will be a head and hence

• Pr(Tail) = 1 - Pr(Head) = 0.25. ## Useful Rules of Probability

• Probabilities are between zero (never occur) and one (always occur)

• Pr(A) lies between zero and one for all A.

• Probabilities sum to one

• The sum of probabilities of all mutually exclusive events is one.

• For example, if there are n possible outcomes, Pr(1) + Pr(2) + .. + Pr(n) = 1

• Hence, Pr(1) = 1 - ( Pr(2) + .. + Pr(n) ) ## Example: ABO blood groups

Recall that there are four possible phenotypes for the ABO blood group: Type A, Type AB, Type B, and Type O.

Suppose Prob(Type A) = 0.2, Prob(Type B) = 0.3, Prob(Type) AB= 0.1. What is Prob(Type O)?

Since Pr(A) + Pr(B) +Pr(AB) + Pr(O) = 1
Pr(O) = 1- Pr(A) - Pr(B) - Pr(AB) = 1 - 0.2 + 0.3 + 0.1 = 0.4

Likewise, what is the probabilty that you are NOT type O?

Pr(Not O) = 1- Pr(Type 0) = 1-0.4 = 0.6 ## The AND and OR Rules

• AND rule: If A and B are independent events (knowledge of one event tells us nothing about the other event), then the probability that BOTH A and B occur is

• Pr(A and B) = Pr(A) Pr(B)

• Hence generally AND = multiply probabilities

• OR rule: If A and B are exclusive events (nonoverlapping), then the probability that EITHER A or B occurs is

• Pr(A or B) = Pr(A) + Pr(B)

• Hence generally OR = add probabilities ## Example

Suppose we are rolling a fair dice and flipping a fair coin

• What is the probability of rolling an even number on the dice?

• A single roll of a fair dice has possible outcomes 1, 2, 3, 4, 5, 6 each with the same probability, 1/6. Rolling an even number means rolling 2 OR 4 OR 6. These three events (2, 4, 6) are nonoverlapping, and hence exclusive, so we can use the OR = add rule, giving
• Pr(Roll even) = Pr(2) + Pr(4) + Pr(6) = 3/6 = 1/2

• What is the probability of rolling a 5 and then getting a head in the coin flip?

• The dice roll and coin flip are independent events as the outcome of one does not influence the outcome of the other. Hence,
• Pr( Head AND roll 5) = Pr(Head) * Pr(5) = 1/2*1/6 = 1/12 ## Example: Expected Marker Genotype Frequencies

Suppose you have a forensic DNA maker that has five alleles with the following frequecies:

Freq(A1) = 0.1, Freq(A2) = 0.2, Freq(A3) = 0.2, Freq(A4) = 0.4, Freq(A5) = 0.1,

What the expected frequency of an A5A5 homozygote?

To get an A5A5, that individual must get an A5 from its father and get an A5 from its mother.

If we have random mating, then

Pr(A5 from father AND A5 from mother) = Pr(A5)*Pr( A5 from mother) = 0.12 = 0.01

What the expected frequency of an A1A2 heterozygote?

There are two ways for this to happen: A1 from father and A2 from mother or A2 from father and A1 from mother.

Pr(A1 from father and A2 from mother or A2 from father and A1 from mother)

= Pr(A1 from father and A2 from mother) + Pr( A2 from father and A1 from mother).

= Pr(A1 from father)*(Pr A2 from mother) + Pr( A2 from father)*Pr( A1 from mother).

= 0.1*0.2 + 0.2*0.2 = 2*0.1*0.2 = 0.04 ## Conditional Probability

How do we compute joint probabilities when A and B are NOT independent (i.e., knowing that A has occurred provides information on whether or not B has occurred).

• The joint probability of A and B, Pr(A,B) , is the product of the probability of B, Pr(B), with the Probability of A given B, Pr(A | B).

• Pr(A,B) = Pr(A | B) Pr(B)

• Pr (A | B) is called the conditional probability of A given B

• Pr (A | B)= Pr(A,B) / Pr(B)
• A and B are said to be independent if Pr(A | B) = Pr(A), so that knowing event B occurred gives us no information about event A. ## Example

• Suppose we cross two Aa parents, where AA and Aa offspring are yellow, while aa offspring are green. Here,
• Pr(AA) = Pr(aa) = 1/4
• Pr(Aa) = 1/2
• Thus, Pr(Yellow) = Pr(AA) + Pr(Aa) = 3/4.
What is the probability that a yellow offspring has genotype Aa? Using our formula,

• Pr(genotype = Aa | offspring = Yellow) = Pr(genotype =Aa, offspring = Yellow) / Pr(offspring = Yellow) = (1/2)/(3/4) = 2/3.

Likewise

• Pr(genotype = AA | offspring = Yellow) = (1/4)/(3/4) = 1/3. ## Example: Lotto Consider the Arizona State Lottery, wherein you pick 6 numbered balls out of 40. If all six of your balls are drawn, you win. What is the chance of this happening? Prob(win jackpot) = (6/40)*(5/39)*(4/38)*(3/37)*(2/36)*(1/35) = 1/ 5,245,786

### How long must one play lotto to have a reasonable (say 50 percent) chance of winning the jackpot?

Suppose you buy 100 different lotto tickets for each drawing. How many such drawings do you have to play to have a 50 percent chance of winning (at least) one jackpot?

• Since you pick 100 out of 5,245,786 possible numbers, the probability of winning on any given drawing is

• 100 / 5,245,786 = 0.000019

• Likewise, the probability of losing is

• 1- Pr( winning ) = 1 - 0.000019 = 0.999981.

• The probability of losing k drawings in a row is • We are interested in the number of drawings k such that this probability is 0.5 or less, • Recall (from your high school days ) one feature about taking the logarithm (or log) of a number,

### log(xA) = A*log(x)

• Thus, we can solve for k by taking logs to give • Lotto drawings are twice a week, so there are 52*2 = 104 drawings per year, taking you 36,360/104 = 363 years to have this many plays. If you win on the 36,360-th try, you will have spent almost \$3.64 million to win (most likely) 1.5 million. See why the state of Arizona likes Lotto?
Probabilities for the birthday problem