More Probability STA 220 – Lecture #6 1. Basic Probability Definition Probability of an event –...

23
More Probability STA 220 – Lecture #6 1

Transcript of More Probability STA 220 – Lecture #6 1. Basic Probability Definition Probability of an event –...

More Probability

STA 220 – Lecture #6

1

Basic Probability Definition

• Probability of an event– Calculated by dividing number of ways an event

can occur by number of total possible outcomes

2

of # total

waysof #)( eventP

Independence

• Two events A and B are independent if knowing that one occurs the probability that the other occurs.– Example: Suppose event A is the event that you

toss a penny and it comes up heads and event B is the event that you toss a nickel and it also comes up heads

3

Dependence

• If one of the events influences the outcome of the other than events A and B are .– Example: Suppose A is the event that it is snowing

outside and let B be the event that your shoes are wet.

– Let A be the event that you do not attend a difficult class and suppose event B is the probability of getting an A

4

Independence and the Multiplication Rule

• Rule 5: If A and B are independent,P(A and B) = P(A)*P(B)

This is the multiplication rule for

5

Multiplication Rule• Gregor Mendel used garden peas in some of the

experiments that revealed that inheritance operates randomly. The seed color of Mendel’s peas can be either green or yellow. Two parent plants are “crossed” (one pollinates the other) to produce seeds. Each parent plant carries two genes for seed color, and each of these genes has probability ½ of being passed to a seed. The two genes that the seed receives, one from each parent, determine its color: The parents contribute their genes independently of each other.

6

Multiplication Rule

• Suppose that both parents carry the G and the Y genes. The seed will be green if both parents contribute a G gene; otherwise it will be yellow. If M is the event that the male contributes a G gene and F is the event that the female contributes a G gene, then the probability of a green seed is

P(M and F) = P(M)*P(F)=

7

Multiplication Rule

• Sudden infant death syndrome (SIDS) causes babies to die suddenly (often in their cribs) with no explanation. Death from SIDS has been greatly reduced by placing babies on their backs, but as yet no cause is known.

• When more than one SIDS death occurs in a family, the parents are sometimes accused. One “expert witness” popular with prosecutors in England told juries that there is only a 1 in 73 million chance that two children in the same family could have died naturally. The rate of SIDS in a nonsmoking middle-class family is 1 in 8500

8

Multiplication Rule

• The prosecutor’s calculation was:

• Several women were convicted of murder on this basis, without any direct evidence that they harmed their children.

9

000,250,72

1

8500

1*

8500

1

Caution!!

• The multiplication rule P(A and B) = P(A)*P(B) holds if A and B are independent but not otherwise

• The addition rule P(A or B) = P(A) + P(B) holds if A and B are disjoint but not otherwise

• Do not confuse disjointness with independence. Disjoint events cannot be

10

AND vs OR

• If you want to compute the probability that 2 (or more) events both occur then you are looking for the P(A and B)– Keyword:– If A and B are independent then recall

P(A and B) =

11

AND vs OR

• Example of “AND”• Consider example of tossing a penny and

getting a heads and tossing a nickel and getting a heads. Find the probability that both coins come up heads:

P(Both coins show heads) =

P(Both coins show heads) = (0.5)*(0.5) P(Both coins show heads) = 0.25 = 25%

12

AND vs OR

• If you want to find the probability that one event occurs or another event occurs (or they both occur) then you are looking for the P(A or B)

• General addition rule says:P(A or B) =

• Recall if A and B are disjoint events, then P(A and B) = 0, so the addition rule becomes:

P(A or B) = P(A) + P(B)

13

AND vs OR Examples

• Suppose the probability of being left-handed is 0.10 or 10%. In a family with two children, what’s the probability of both children being left-handed?– Translate problem into shorthand:

P(Both left-handed) = P(1st is L and 2nd is L)= * P(2nd is L) = 0.10*0.10

P(Both left-handed) =

14

AND vs OR Examples

• Roll a die– Let A be the event that you roll an even number =

{2,4,6}– Let B be the event that you roll a number less than

or equal to 3 = {1,2,3}– Find P(A or B)

P(A or B) =P(A) = 3/6, P(B) = 3/6, P(A and B) = 1/6P(A or B) = 3/6 + 3/6 – 1/6 =

15

Contingency Tables

• The following is a contingency table giving the number of colleges in the US by region and type:

16

Region\Type Public Private Total

Northeast 266 555 821

Midwest 359 504 863

South 533 502 1035

West 313 242 555

Total 1471 1803 3274

Contingency Tables• What is the total number of institutions of higher

education in the US?–

• How many institutions are in the Midwest?–

• How many institutions are public?–

• How many institutions are private schools in the south?–

17

Contingency Tables

• Suppose we select one college at random. What is the probability we select a college:– In the midwest?

P(midwest) = P(midwest) = 0.2636

– That is public?P(public) = 1471/3274P(public) =

18

Contingency Tables

• What’s the probability we select a public college in the midwest?– P(public AND in midwest) =

= 0.1097

– P(public OR in midwest)= P(public) + P(midwest) – = 0.4493 + 0.2636 – 0.1097= 0.6032

19

Contingency Table

• What’s the probability we select a college in the midwest or west?– P(midwest OR west)

= P(midwest)+P(west)= 0.2636 + = 0.2636 + 0.1695= 0.4331

20

Contingency Table

• Note that in all previous calculations the denominator is always the in the population

• The conditional probability P(A|B) means the probability that A will occur given that B has occurred.– We are only interested in a certain column or row

of the table now, so the denominator will be the total from that column or row

21

Contingency Table

– Example: What’s the probability a college is public given that its in the northeast?• ONLY interested in the northeast – denominator will be

• Of those colleges in the northeast, how many are also public? • P(public|northeast) = = 0.3240

22

Contingency Tables

• What’s the probability a college is in the south given that its private?– Only interested in schools that are private– What is denominator? – How many private schools are in the south? – P(south|private) = = 0.2784

23