statistics

85
Statistics Introduction to probability

Upload: vonda

Post on 23-Feb-2016

68 views

Category:

Documents


0 download

DESCRIPTION

Statistics. Introduction to probability. Contents. Experiments , Counting Rules, and Assigning Probabilities. Events and Their Probability. Some Basic Relationships of Probability. Conditional Probability. Bayes ’ Theorem. STATISTICS in PRACTICE. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Statistics

Statistics

Introduction to probability

Page 2: Statistics

Contents

Experiments, Counting Rules, and Assigning Probabilities Events and Their Probability Some Basic Relationships of Probability Conditional Probability Bayes’ Theorem

Page 3: Statistics

STATISTICS in PRACTICE

Carstab Corporation, a subsidiary of Morton International, produces specialty chemicals and offers a variety of chemicals designed to meet the unique specifications of its customers.

Page 4: Statistics

STATISTICS in PRACTICE

Carstab’s customer agreed to test each lot after receiving it and determine whether the catalyst would perform the desired function.

Each Carstab shipment to the customer had a .60 probability of being accepted and a .40 probability of being returned.

Page 5: Statistics

Probability Managers often base their decisions on an

analysis of uncertainties such as the following:

1. What are the chances that sales will decrease if we increase prices? 2. What is the likelihood a new assembly method will increase productivity?

Page 6: Statistics

Probability 3. How likely is it that the project will be finished on time? 4. What is the chance that a new investment will be profitable?

Page 7: Statistics

Probability as a Numerical Measure of the Likelihood of Occurrence

0 1.5

Increasing Likelihood of Occurrence

Probability:The eventis veryunlikelyto occur.

The occurrenceof the event is just as likely asit is unlikely.

The eventis almostcertainto occur.

Page 8: Statistics

Experiments, Counting Rules, and Assigning Probabilities

Example: Experiment and Experimental Outcomes

Page 9: Statistics

Experiments, Counting Rules, and Assigning Probabilities

An experiment is any process that generates well-defined outcomes. The sample space for an experiment is the set of all experimental outcomes.

An experimental outcome is also called a sample point.

Page 10: Statistics

An Experiment and Its Sample Space

Example: 1. tossing a coin — the sample space S = {Head, Tail} 2. selecting a part for inspection — the

sample space S = {Defective, Nondefective} 3. rolling a die — the sample space S = {1, 2, 3, 4, 5, 6}

Page 11: Statistics

Example: Bradley InvestmentsBradley has invested in two stocks, Markley Oil and Collins Mining. Bradley has

determined that the possible outcomes of these investments three months from now are as follows. Investment Gain or Loss

in 3 Months (in $000)Markley Oil Collins Mining

10 5 0-20

8-2

Page 12: Statistics

Counting Rules, Combinations, and Permutations

A Counting Rule for Multiple-Step Experiment If an experiment consists of a sequence of k steps in which there are n1 possible results for the first step, n2 possible results for the second step, and so on, then the total number of experimental outcomes is given by (n1)(n2) . . . (nk). A helpful graphical representation of a multiple- step experiment is a tree diagram.

Page 13: Statistics

Counting Rules, Combinations, and Permutations

Example: Tree Diagram for the Experiment of

Tossing Two Coins

Page 14: Statistics

Bradley Investments can be viewed as atwo-step experiment. It involves two stocks, each with a set of experimental outcomes.Markley Oil: n1 = 4Collins Mining: n2 = 2Total Number of Experimental Outcomes: n1n2 = (4)(2) = 8

A Counting Rule for Multiple-Step Experiments

Page 15: Statistics

Tree Diagram

Gain 5

Gain 8

Gain 8

Gain 10

Gain 8

Gain 8

Lose 20

Lose 2

Lose 2

Lose 2

Lose 2

Even

Markley Oil(Stage 1)

Collins Mining(Stage 2)

ExperimentalOutcomes

(10, 8) Gain $18,000

(10, -2) Gain $8,000

(5, 8) Gain $13,000

(5, -2) Gain $3,000

(0, 8) Gain $8,000

(0, -2) Lose $2,000

(-20, 8) Lose $12,000

