Anda di halaman 1dari 54

Module 2 Probability Concepts Bayes Theorem

0 P Probability is the study of randomness and uncertainty 1 Is the quantitative measure of the chance or likelihood that a given event will occur Random experiment - a process whose outcome is uncertain Examples: Tossing a coin once or several times Picking a card or cards from a deck Measuring temperature of patients ... Events A and B are independent

Pr(A B) = Pr(A). Pr(B)

Example 1

A draws a card from a pack of n number of cards

numbered 1,2,..,n. The card is replaced in the pack and then B draws a card. Find the probability that B draws: (1) same card as A (2) a higher denomination card)than A draws that card ) (1) Prob = Pr(A draws any card * Pr(B = [1/n * 1/n] + [1/n * 1/n] + + [1/n * 1/n] (n times) = n * [1/n * 1/n] = 1/n (2) Prob = Pr(A draws any card) * Pr(B draws a higher card) = 1 n 1 + n 2 + + 3 + 2 + 1 n n n n n n

Game 1 6 possible bullet configurations You are in a game of Russian roulette, Sample Space with a 6-shooter revolver that has 3 bullets in a row. The barrel is spun B B B E E E 1 dies E B B B E E 2 dies only once. Each player then points E E B B B E 1 dies the gun at his head and pulls the E E E B B B 2 dies Trigger. If he is still alive, the gun is B E E E B B 1 dies passed to the other player, who then B B E E E B 1 dies points it at his own head and pulls the trigger. The game stops when one Pr(player 1 dies) = 2/3 player dies. Pr(player 2 dies) = 1/3 Would you rather be I would rather be the 1st or 2nd to shoot? 2nd one!

Game 2 Playing the game of Russian roulette with two of your friends and a 6 shooter revolver, that has four bullets three in a row and one separated from them, would you rather be first, second or third to shoot? BBBEBE EBBBEB BEBBBE EBEBBB BEBEBB BBEBEB -> player 1 dies -> player 2 dies -> player 1 dies -> player 2 dies -> player 1 dies -> player 1 dies

P (player 1 dies) = 2/3 P (player 2 dies) = 1/3 P (player 3 dies) = 0 (Ha! Ha! Ho! Ho!) I would prefer to be player 3.

Game A
Pr (player 1 dies) = 4/6 Pr (player 2 dies) = Pr (player 3 dies) = 1/6

Play the game with 3 players. Would you want to be player 1, 2 or 3?

Game B
Pr (player 1 dies) = 5/6 Pr (player 2 dies) = 1/6

Game C

Pr (player 1 dies) = 3/6 Pr (player 2 dies) = 3/6

Example 2 4 friends decide to go to a movie. A is always sure to go to any movie! (Jobless!) B and C have a 50-50 chance of going. (Diplomatic!) D is choosy and would go only once in 10 times. (Conceited!) Find the chance that (1) all 4 will see the movie (2) only 3 will see the movie (3) only 2 will see the movie (4) only 1 will see the movie (5) none of them will see the movie.

Example 3 A child has two kittens, one dark, and the other very fair. (a) What is the probability that both kittens are females? (b) You are now told that one of the kittens is a female. What is the probability that both are females? (c) You have been given a different information now. The dark kitten is a female. What is the probability that both are females? Sample Space FF, FM, MM, MF ---- all possibilities

(a) FF, FM, MM, MF ------ Pr (both are females) = (b) FM, FF, MF ------Pr ( both are females, given that one of them is a female) = 1/3 (c) FF, MF -----Pr (both are females, given that the dark kitten is a female) = 1/2

Three prisoners, A, B, and C, have applied for parole. Exactly two of them will get it. A wonders if he should ask about the fate of B or C, by asking "tell me the name of one of the other two who are getting paroled." He asks, and the warden says "B." A thinks, "I had a 2/3 chance of parole, but now my chances dropped to 1/2!" Explain. Fate unknown possible combinations for parole are: AB, AC, BC So, A has 2/3 chance of parole. A is told B will get parole possible combinations for parole are: AB, BC So, A has 1/2 chance of parole

Example 4

Example 5 12 men leave their hats with the hat-rack. If the hats are randomly returned, what is the probability that nobody gets the correct hat? Pr (no one getting the correct hat) = 11 / 12 * 10 / 11 * 9 / 10 * . * * 1 Why? = 1/12 Example 6 A drunken man is standing half a step away from the edge of a very tall cliff. He takes one step (fixed measure) at a time either towards or away from the edge.

He is known to take a step forward 1/3 of the time and away 2/3 of the time. With every n steps he takes backwards, he takes (n+1) forwards. What is the chance of his death from falling from the cliff? 1st step fwd: Pr (death) = 1/3 1st step bkwd: Pr (death) = 2/3 * 1/3 * 1/3 + 2/3 * 2/3 * 1/3 * 1/3 * 1/3 + . + (2/3) n * (1/3)n+1 + upto

Example 7 What is the chance that at a party 2 particular guests share the same birthday? Sample space: Jan 1 Jan 1 Jan 2 Jan 2 . Dec 31

Dec 31

Pr(2 people share the same birthday) = 365 / (365 * 365)

Example 8 If the independent probabilities that three people A, B and C will be alive in 30 years time are 0.4, 0.3, 0.2 respectively, calculate the probability that in 30 years' time, (a) all will be alive (b) none will be alive (c) only one will be alive (d) at least one will be alive (a) P(A) P(B) P(C) = 0.4 0.3 0.2 = 0.024 (b) P(A) P(B) P(C) = 0.6 0.7 0.8 = 0.336 (c) P(A) P(B) P(C) + P(A) P(B) P(C) + P(A) P(B) P(C) (d) P = 1 { P(A) P(B) P(C) } = 1 0.336 = 0.664

Bayes' Theorem calculating probabilities

Mathematical formula used for conditional

Pr (rain today rained yesterday) given that under the condition that Pr (HP stock price will drop | petrol price hike) Pr (sales figure > Rs. 40 crores in May, 2006 | new CE)

Pr(A B) = Pr(A|B). Pr(B)


The conditional probability is written and is expressed, the probability of A given B.

Bayes' Theorem Pr(A B) = Pr(A|B). Pr(B) Pr(A B) = Pr(B|A).Pr(A)

Pr(A|B).Pr(B) = Pr(B|A).Pr(A)

A
Pr(A|B) = Pr(B|A) Pr(A) Pr(B)

AB

A A'

Pr(B|A).Pr(A) Pr(B|A').Pr(A')

Pr(A|B) =

Pr(B|A)Pr (A) Pr(B|A) Pr(A) + Pr(B|A') Pr(A')

Example 9

Case: Fair games

Conversation Panel: Do you use steroids? Athlete: Ha! Ha! May be!. May be not! Panel: We have to test you for steroids. Athlete: Thats OK.

Steroid test is done .. Panel: It shows that you use steroids. Athlete: May be I use! May be I do not! Ha! Ha! Fooled you!!!

Olympix Panel needs to know (a) Given that the test proves the athlete positive for steroids, what is the chance that he actually uses steroids?

Olympix Panel also needs to know (b) What is probability of an athlete proving positive in the steroid-test?

It is known that 90% of athletes do not use steroids, out of every 100 athletes not using steroids, unfortunately 15 prove to be positive out of every 100 athletes using steroids, 95 prove to be +ve. Let, A = event that the an athlete uses steroids B = event that steroid detection test gives a +ve result To find Pr(A|B) Pr(A|B) = Pr(B|A) Pr(A) Pr(B|A) Pr(A) + Pr(B|A') Pr(A') = (0.95)(0.1) = 0.4130 (0.95)(0.1) + (0.15)(0.9)

(b) Probability of an athlete proving +ve in the steroid-test = Pr (B) = Pr (B|A) Pr (A) = 0.95 * 0.1 = 0.2301 Pr (A|B) Example 10 Report says that 20% of mothers use beating as a method of disciplining their children. 85% of the mothers who beat their children take valium (as a cure for insomnia), while 25% of mothers who dont use beating, take valium. Ms. Frwyz takes valium. What is the chance that she will beat her children? Let, A = mothers use beating, B = mothers take valium 0.413

Example 11 Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year at this desert. Unfortunately, the weatherman has predicted rain for tomorrow.

When it actually rains, the weatherman had correctly predicted rain 90% of the time.

When it does not rain, he has incorrectly predicted rain 10% of the time.

Find the probability that it will rain on Marie's wedding?

A - it rains on Marie's wedding B - weatherman predicts rain Pr(A|B) = Pr(B|A) Pr(A) Pr(B|A) Pr(A) + Pr(B|A') Pr(A') = (0.014)(0.9) (0.014)(0.9) + (0.986)(0.1) = 0.111

Paradox - when the weatherman predicts rain, it actually rains only about 11.1% of the time. Despite the weatherman's gloomy prediction, there is a good chance that Marie will not get rain at her wedding.

Example 12 Three different suppliers (A, B and C) provide the same part to a manufacturer, who now wants to stop his supplies from one of these suppliers. Take a decision on his behalf. You decide to do the following: All supplies of this part are kept in a large bin. Without looking you select a part, and find it is defective. You decide that the supplier who gets the largest conditional probability should be stopped. 5% of the parts supplied by A Pr(Def|A) = 0.05 9% of the parts supplied by B Pr(Def|B) = 0.09 1% of the parts supplied by C Pr(Def|C) = 0.01 A supplies thrice as many parts as B and 1/2 as many as C. Pr(A) = 0.3, Pr(B) = 0.1, Pr(C) = 0.6

Pr(A|Def)
= = Pr(D|A) Pr(A) Pr(D|A) Pr(A)+ Pr(D|B) Pr(B) + Pr(D|C) Pr(C) (0.05)(0.3) (0.05)(0.3) + (0.09)(0.1) + (0.01)(0.6)

= 0.015 / 0.03 = 0.5

Pr(B|Def)
= Pr(D|B) Pr(B) Pr(D|A) Pr(A)+ Pr(D|B) Pr(B) + Pr(D|C) Pr (C)

= (0.09)(0.1) / 0.03 = 0.3

Pr(C|Def)
= = Pr(D|C) Pr(C) Pr(D|A)Pr(A)+ Pr(D|B) Pr(B) + Pr(D|C) Pr(C) (0.01)(0.6) / 0.03 = 0.2

So, supplier A should be removed and his supplies should be now replaced with those coming from C. But, by mistake (!) the order is shifted to B. What is the chance of getting a defective part? Pr(B) = 0.4, Pr (C) = 0.6 Pr(Def|B) = 0.09, Pr(Def|C) = 0.01 Pr(B|Def) = Pr(D|B)Pr(B) = 0.036/0.042 Pr(D|B)Pr(B) + Pr(D|C)Pr(C) Pr(C|Def) = Pr(D|C)Pr(C) = 0.006/0.042 Pr(D|B)Pr(B) + Pr(D|C)Pr(C)

A parameter A parameter numerical characteristic of a population numerical characteristic of a population characterises a statistical population distribution characterises a statistical population distribution can be estimated by a statistic can be estimated by a statistic

With proper sampling methods, the sample results With proper sampling methods, the sample results can provide good estimates of the parameters. can provide good estimates of the parameters.

The sample results provide only estimates The sample results provide only estimates of the values of the population characteristics. of the values of the population characteristics.

Parameters of a Normal distribution are (population mean) and (population standard deviation)

Football match between France and other teams Categorical Variable X = Winning Team total 20 matches lost by France

Argentina Brazil 10 0.5 6 0.3

Italy 3

CCIM 1 total 20 matches lost by France total probability = 1

0.15 0.05

probability distribution of X

Binomial (Probability) Distribution Properties of a Binomial Experiment Bernoulli Trials The experiment consists of a sequence of n identical trials. The experiment consists of a sequence of n identical trials. Two outcomes, success and failure, are possible on Two outcomes, success and failure, are possible on each trial. each trial. The probability of a success, denoted by p, does not change The probability of a success, denoted by p, does not change from trial to trial. from trial to trial. The trials are independent. The trials are independent. stationarity assumption

X ~ B (n, p) Pr (X) = n .p x.(1 p) nx x

where x = 0, 1, ........... , n n is finite 0 < p0 p 1 <1

Parameters are n and p

Mean of X = n . p Variance of X = n . p .q

Probability Pr(X)
0.35 0.3 0.25 0.2 Series1 0.15 0.1 0.05 0 1 2 3 4 5 6

Random variable X = no. of heads

Plots of Binomial Distribution different p n = 100

Example 1 The probability of a head turning up is 1/5 for a biased coin. (a) Find the probability of 10 heads turning up in 15 tosses of the same coin. (b) What is the chance of more than 2 but less than 6 tails appearing in 15 tosses of the same coin? (c) What is the chance of more than 1 tails appearing in 7 tosses of the same coin? Let X = no. of heads turning up in 15 tosses. X ~ B (n = 15, p = 1/5) (a) Pr (X = 10) = 15 (1/5)10 (4/5) 5 10

(b) Let Y = no. of tails in 15 tosses. Y ~ B (n = 15, p = 4/5) Pr( more than 2 but less than 6 tails) = Pr (X = 3) + Pr (X = 4) + Pr (X = 5) = 15 (4/5)3 (1/5)12 + .. complete it yourself 3 (c) Let Y = no. of tails in 15 tosses. Y ~ B (n = 7, p = 4/5) Pr (more than 1 tail) = 1 - Pr [(X = 0) + Pr (X = 1)] = .. complete it yourself

The expected no. of heads turning up in 100 tosses of the same coin = 100*p = 100*(1/5) = 20 The standard deviation of the no. of heads turning up in 100 tosses of the same coin = [100*p.q] = [100*(1/5)(4/5)] = 16 = 4

What is the expected no. of heads turning up in 100 tosses of an unbiased coin? 100*p = 100*(0.5) = 50 What is the variance of the no. of tails turning up in 100 tosses of an unbiased coin?100*p.q = 100*(0.5)(0.5) = 25

Example 2 Evans is concerned about a low retention rate for employees. In recent years, management has seen a turnover of 10% of the employees annually. The company has already a dearth of employees and at present has only 25. Thus, for any employee chosen at random, management estimates a probability of 0.1 that the person will not be with the company next year.

Out of Mr. A, Mr. B and Ms. C, what is the probability that one of them will leave the company this year?

Let X = no. of employees leaving out of 3 3 (0.1)1 (0.9) 2 1

X ~ B (n = 3, p = 0.1)

(a) Pr (X = 1) =

What is the chance that this year will be an attrition-free year, given that till date none of the 25 employees has left the company? Let X = no. of employees leaving out of 25 X ~ B (n = 25, p = 0.1) (a) Pr (X = 0) = 25 (0.1)0 (0.9) 25 0

What is the expected number of employees leaving the company next year? = mean = n . p = 25 (0.1) = 2.5 either 2 or 3 Example 3 In an experiment of 10 tosses of a biased coin, it was found that the ratio of the probability of two Heads turning up to that of one such was 9:8. (a) Find the probability of a Head appearing in a toss of the coin considered in this experiment. (b) What is the standard deviation of the no. of heads appearing in the 10 tosses? (c) The coin is tossed thrice. What is the chance that no Tails will appear in the experiment?

Example 4 Case 1 Duck or Glory? Ricky, standing at the crease was having doubts flowing through his mind, as to how his partnership with Martin would contribute to the teams score. Ricky had had a restless night, tossing and turning in bed. He had surveyed some previous score cards, compiled by the teams analyst. It enlisted the number of balls in an over, in which he and Martin as partners had failed to score any run: 2, 3, 1, 1, 3, 0, 1, 4, 4, 2, 3, 0, 1, 2, 3 = no. of Dot Balls in each of the 15 overs played Facing the first ball of the next over from Jackson, known for his aggressive bodyline bowling, he ponders, What is the chance of this becoming a maiden over?

(Though not practical and feasible, you may assume that Jacksons bowling pattern remains is pretty much the same always) Can you answer Rickys question?

Let X = no. of dot-balls turning in an over (= 6 balls). X ~ B (n = 6, p = ?), where p = probability that a ball thrown at Ricky becomes a dot-ball Mean = average no. of dot balls in an over = 30/15 = 2 n . p = 2 p = 2/6 = 1/3 Pr ( maiden over ) = Pr (X = 6) = 6 (1/3)6 (2/3)0 6

Example 5 Case 2 Ban those Burgers The cafeteria at the IBM centre had always been reputed for its excellent food - quality, freshness and variety. Due to the excess demand and incessant inflow of IBM employees, the management of this caf had decided to outsource some of its items from Messrs. Burger King, the international chain of fast-food restaurants. One of these items were veg-burgers. BK was prompt in its delivery and claimed that it always used fresh vegetables and buns for the burgers.

But, the reports and complaints started to come from some of the employees who had eaten the BK burgers. Checking the complaint register, it was found that over the first two weeks, out of the 40 veg-burgers ordered daily, the average no. of complaints were 2. It was decided that if the chance of more than 3 complaints per day about these burgers exceeded 0.14, the contract with Messrs. Burger King would be cancelled. As the manager of Messrs. Burger King (Bangalore branch) would you be worried about the cancellation of such an important contract?

X = no. of bad burgers out of 50 X ~ B (n = 40, p =?) average no. of complaints were 2 = n.p p = 2/40 = 0.05 It was decided that if the chance of more than 3 complaints per day about these burgers exceeded 0.14, the contract with Messrs. Burger King would be cancelled.

Pr (x > 3) > 0.14


Pr (x > 3) = 0.138 < 0.14 contract with Messrs. Burger King should not be cancelled

Poisson (Probability) Distribution Properties of a Poisson Experiment It is a discrete random variable that may assume an infinite It is a discrete random variable that may assume an infinite sequence of values (x = 0, 1, 2, .. .. .. ). sequence of values (x = 0, 1, 2, ). The time is partitioned into very small intervals, so that at The time is partitioned into very small intervals, so that at most one event can occur within that interval. most one event can occur within that interval. The probability of an occurrence of an event is the same for The probability of an occurrence of an event is the same for any two intervals of equal length. any two intervals of equal length. The occurrence or nonoccurrence of an event in an interval is The occurrence or nonoccurrence of an event in an interval is independent of the occurrence or nonoccurrence in any other independent of the occurrence or nonoccurrence in any other interval. interval.

X ~ P ( )

Pr (X) = e- . x x!

Mean of X = Variance of X = Parameter is e = 2.71828

x = 0, 1, 2, 3, ....... ad infinitum >0 Example 7

Patients arrive at the emergency room of Mercy Hospital at an average rate of 6 per hour on weekends. What is the probability of 4 arrivals in 30 minutes on next weekend? X = no. of patients every hour X ~ P( = 3) Pr (X = 4) = e-3 . 34 4!
MERCY

What is the probability of more than 4 arrivals in 30 minutes on a weekend evening? Pr (X > 4) = Pr (X = 5) + Pr (X = 6) + = e-3 . 35 + e-3 . 36 + 5! 6! Poisson Probabilities
0.25 0.20 0.15 0.10 0.05 0.00 0 1 2 3 4 5 6 7 8 9 10

Probability

the sequence continues for X = 11, 12,

Number of Arrivals in 30 Minutes

X~P ( = 2) X~P ( = 3) X~P ( = 5)

?
X~P ( = 10)

X~P ( = 5)

Plots of Poisson Distribution

Example 8 The Pollution Control Board desires to carry out a research, one of the objectives of which is to analyse the pollution level (measured in terms of p-granules per cubic centimetre) in the Chennai Metropolitan area. The authorities decided that, if the probability of more than 1 p-granule per cubic centimetre, exceeded 3 in 4 there would be reasons for concern about the pollution level.

Is the concern of the authorities justified? It is known that Bangalore has the same type and intensity of pollution as that of Chennai. What is the expected no. of p-granules per cubic centimetre in Bangalore? What is the sd of the no. of p-granules per cubic centimetre in Bangalore?

Example 9 At a very busy road junction it was found that, the probability of 2 accidents per day to that of four such was in the ratio 1 is to 3. (a) What is the standard deviation of the daily no. of accidents at that junction? (b) Find the chance of an accident-free day at that junction. (c) Find the chance that on a particular day the no. of accidents will not exceed two. (d) The transport security department (TSD) has decided that if the chance of more than 4 accidents exceeds 0.6, it would be essential to deploy two traffic policemen at that junction. What should TSD do?

Pr (X = 2) = e- . 2 2! Pr (X = 2) = 12 = 1 Pr (X = 4) 2 3 = 6

Pr ( X= 4) = e- . 4 4!

As n , p 0 so that n.p , then Binomial distr Poisson distr.


Pr (X) = n .p x.(1 p) nx x n. p = Pr (X) = e- . x x!

Example 10

Case 2 Ban those Burgers (continued)

Mc Burger, the rival of Burger King had heard that IBM had not cancelled the contract with BK, in spite of an average of 2 complaints per day and wanted to enquire into the decision process of the IBM caf. Mc B: How did you reach a decision to extend the contract? IBM: It was decided that if the chance of more than 3 complaints about these burgers exceeded 0.14, the contract with you should be cancelled. Mc B: What method did you use? IBM: Simple Binomial Distribution. Mc B: That is strange. It was a large no. of burgers ordered per day 40!

IBM: So, whats strange about it? Mc B: Moreover, the probability of a bad burger was 0.05. IBM: What are you getting at? Mc B: POISSON DISTRINUTION!!! IBM : Oh! Now I see --- n is large and p is very small -- so obviously it will be more appropriate to use a Poisson instead of a Binomial. Mc B: Right! Lets work it out with Poisson. Does the decision now change? Do we get back the contract? X = no. of bad burgers per day X ~ P( = 2)

Pr (x > 3) = 0.143 > 0.14 contract with Messrs. Burger King should be cancelled

Anda mungkin juga menyukai