1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A S (subset of S)...

19
1 Sets: Reminder Set S – sample space - includes all possible outcomes •AS (subset of S) = complement of A • Intersection (A and B) • Union (A or B) A A S A B A A B B A S B A

Transcript of 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A S (subset of S)...

Page 1: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

1

Sets: Reminder

• Set S – sample space - includes all possible outcomes

• AS (subset of S)

• = complement of A

• Intersection (A and B)

• Union (A or B)

AA

S

A

BA A BBA

S

BA

Page 2: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

2

Probability Rules

1. Any probability is a number between 0 and 1For any event A,

2. All possible outcomes together must have probability 1:

3. The probability that an event does not occur is 1 minus the probability that the event does occur.

p(Ac)=1-p(A)

4. The probability that a empty set occurs is zero

1Sp

1p(A)0

0)p(

Page 3: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

3

Assigning probability to equally likely outcomes

Example

Find the probability of obtaining an even number in one roll of a die

Answer:

There are 6 equally likely outcomes: 1,2,3,4,5,6

S={1,2,3,4,5,6}

A={an even number is observed on the die} = {2,4,6}

5.06

3

Sin outcomes of #

Ain outcomes of #)( AP

The probability of an odd number = Ac.

P(Ac)=1-p(A)=0.5

Page 4: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

4

Die example:

A={1,3} B={1,4,6}

The additive law of probability

)()()()( BAPBPAPBAP

AB

S

BA

6

4

6

1

6

3

6

2)( BAP

}6,5,4,3,2,1{S

Page 5: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

5

Example

Let A be the event that a student gets an A in an exam, and let F be the event that a student is female. Suppose p(A)=.25 and p(F)=.40, and p(A F)=.10.

Find p(A F).

Answer:

if we simply add p(A) and p(F) we will be counting the overlap p(A F) twice.

Therefore:

p(A F) = p(A)+p(F)-p(A F)=

=.25+.40-.1=.55

Page 6: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

6

Example - continued

Say the probability of getting an A on the exam is .25 and the probability of getting a B is .30.Now find p(A B)

Answer:The events A and B are disjoint (also called mutually exclusive), so: p(A B) =p(A) + p(B) = .25+.30=.50

This is just a special case of the addition law, where p(A B) is 0.

Page 7: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

7

Independence and the multiplication rule

Example - penicillin

The probability that a patient is allergic to penicillin is 0.20. Suppose this drug is administered to 2 patients. What is the probability that both patients are allergic to penicillin?

Answer:A=one of the patients is allergic to penicillin

B=the other patient is allergic to penicillin

P(A)=0.2

P(B)=0.2

What event are we looking for?

?)( BAP

Page 8: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

8

Independence and the multiplication rule

Two events are independent if knowing that one occurs does not change the probability the other occurs.

If A and B are independent:

This is the multiplication rule for independent events.

)()()( BPAPBAP

A and B

Page 9: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

9

Back to our penicillin example:

In our example the two events are independent, since knowing that one patient is allergic doesn’t change the probability that the other patient is allergic.

04.02.02.0p(B)p(A)B)P(A

Page 10: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

10

Example:A general can plan a campaign to fight one major battle or three small battles. He Believes that he has probability 0.6 of winning the large battle and probability of 0.8 of winning each of the small battles. Victories or defeats in the small battles are independent. The general must win either the large battle or all three small battles to win the campaign. Which strategy should he choose?

Answer:A-winning the large battle p(A)=Bi=winning a small battle i p(Bi)=p(B1)=0.8 p(B2)=0.8 p(B3)=0.8What are we looking for?p(B1 B2 B3)=?Since B1,B2,B3 are independent p(B1 B2 B3)= p(B1)×p(B2) ×(B3)=0.83=0.512The general should choose the large battle!

0.6

0.8 for each i

Page 11: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

11

Example - Penicillin (continued)The probability that a patient is allergic to penicillin is 0.20. Suppose the drug is administered to 3 people.(a) What is the probability that all 3 patients are allergic?(b) Find the probability that at least one is not allergic

Answer:(a) Define Ai-person i is allergic

P(A1 A2 A3) = p(A1)p(A2)p(A3)=0.23=.0008

(b) p(at least one is not allergic)=

p(1 not allergic) + p(2 not allergic) + p(3 not allergic)=….

=1-p(all three are allergic)=1-0.008=0.992

Events Ai are independent

Page 12: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

12

When events are not independent:

Example

Drawing two aces from an ordinary deck of 52 cards:

For the first card, the probability of an ace is 4/52

If the first card is an ace, the probability that the second card is an ace is 3/51

Page 13: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

13

Conditional probabilityExample:

Here is a two-way table for a class of 100 students, classified according to whether or not they are freshmen, and whether they live on or off campus

What is the probability that a student lives on campus? 55/100=.55Suppose a student is a freshman. What is the probability that the students lives on campus? 20/25=0.80

On Off Total

F 20 5 25

Not F 35 40 75

Total 55 45 100

Page 14: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

14

Conditional probability

We call 0.80 a conditional probability, because a condition (being a freshmen) has been specified.

In general, we write the conditional probability of event A given event B as: p(A|B).

If

O=living on campus

F=freshman

P(O)=0.55

P(O|F)=0.80

Page 15: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

15

Conditional probability

To see how conditional probabilities relate to ordinary ones:

F)|p(O

O FFO

S

p(F)

F)p(O

FO

Page 16: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

16

Conditional probability

In general,

p(B)

B)p(AB)|p(A

This definition, when rearranged, gives:

B)|p(B)p(AB)p(A

Written this way, we are suggesting that B occurred first.

If A occurs first, we would use the equivalent identity:

A)|p(A)p(BB)p(A

Page 17: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

17

Example

Suppose I pick 2 students (without replacing the first before the second is picked) at random from a class of 50 where 30 are male and 20 are female. Find the probability that

1. both are male

Denote:

M1- the first is male

M2-the second is male

49

29

50

30)M|)p(Mp(M)Mp(M 12121

Page 18: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

18

Example

2. One is male and the other is female:

There are two possibilities for this result -

- first is male, second is female

- first is female, second is male

)Mp(F )Fp(M 2121 or

)F|)p(Mp(F)M|)p(Fp(M 121121

49

30

50

20

49

20

50

30

Page 19: 1 Sets: ReminderReminder Set S – sample space - includes all possible outcomes A  S (subset of S) = complement of A Intersection (A and B) Union (A or.

19

Example

Tossing a balanced coin twice: A=first toss is a head B=second toss is a head

What is the probability of obtaining head on the first and the second tosses?

A1=head on the first toss

A2=head on the second toss

p(A1 A2)=p(A1)p(A2|A1)=

=0.5×0.5=p(A1) p(A2)

When events are independent:

p(A B)=p(A) ×p(B)