seg 2430 tutorial2 - chinese university of hong kong

22
SEG 2430 Tutorial 2

Upload: others

Post on 23-Jan-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SEG 2430 Tutorial2 - Chinese University of Hong Kong

SEG 2430 Tutorial 2

Page 2: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Sample Space

Sample space is all possible outcomes of an experimentEvent is one of the possible outcomes of an experimentExample:

suppose there are three tutorials and for each tutorial there must be at least one tutor. Totally, four tutors in the course

Page 3: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Sample Space 2Sample Space Example

1, 1

1, 2

1, 3

1, 4

2, 1

2, 2

2, 3

2, 4

3, 1

3, 2

3, 3

3, 4

0

1

2

3

4

0 1 2 3 4

Class

Num

ber

of T

utor

s A

tten

d

A

C

B

A: More than 1 tutors attend tutorial 1 D: less than 3 tutors

B: In all tutorials, there are 3 tutors attending attend tutorial 1

C: In tutorial 2 and 3, there are 2 tutors attending

What about the following?

1) A∩D

2) Not C

Which two set(s) is (are) mutually exclusive?

D

Page 4: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Counting 1

Multiplication of choices: If sets A1, A2, …,Akcontain, respectively, n1, n2, …,nkelements, there are n1*n2…*nk ways of choosing first an element of A1, then an element of A2, …, and finally an element of Ak.

Eg: There are 24 boys and 23 girls in your class, we want to select one boy and one girl to sing a song, how many ways can we do such a selection?

Page 5: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Counting 2

nPr=n(n-1)(n-2)…(n-r+1)=n! / (n-r)!Formula for the total number of permutations (any particular arrangement or order) of r objects selected from a whole set of n distinctobjects.Eg:There are 4 people Tom, Joe, Ken and Carol for 4 different position: president, vice president, finance manager and IT manager, how many ways can we arrange the 4 people to those positions?

Page 6: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Counting 3

nCr=n(n-1)(n-2)…(n-r+1)/r!=n! / r!(n-r)!Formula for the number of ways in which r objects can be selected from a set of n distinct objects( combinations).

Eg: There are 4 people Tom, Joe, Ken and Carol competing for one position ,president, what is the number of possible result?

Page 7: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Exercise

A carton of 12 rechargeable batteries contains one that is defective. In how many ways can an inspector choose 3 of the batteries and (a) get the one that is defective;(b) not get the one that is defective.What if we suppose that two of the batteries are defective, then In how many ways can the inspector choose 3 of the batteries and get(a) none of the defective batteries;(b) one of the defective batteries;(c) both of the defective batteries?

Page 8: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

A1(a):11C2*1C1=11! / 2!(11-2)!*1! / 1!(1-1)!=55A1(b):11C3=11 ! / 3!(11-3)!=165A2(a):10C3= 10! / 3!(10-3)!=120A2(b):10C2*2C1=10!/2!(10-2)!*2!/1!(2-1)!=90A2(c):10C1*2C2=10!/1!(10-1)!*2!/2!(2-2)!=10

Page 9: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Axioms of probability

Axiom 1: 0<=P(A)<=1 for each event A in SAxiom 2: P(S)=1Axiom 3: If A and B are mutually exclusive events in S, then P(AUB)=P(A)+P(B)

Page 10: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Theorems for calculating prob.

If A1, A2, …, An are mutually exclusive events in a sample space S, then P(A1UA2U…UAn)=P(A1)+P(A2)+…+P(An)If A is an event in the finite sample space S, then P(A) equals the sum of the probabilities of the individual outcomes comprising A.If A and B are any events in S, then P(AUB)=P(A)+P(B)-P(A ∩ B)If A is any event in S, then P( not A)=1-P(A)

Using Venn diagram to visualize

Page 11: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Venn Diagram

Page 12: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Exercise 3.38

Explain why there must be a mistake in each of the following statements:

(a) The probability that a mineral sample will contain silver is 0.38 and the probability that it will not contain silver is 0.52.

(b) The probability that a drilling operation will be a success is 0.34 and the probability that it will not be a success is -0.66.

(c) An air-conditioning repair person claims that the probability is 0.82 that the compressor is all right, 0.64 that the fan motor is all right, and 0.41 that they are both all right.

Page 13: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

a: a mineral sample will contain silver and a mineral sample will not contain silver are mutually exclusive events, and their union is the whole sample space, so the sum of the two probabilities should be 1.

b: no probability can take negative value

Page 14: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

c:event A= the compressor is all right event B=the fan motor is all rightP(AUB)=P(A)+P(B)-P(A ∩B)=0.82+0.64-0.41=1.05>1

Page 15: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Exercise 3.48

Given P(A)=0.35, P(B)=0.73 and P(A ∩B)=0.14, find(a) P(AUB);(b) P( not A ∩ B);(c) P(A ∩ not B );(d) P( not A U not B)

Page 16: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

Page 17: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

(a) P(AUB)= P(A)+P(B)-P(A ∩B)=0.35+0.73-0.14=0.94(b) P( not A ∩ B)=P(B)-P(A ∩ B)=0.73-0.14=0.59(c) P(A ∩ not B )= P(A)-P(A ∩ B)=0.35-0.14=0.21(d) P( not A U not B)=1-P(A ∩ B)=1-0.14=0.86

Page 18: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Conditional Probability

If A and B are any events in S and P(B) does not equal to 0, the conditional probability of A given B is P(A|B)=P(A ∩B)/P(B)

Page 19: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Independent events

Two events A and B are independent events if and only if P(A ∩ B)=P(A)*P(B)

Eg: A newly married couple wishes to have two babies. What’s the following probabilities:(a) the first and the second baby are both boy;(b) if they have had one boy, and the next baby is also a boy.

Page 20: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

P( the first=boy ∩ the second=boy )= P( the first=boy)*P( the first=boy)=0.5*0.5P( the second=boy/ the first=boy )= P( the first=boy ∩ the second=boy )/ P( the first=boy)= 0.5*0.5/0.5

Page 21: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Exercise

A math teacher gave her class two tests. 25% of the class passed both tests and 42% of the class passed the first test. What percent of those who passed the first test also passed the second test? In the United States, 56% of all children get an allowance and 41% of all children get an allowance and do household chores. What is the probability that a child does household chores given that the child gets an allowance?

Page 22: SEG 2430 Tutorial2 - Chinese University of Hong Kong

Solution

A1: suppose there are 100 students totally. Then 25 passed both tests, and 42 passed the first test. The percent of those who passed the first test also passed the second test=25/42=59.52%A2: event A= a child does household chores , event B= a child gets an allowance. We know that P(B)= 56%,and P(A ∩ B)= 41%, then P(A / B)= P(A ∩ B)/P(B)= 41%/ 56%=0.7321