(-20, -2) Lose $22,000

Page 16: Statistics

A second useful counting rule enables us to count the number of experimental outcomes when n objects are to be selected from a set of N objects.

Counting Rule for Combinations

Page 17: Statistics

Counting Rule for Combinations

CNn

Nn N nn

N

!

!( )!

Number of Combinations of N Objects Taken n at a Time

where: N! = N(N - 1)(N - 2) . . . (2)(1) n! = n(n - 1)(n - 2) . . . (2)(1) 0! = 1

Page 18: Statistics

Counting Rule for Combinations Example: 1.

2. Lottery system uses the random selection of six integers from a group of 47 to determine the

weekly lottery winner. The number of ways six different integers can be selected from a group of 47.

1012

120)1)(2)(3)(1)(2()1)(2)(3)(4)(5(

)!25(!2!5

255

2

C

573,737,10)1)(2)(3)(4)(5)(6(

)42)(43)(44)(45)(46)(47(!41!6

!47)!647(!6

!476

47

Page 19: Statistics

Counting Rule for Permutations

A third useful counting rule enables us to count the number of experimental outcomes when n objects are to be selected from a set of N objects, where the order of selection is important.

Page 20: Statistics

Number of Permutations of N Objects Taken n at a Time

where: N! = N(N - 1)(N - 2) . . . (2)(1) n! = n(n - 1)(n - 2) . . . (2)(1) 0! = 1

P nNn

NN nn

N

! !( )!

Counting Rule for Permutations

Page 21: Statistics

Assigning Probabilities Two basic requirements for assigning

probabilities1. The probability assigned to each

experimental outcome must be between 0 and 1, inclusively. If we let Ei denote the ith experimental outcome and P(Ei) its probability, then this requirement can be written as

0 P(Ei) 1 for all i

Page 22: Statistics

Assigning Probabilities

2. The sum of the probabilities for all the experimental outcomes must equal 1. For n experimental outcomes, this requirement can be written as

P(E1)+ P(E2)+… + P(En) =1

Page 23: Statistics

Assigning Probabilities Classical Method

Relative Frequency Method

Subjective Method

Assigning probabilities based on the assumption of equally likely outcomes

Assigning probabilities based on experimentation or historical data

Assigning probabilities based on judgment

Page 24: Statistics

Classical Method If an experiment has n possible outcomes,

this method would assign a probability of 1/n to each outcome.

Experiment: Rolling a die

Sample Space: S = {1, 2, 3, 4, 5, 6}

Probabilities: Each sample point has a 1/6 chance of occurring

Example

Page 25: Statistics

Relative Frequency Method

Number ofPolishers Rented

Numberof Days

01234

4 61810 2

Lucas Tool Rental would like to assignprobabilities to the number of car polishersit rents each day. Office records show the following frequencies of daily rentals for the last 40 days.

Example: Lucas Tool Rental

Page 26: Statistics

Each probability assignment is given bydividing the frequency (number of days) bythe total frequency (total number of days).

Relative Frequency Method

4/40

ProbabilityNumber ofPolishers Rented

Numberof Days

01234

4 61810 240

.10 .15 .45 .25 .051.00

Page 27: Statistics

Subjective Method When economic conditions and a company’s circumstances change rapidly it might be inappropriate to assign probabilities based solely on historical data. We can use any data available as well as our experience and intuition, but ultimately a probability value should express our degree of belief that the experimental outcome will occur.

Page 28: Statistics

Subjective Method The best probability estimates often are obtained by combining the estimates from the classical or relative frequency approach with the subjective estimate.

Page 29: Statistics

Subjective Method Applying the subjective method, an analyst made the following probability assignments.

Exper. OutcomeNet Gain or LossProbability(10, 8)(10, -2)(5, 8)(5, -2)(0, 8)(0, -2)(-20, 8)(-20, -2)

$18,000 Gain $8,000 Gain $13,000 Gain $3,000 Gain $8,000 Gain $2,000 Loss $12,000 Loss $22,000 Loss

.20

.08

.16

.26

.10

.12

.02

.06

Page 30: Statistics

An event is a collection of sample points.

The probability of any event is equal to the sum of the probabilities of the sample points in the event. If we can identify all the sample points of an experiment and assign a probability to each, we can compute the probability of an event.

Events and Their Probabilities

Page 31: Statistics

Events and Their Probabilities

Event M = Markley Oil ProfitableM = {(10, 8), (10, -2), (5, 8), (5, -2)}

P(M) = P(10, 8) + P(10, -2) + P(5, 8) + P(5, -2)= .20 + .08 + .16 + .26= .70

Page 32: Statistics

Event C = Collins Mining ProfitableC = {(10, 8), (5, 8), (0, 8), (-20, 8)}

P(C) = P(10, 8) + P(5, 8) + P(0, 8) + P(-20, 8)= .20 + .16 + .10 + .02= .48

Events and Their Probabilities

Page 33: Statistics

Some Basic Relationships of Probability

There are some basic probability relationships that can be used to compute the probability of an event without knowledge of all the sample point probabilities.

Complement of an Event

Intersection of Two Events

Mutually Exclusive Events

Union of Two Events

Page 34: Statistics

The complement of A is denoted by Ac.

The complement of event A is defined to be the event consisting of all sample points that are not in A.

Complement of an Event

Event A AcSampleSpace S

VennDiagram

Page 35: Statistics

The union of events A and B is denoted by A B

The union of events A and B is the event contain in all sample points that are in A or B or both.

Union of Two Events

SampleSpace SEvent A Event B

Page 36: Statistics

Event M = Markley Oil ProfitableEvent C = Collins Mining ProfitableM C = Markley Oil Profitable

or Collins Mining ProfitableM C = {(10, 8), (10, -2), (5, 8), (5, -2), (0, 8), (-20, 8)}

P(M C) = P(10, 8) + P(10, -2) + P(5, 8) + P(5, -2) + P(0, 8) + P(-20, 8)

= .20 + .08 + .16 + .26 + .10 + .02= .82

Union of Two Events

Page 37: Statistics

The intersection of events A and B is denoted by A

The intersection of events A and B is the set of all sample points that are in both A and B.

SampleSpace SEvent A Event B

Intersection of Two Events

Intersection of A and B

Page 38: Statistics

Intersection of Two Events

Event M = Markley Oil ProfitableEvent C = Collins Mining ProfitableM C = Markley Oil Profitable

and Collins Mining ProfitableM C = {(10, 8), (5, 8)}

P(M C) = P(10, 8) + P(5, 8)= .20 + .16= .36

Page 39: Statistics

The addition law provides a way to compute the probability of event A, or B, or both A and B occurring.

Addition Law

The law is written as:

P(A B) = P(A) + P(B) – P(A B

Page 40: Statistics

Event M = Markley Oil ProfitableEvent C = Collins Mining ProfitableM C = Markley Oil Profitable

or Collins Mining ProfitableWe know: P(M) = .70, P(C) = .48, P(M C) = .36Thus: P(M C) = P(M) + P(C) - P(M C)

= .70 + .48 - .36= .82

Addition Law

(This result is the same as that obtained earlierusing the definition of the probability of an event.)

Page 41: Statistics

Mutually Exclusive Events Two events are said to be mutually exclusive if the events have no sample points in common. Two events are mutually exclusive if, when one event occurs, the other cannot occur.

SampleSpace SEvent A Event B

Page 42: Statistics

Mutually Exclusive Events If events A and B are mutually exclusive, P(A B = 0. The addition law for mutually exclusive events is:

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

there’s no need to include “- P(AB”

Page 43: Statistics

The probability of an event given that another event has occurred is called a conditional probability.

A conditional probability is computed as follows :

The conditional probability of A given B is denoted by P(A|B).

Conditional Probability ( 條件機率 )

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

P B

Page 44: Statistics

Conditional Probability ( 條件機率 ) Example: Tossing two dices sequentially

What is the probability of the sum of two dices is 8 points given the first dice is 3 points?

The possible outcomes of giving 3 points in the first dice are: (3,1), (3,2), (3,3), (3,4), (3,5), (3,6).

Let A is the event of sum of two dices is 8 and B is the event of the first dice is 3.

P(A|B) will answer above question.6/1

6/136/1

)()()|(

BPBAPBAP

Page 45: Statistics

Conditional Probability ( 條件機率 ) Question: What is the probability of

getting one YELLOW ball from a bag of 10 WHITE balls, 5 YELLOW balls and 10 BLACK balls given the ball you got is not a BLACK one?

Page 46: Statistics

Conditional Probability ( 條件機率 )

3/125/1525/5

)()()|(

BPBAPBAP

Answer: Let A is the event of YELLOW bal, B is the event of not BLACK ball.

P(A|B) is our answer

Page 47: Statistics

Joint Probabilities, Marginal Probabilities

Considering a situation of promotion status of 1200 police officers over the past two years

Events: promoted(A), not promoted(Ac); man(M), women(W).

Question: What is the probability that a randomly selected officer is a man and is promoted?

Page 48: Statistics

Joint Probabilities, Marginal Probabilities

Answer: P(M ∩ A) is the solution

This is the intersection of two events and is called joint probability.

The above table is named as a joint probability table.

24.01200/288)( AMP

Page 49: Statistics

Joint Probabilities, Marginal Probabilities

Joint Probability Tables for Promotions

The probabilities in the margins(RHS and Bottom) indicate the probabilities of each events, is referred to marginal probabilities.

Page 50: Statistics

Conditional Probability Conditional Probability

( )( | ) ( )

P A BP A BP B

Page 51: Statistics

Independent Events If the probability of event A is not changed by the existence of event B, we would say that events A and B are independent.

Two events A and B are independent if:

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

Page 52: Statistics

Multiplication Law The multiplication law provides a way to compute the probability of the intersection of two events. The law is written as:

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

Page 53: Statistics

Event M = Markley Oil ProfitableEvent C = Collins Mining Profitable

We know: P(M C) = .36, P(M) = .70

Thus:

Conditional Probability

( ) .36( | ) .5143( ) .70P C MP C M

P M

= Collins Mining Profitable given Markley Oil Profitable

( | )P C M

Page 54: Statistics

Event M = Markley Oil ProfitableEvent C = Collins Mining Profitable

We know: P(M) = .70, P(C|M) = .5143

Multiplication Law

M C = Markley Oil Profitable and Collins Mining Profitable

Thus: P(M C) = P(M)P(M|C)= (.70)(.5143)= .36

(This result is the same as that obtained earlierusing the definition of the probability of an event.)

Page 55: Statistics

The multiplication law also can be used as a test to see if two events are independent.

The law is written as:

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

Multiplication Lawfor Independent Events

Page 56: Statistics

Multiplication Lawfor Independent Events

Event M = Markley Oil ProfitableEvent C = Collins Mining Profitable

We know: P(M C) = .36, P(M) = .70, P(C) = .48

But: P(M)P(C) = (.70)(.48) = .34, not .36

Are events M and C independent?DoesP(M C) = P(M)P(C) ?

Hence: M and C are not independent.

Page 57: Statistics

Bayes’ Theorem Often we begin probability analysis with initial or prior probabilities.( 先驗機率 ) Then, from a sample, special report, or a product test we obtain some additional information. Given this information, we calculate revised or posterior probabilities( 後驗機率 ). Bayes’ theorem provides the means for revising the prior probabilities.

Page 58: Statistics

The probabilities P(A) and P(AC) are called prior probabilities because they are

determined prior to the decision about taking the preparatory course. The conditional probability P(A | B) is called a

posterior probability (or revised probability), because the prior probability is revised after the decision about taking the preparatory course.

Bayes’ Theorem

Page 59: Statistics

A proposed shopping center will provide strong competitionfor downtown businesses likeL. S. Clothiers. If the shoppingcenter is built, the owner of L. S. Clothiers feels it would be best torelocate to the center.

Example: L. S. Clothiers

Bayes’ Theorem

Page 60: Statistics

Example: L. S. Clothiers

The shopping center cannot be built unless a zoning change is approved by the town council. The planning board must first make a recommendation, for or against the zoning change, to the council.

Bayes’ Theorem

Page 61: Statistics

Prior ProbabilitiesLet:

Bayes’ Theorem

A1 = town council approves the zoning change A2 = town council disapproves the change

P(A1) = .7, P(A2) = .3

Using subjective judgment:

Page 62: Statistics

New Information The planning board has recommended against the zoning change. Let B denote the event of a negative recommendation by the planning board. Given that B has occurred, should L. S. Clothiers revise the probabilities that the town council will approve or disapprove the zoning change?

Bayes’ Theorem

Page 63: Statistics

Conditional ProbabilitiesPast history with the planning board and the

town council indicates the following:

Bayes’ Theorem

P(B|A1) = .2 P(B|A2) = .9

P(BC|A1) = .8 P(BC|A2) = .1Hence:

Page 64: Statistics

P(Bc|A1) = .8P(A1) = .7

P(A2) = .3P(B|A2) = .9

P(Bc|A2) = .1

P(B|A1) = .2 P(A1 B) = .14

P(A2 B) = .27

P(A2 Bc) = .03

P(A1 Bc) = .56

Bayes’ Theorem

Tree DiagramTown Council Planning Board Experimental

Outcomes

Page 65: Statistics

Bayes’ Theorem

1 1 2 2

( ) ( | )( | ) ( ) ( | ) ( ) ( | ) ... ( ) ( | )i i

in n

P A P B AP A BP A P B A P A P B A P A P B A

To find the posterior probability that event Ai will occur given that event B has occurred, we apply Bayes’ theorem.

Bayes’ theorem is applicable when the events for which we want to compute posterior probabilities are mutually exclusive and their union is the entire sample space.

Page 66: Statistics

Posterior Probabilities Given the planning board’s recommendation not to approve the zoning change, we revise the prior probabilities as follows:

1 11

1 1 2 2

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

P A P B A P A P B A

(. )(. )(. )(. ) (. )(. )

7 27 2 3 9

Bayes’ Theorem

= .34

Page 67: Statistics

Conclusion The planning board’s recommendation is good news for L. S. Clothiers. The posterior probability of the town council approving the zoning change is .34 compared to a prior probability of .70.

Bayes’ Theorem

Page 68: Statistics

Tabular Approach Step 1

Prepare the following three columns:

Column 1 - The mutually exclusive events for which posterior probabilities are desired.

Column 2 - The prior probabilities for the events. Column 3 - The conditional probabilities of the new information given each event.

Page 69: Statistics

Tabular Approach

(1) (2) (3) (4) (5)

EventsAi

PriorProbabilitiesP(Ai)

ConditionalProbabilities

P(B|Ai)

A1

A2

.7 .31.0

.2

.9

Page 70: Statistics

Tabular Approach Step 2

Column 4 Compute the joint probabilities for each event and the new information B by using the multiplication law. Multiply the prior probabilities in column 2 by the corresponding conditional probabilities in column 3. That is, P(Ai IB) = P(Ai) P(B|Ai).

Page 71: Statistics

Tabular Approach

(1) (2) (3) (4) (5)

EventsAi

PriorProbabilitiesP(Ai)

ConditionalProbabilities

P(B|Ai)

A1

A2

.7 .31.0

.2

.9.14.27

JointProbabilities

P(Ai ∩ B)

.7 x .2

Page 72: Statistics

Tabular Approach Step 2 (continued)

We see that there is a .14 probability of the town council approving the zoning change and a negative recommendation by the planning board. There is a .27 probability of the town Council disapproving the zoning change and a negative recommendation by the planning board.

Page 73: Statistics

Tabular Approach Step 3

Column 4 Sum the joint probabilities. The sum is The probability of the new information, P(B). The sum .14 + .27 shows an overall probability of .41 of a negative recommendation by the planning board.

Page 74: Statistics

Tabular Approach

(1) (2) (3) (4) (5)

EventsAi

PriorProbabilitiesP(Ai)

ConditionalProbabilities

P(B|Ai)

A1

A2

.7 .31.0

.2

.9.14.27

JointProbabilities

P(Ai I B)

P(B) = .41

Page 75: Statistics

Step 4 Column 5

Compute the posterior probabilities using the basic relationship of conditional probability.

The joint probabilities P(Ai I B) are in column 4 and the probability P(B) is the sum of column 4.

Tabular Approach

)()()|(

BPBAPBAP i

i

Page 76: Statistics

(1) (2) (3) (4) (5)

EventsAi

PriorProbabilitiesP(Ai)

ConditionalProbabilities

P(B|Ai)

A1

A2

.7 .31.0

.2

.9.14.27

JointProbabilities

P(Ai I B)

P(B) = .41

Tabular Approach

.14/.41

PosteriorProbabilitiesP(Ai |B)

.3415 .65851.0000

Page 77: Statistics

Bayes’ Theorem 在犯罪調查的某一階段,負責的檢察官有百分之六十確信某嫌疑犯的罪行。現假設罪犯有某一特徵 ( 像左撇子,禿頭或棕色頭髮 ) 的新證據尚未被發現。若 20% 的人有此特徵,那麼在嫌疑犯也有此特徵的條件下,檢察官能多確定嫌疑犯的罪行 ? A: 嫌疑犯有罪 ; B: 嫌疑犯有罪犯之特徵 P(A|B) 就是答案 ! Do we have P(A ∩B)? NO!!!!!

Page 78: Statistics

Bayes’ Theorem However, one can find P(A ∩B) by

And find P(B) via

And

)()|()()( APABPABPBAP

)()|()()|(

)()()(cc

c

APABPAPABP

ABPABPBP

882.04.0*2.06.0*1

6.0*1)()|()()|(

)()|()|(

cc APABPAPABPAPABPBAP

Page 79: Statistics

Bayes’ Theorem

NewInformation

Applicationof Bayes’Theorem

PosteriorProbabilities

PriorProbabilities

Page 80: Statistics

Bayes’ Theorem

若 A1, ... , Ai 為分割集合, B 為一事件,則

且由 故

事件機率的運算法則

)|()()( iii BPAPABP A

)|()(1

i

r

ii ABPAP

r

iiABPBP

1

)()(

r

iiABPBP

1

)()(

Page 81: Statistics

Bayes’ Theorem

若已知 A1, ... , Ai 為樣本空間的分割集合,B 為某事件,且已知 及 ,則 B 條件下發生事件 Ai 之機率表為 :

貝氏定理)( iAP )|( iABP

)|( BAP i

)(

)(BP

ABP i)|( BAP i )()()(

)(

21 r

i

ABPABPABPABP

)|()()|()()|()()|()(

2211 rr

ii

ABPAPABPAPABPAPABPAP

Page 82: Statistics

Bayes’ Theorem

Page 83: Statistics

Example 對患有某疾病的人,經血液檢查能偵測出確有此疾病的機率為 0.95 。但,此種檢查對1% 的健康受檢者會產生“錯誤陽性”的反應。 ( 也就是說,對一位健康受檢者,其檢查結果為有此疾病的機率是 0.01) 假設有0.5% 的人會有此種疾病,是求若檢查結果為陽性,則此人確有此疾病的機率為多少 ?

Bayes’ Theorem

Page 84: Statistics

Example A 表示受檢者有疾病的事件,則 Ac 表示受檢者沒有疾病的事件, P(AAc)=1 。 B 表示檢查結果為陽性反應的事件,則 Bc 表示檢查結果為陰性反應的事件,

P(BBc)=1 。因此,若檢查結果為陽性,則此人確有此疾病的機率為 P(A|B)

Bayes’ Theorem

Page 85: Statistics

根據 Bayes’ Theorem

Bayes’ Theorem

1 1 2 2

( ) ( | )( | ) ( ) ( | ) ( ) ( | ) ... ( ) ( | )i i

in n

P A P B AP A BP A P B A P A P B A P A P B A

)|()()|()()|()()|( cc ABPAPABPAP

ABPAPBAP

P(A)=0.005(0.5%) , P(Ac)=1-0.005=0.995 P(B|A)=0.95, P(B|Ac)=0.01

323.0995.0*01.095.0*005.0

95.0*005.0)|(

BAP