lecture1 1 probability theory and statistics kasper k. berthelsen, dept. for mathematical sciences...

21
Lecture1 1 Probability Theory and Statistics er K. Berthelsen, Dept. For Mathematical Sciences [email protected] rature: Walpole, Myers, Myers & Ye: Probability and Statistics for Engineers and Scientists, Prentice Hall, 8th ed. es and lecture overview: http:// people.math.aau.dk/~kkb/Undervisning/ET610/ ure format: 2x45 min lecturing followed by exercises in group

Upload: dinah-moody

Post on 17-Dec-2015

227 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

Lecture11

Probability Theory and Statistics

Kasper K. Berthelsen, Dept. For Mathematical [email protected]

Literature:Walpole, Myers, Myers & Ye: Probability and Statistics for Engineers and Scientists, Prentice Hall, 8th ed.

Slides and lecture overview:http://people.math.aau.dk/~kkb/Undervisning/ET610/

Lecture format: 2x45 min lecturing followed by exercises in group rooms

Page 2: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

Lecture12

STATISTICSWhat is it good for?

Forecasting:

• Expectations for the future?• How will the stock markets behave??

0

10

20

30

40

50

60

70

80

90

1 2 3 4

A

B

C

Analysis of sales:

• How much do we sell, and when?• Should we change or sales strategy?

Quality control:

• What is my rate of defective products?• How can I best manage my production? • What is the best way to sample?

Page 3: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 13

Probability theorySample space and events

Consider an experiment

Sample space S:

Event A:

Complementary event A´:

VENN DIAGRAM

A

A

Example:A´={2,3,4,5} rolling a dice

Example:S={1,2,…,6} rolling a diceS={plat,krone} flipping a coin

Example:A={1,6} when rolling a dice

S

S

S

Page 4: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 14

Probability theoryEvents

Example:Rolling a dice

4 6 1 3

Union:AB={1,2,3,4,6}

Intersection:AB={2}S={1,2,3,4,5,6}

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

C DDisjoint events: CD = Ø

C={1,3,5} and D={2,4,6} are disjoint

A B

2

5S

S

Page 5: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 15

Probability theoryCounting sample points

Ways of placing your bets: Guess the results of 13 matchesPossible outcomes:

Home winDrawAway win

1 X 2

3 possibilities

3 possibilities

•••

3 possibilities

Answer: 3·3·3· ··· ·3 = 313

The multiplication rule

Page 6: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 16

Probability theoryCounting sample points

Ordering n different objectsNumber of permutations ???

3!= 6

There are• n ways of selecting the first object • n -1 ways of selecting second object

• 1 way of selecting the last object

•••

n · (n -1) · ··· · 1 = n ! ways

The multiplication rule

”n factorial”

Page 7: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 17

Probability theoryCounting sample points

Multiplication rule:If k independent operations can be performed in n1, n2, … , nk ways, respectively, then the k operations can be performed in

n1 · n2 · ··· · nk ways

Tree diagram:

T

TT

T

T

T

TH

H

H

H

H

H

H

23 = 8 possible outcomes

Flipping a coin three times (Head/Tail)

Page 8: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 18

Probability theoryCounting sample points

Number of possible ways of selecting r objects from a set of n destinct elements:

-

Withoutreplacement

Withreplacement

Ordered

Unordered

!

( )!n r

nP

n r

rn

!

!( )!

n n

r r n r

Page 9: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 19

Probability theoryCounting sample points

Example: Ann, Barry, Chris, and Dan should from a committee consisting of two persons, i.e. unordered without replacement.

Number of possible combinations:

Writing it out : AB AC AD BC BD CD

4 4!6

2 2!2!

Page 10: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 110

Probability theoryCounting sample points

Example: Select 2 out of 4 different balls ordered and without replacement

Number of possible combinations: 4 2

4!12

(4 2)!P

Notice: Order matters!

Page 11: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 111

Probability theoryProbability

Let A be an event, then we denote

P(A) the probability for A

It always hold that 0 < P(A) < 1 P(Ø) = 0 P(S) = 1

Consider an experiment which has N equally likely outcomes, and let exactly n of these events correspond to the event A. Then

Example:Rolling a dice

AS

2

1

6

3

