Presentation is loading. Please wait.

Presentation is loading. Please wait.

Probability 2.0. Independent Events Events can be "Independent", meaning each event is not affected by any other events. Example: Tossing a coin. Each.

Similar presentations


Presentation on theme: "Probability 2.0. Independent Events Events can be "Independent", meaning each event is not affected by any other events. Example: Tossing a coin. Each."— Presentation transcript:

1 Probability 2.0

2 Independent Events Events can be "Independent", meaning each event is not affected by any other events. Example: Tossing a coin. Each toss of a coin is a perfect isolated thing. What it did in the past will not affect the current toss. The chance is simply 1-in-2, or 50%, just like ANY toss of the coin. So each toss is an Independent Event.

3 But events can also be "dependent"... which means they can be affected by previous events... Example: Marbles in a Bag 2 blue and 3 red marbles are in a bag. What are the chances of getting a blue marble? The chance is 2 in 5 But after taking one out the chances change! Dependent Events

4 Marbles in a Bag…. But after taking one out the chances change! So the next time: if we got a red marble before, then the chance of a blue marble next is 2 in 4 if we got a blue marble before, then the chance of a blue marble next is 1 in 4

5 Replacement Note: if we replace the marbles in the bag each time, then the chances do not change and the events are independent:independent With Replacement: the events are Independent (the chances don't change) Without Replacement: the events are Dependent (the chances change)

6 Exercise There is a 2/5 chance of pulling out a Blue marble, and a 3/5 chance for Red What are the chances of drawing 2 blue marbles?

7 Solution The chances of drawing 2 blue marbles is 1/10

8 Conditional event The probability that event B occurs, given that event A has occurred, is called a conditional probability.probabilityevent The conditional probability of B, given A, is denoted by the symbol P(B|A). In other words, event A has already happened, now what is the chance of event B?

9 And in our case: P(B|A) = 1/4 So the probability of getting 2 blue marbles is:

10 And we write it as "Probability of event A and event B equals the probability of event A times the probability of event B given event A"

11 Exercise A bag contains 3 red marbles and 4 blue marbles. Two marbles are drawn at random without replacement. If the first marble drawn is red, what is the probability the second marble is blue? A box contains 5 green pencils and 7 yellow pencils. Two pencils are chosen at random from the box without replacement. What is the probability they are both yellow?

12 Finding hidden data Using Algebra we can also "change the subject" of the formula, like this: Start with: P(A and B) = P(A) x P(B|A) Swap sides: P(A) x P(B|A) = P(A and B) Divide by P(A): P(B|A) = P(A and B) / P(A)

13 "The probability of event B given event A equals the probability of event A and event B divided by the probability of event A

14 Example 45% of the children in a school have a dog, 30% have a cat, and 18% have a dog and a cat. What percent of those who have a cat also have a dog?

15

16 Bayes’ Theorem Bayes' theorem. Let A 1, A 2,..., A n be a set of mutually exclusive events that together form the sample space S. Let B be any event from the same sample space, such that P(B) > 0. Then, P( A k | B ) = P( A k ∩ B ) P( A 1 ∩ B ) + P( A 2 ∩ B ) +... + P( A n ∩ B )

17 http://stattrek.com/probability/bayes- theorem.aspx Note: Invoking the fact that P( A k ∩ B ) = P( A k )P( B | A k ), Baye's theorem can also be expressed as P( A k | B ) = P( A k ) P( B | A k ) P( A 1 ) P( B | A 1 ) + P( A 2 ) P( B | A 2 ) +... + P( A n ) P( B | A n )

18 When to Apply Bayes’ Theorem Part of the challenge in applying Bayes' theorem involves recognizing the types of problems that warrant its use. You should consider Bayes' theorem when the following conditions exist. The sample space is partitioned into a set of mutually exclusive events { A 1, A 2,..., A n }.sample spacesetmutually exclusive Within the sample space, there exists an event B, for which P(B) > 0.event The analytical goal is to compute a conditional probability of the form: P( A k | B ). You know at least one of the two sets of probabilities described below. – P( A k ∩ B ) for each A k – P( A k ) and P( B | A k ) for each A k

19 Example1 Marie is getting married tomorrow, at an outdoor ceremony in the desert. In recent years, it has rained only 5 days each year. Unfortunately, the weatherman has predicted rain for tomorrow. When it actually rains, the weatherman correctly forecasts rain 90% of the time. When it doesn't rain, he incorrectly forecasts rain 10% of the time. What is the probability that it will rain on the day of Marie's wedding?

20 Solution The sample space is defined by two mutually- exclusive events - it rains or it does not rain. Additionally, a third event occurs when the weatherman predicts rain. Notation for these events appears below. Event A 1. It rains on Marie's wedding. Event A 2. It does not rain on Marie's wedding. Event B. The weatherman predicts rain.

21 Solution In terms of probabilities, we know the following: P( A 1 ) = 5/365 =0.0136985 [It rains 5 days out of the year.] P( A 2 ) = 360/365 = 0.9863014 [It does not rain 360 days out of the year.] P( B | A 1 ) = 0.9 [When it rains, the weatherman predicts rain 90% of the time.] P( B | A 2 ) = 0.1 [When it does not rain, the weatherman predicts rain 10% of the time.]

22 Solution We want to know P( A 1 | B ), the probability it will rain on the day of Marie's wedding, given a forecast for rain by the weatherman. The answer can be determined from Bayes' theorem, as shown below. P( A 1 |B ) = _____P ( A 1 ) P ( B | A 1 )________ P( A 1 ) P( B | A 1 ) + P( A 2 ) P( B | A 2 ) P( A 1 | B ) = (0.014)(0.9) / [ (0.014)(0.9) + (0.986)(0.1) ] P( A 1 | B ) = 0.111

23 The entire output of a factory is produced on three machines. The three machines account for 20%, 30%, and 50% of the output, respectively. The fraction of defective items produced is this: for the first machine, 5%; for the second machine, 3%; for the third machine, 1%. If an item is chosen at random from the total output and is found to be defective, what is the probability that it was produced by the third machine?

24 A solution is as follows. Let A i denote the event that a randomly chosen item was made by the ith machine (for i = 1,2,3). Let B denote the event that a randomly chosen item is defective. Then, we are given the following information: P(A 1 ) = 0.2, P(A 2 ) = 0.3, P(A 3 ) = 0.5.If the item was made by machine A 1, then the probability that it is defective is 0.05; that is, P(B|A 1 ) = 0.05. Overall, we have P(B|A 1 ) = 0.05, P(B|A 2 ) = 0.03, P(B|A 3 ) = 0.01.To answer the original question, we first find P(B). That may be done in the following way: P(B) = Σ i P(B|A i )P(A i ) = (0.05)(0.2) + (0.03)(0.3) + (0.01)(0.5) = 0.024. Hence 2.4% of the total output of the factory is defective

25 We are given that B has occurred, and we want to calculate the conditional probability of A 3. By Bayes' theorem, Given that the item is defective, the probability that it was made by the third machine is only 5/24. Although machine 3 produces half of the total output, it produces a much smaller fraction of the defective items. Hence the knowledge that the item selected was defective enables us to replace the prior probability P(A 3 ) = 1/2 by the smaller posterior probability P(A 3 |B) = 5/24.

26 1% of people have a certain genetic defect. 90% of tests for the gene detect the defect. 9.6% of the tests are false positives. If a person gets a positive test result, what are the probability they actually have the genetic defect?

27 The first step into solving Bayes theorem problems is to assign letters to events: A = chance of having the faulty gene. That was given in the question as 1%. That also means the probability of not having the gene (~A) is 99%. X = A positive test result.

28 So: P(A|X) = Probability of having the gene given a positive test result. P(X|A) = Chance of a positive test result given that the person actually has the gene. That was given in the question as 90%. p(X|~A) = Chance of a positive test if the person doesn’t have the gene. That was given in the question as 9.6% Now we have all of the information we need to put into the equation: P(A|X) = (.9 *.01) / (.9 *.01 +.096 *.99) = 0.0865 (8.65%).

29 In a class, 30% have grey eyes, 50% blue eyes and other 20% have other colours. One day they play a game together. In the first run, 65% of the grey ones, 82%blue eyes and 50% with other colours are selected. Now if a child is selected randomly from the class, and we know that she was not in the first game, what is the prob that the child has blue eyes.


Download ppt "Probability 2.0. Independent Events Events can be "Independent", meaning each event is not affected by any other events. Example: Tossing a coin. Each."

Similar presentations


Ads by Google