(

number) evenP

# successful outcomes # possible outcomes

=N

nAP )(

Page 12: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 112

Probability theoryProbability

Example: Quality controlA batch of 20 units contains 8 defective units.

Select 6 units (unordered and without replacement).

Event A: no defective units in our random sample.

Number of possible samples:

Number of samples without defective units:

20N

6

12n

6

12

6 12!6!14! 77P(A) 0.024

20 6!6!20! 3230

6

(# possible)

(# successful)

Page 13: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 113

Probability theoryProbability

Example: continued

Event B: exactly 2 defective units in our sample

Number of samples with exactly 2 defective units:

12 8n

4 2

12 8

4 2 12!8!6!14!P(B) 0.3576

20 4!8!2!6!20!

6

(# successful)

Page 14: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 114

Probability theoryRules for probabilities

Union:A B

Intersection:A B

P(A B) = P(A) + P(B) - P(A B)

P(B) = P(B A) + P(B A´ )

If A and B are disjoint: P(A B) = P(A) + P(B)

In particular: P( A ) + P(A´ ) = 1

A B

Page 15: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 115

Probability theoryConditional probability

A Bwhere P ( B ) > 0

Conditional probability for A given B:

Bayes’ Rule: P(AB) = P(A|B)P(B) = P(B|A)P(A)

Rewriting Bayes’ rule:

P(B|A)P(A) P(B|A)P(A)P(A|B)

P(B) P(B|A)P(A)+P(B|A´)P(A´)

P(A B)P(A|B)

P(B)

Page 16: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 116

Probability theoryConditional probability

Employed Unemployed Total

Man 460 40 500

Woman 140 260 400

Total 600 300 900

Example page 59:The distribution of employed/unemployed amongst men and women in a small town.

%7.7630

23

600

460

900600

900460

)(

)()|(

/

/

P

PP

employd

employd&manemployedman

%./

/

P

P|P 313

15

2

300

40

900300

90040

)(

)()(

unemployed

unemployed& manunemployedman

Page 17: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 117

Probability theoryBayes’ rule

Example: Lung disease & SmokingAccording to ”The American Lung Association” 7% of the population suffers from a lung disease, and 90% of these are smokers. Amongst people without any lung disease 25.3% are smokers.

Events: Probabilities:A: person has lung disease P(A) = 0.07B: person is a smoker P(B|A) = 0.90

P(B|A´ ) = 0.253

211.093.0253.007.09.0

07.09.0

´)(´)|()()|(

)()|()|(

APABPAPABP

APABPBAP

What is the probability that at smoker suffers from a lung disease?

Page 18: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 118

A1 , … , Ak are a partitioning of S

Probability theoryBayes’ rule – extended version

Bayes’ formel udvidet:

A3

A2

A4 A5

A6

A1

B

S

Law of total probability:

k

iii APABPBP

1

)()|()(

k

iii

rrr

APABP

APABPBAP

1

)()|(

)()|()|(

Page 19: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 119

Probability theoryIndependence

Definition: Two events A and B are said to be independent if and only if

P(B|A) = P(B) or P(A|B) = P(A)

Alternative Definition: Two events A and B are said to be independent if and only if

P(A∩B) = P(A)P(B)

Notice: Disjoint event (mutually exclusive event) are dependent!

Page 20: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 120

Probability theoryConditional probability

Example:

%./

/|P 776

900600

900460)( employedman

%./P 655900500)( man

Employed Unemployed Total

Man 460 40 500

Woman 140 260 400

Total 600 300 900

Conclusion: the two events “man” and “employed” are dependent.

Page 21: Lecture1 1 Probability Theory and Statistics Kasper K. Berthelsen, Dept. For Mathematical Sciences kkb@math.aau.dk Literature: Walpole, Myers, Myers &

lecture 121

Probability theoryRules for conditional probabilities

)()|()|()( CPCBPCBAPCBAP

)()|()( BPBAPBAP Probability of events A and B happening simultaneously

Probability of events A, B and C happening simultaneously

Proof:)()|()|()()|()( CPCBPCBAPCBPCBAPCBAP

)()|(

)|(

)|()(

1

32

2121

kkk

k

kk

APAAP

AAAP

AAAPAAAP

General rule: