O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Probability basics and bayes' theorem

It gives detail description about probability, types of probability, difference between mutually exclusive events and independent events, difference between conditional and unconditional probability and Bayes' theorem

  • Entre para ver os comentários

Probability basics and bayes' theorem

  2. 2. Basic terms of Probability  In probability, an experiment is any process that can be repeated in which the results are uncertain.  A simple event is any single outcome from a probability experiment.  Sample space is a list of all possible outcomes of a probability experiment.  An event is any collection of outcomes from a probability experiment.
  3. 3. Example  Experiment : Tossing a coin  Sample Space: { Head, Tail)  Event: (Only Head wants) : {Head}
  4. 4. Probability  The probability of an event, denoted P(E), is the likelihood of that event occurring.
  5. 5. Example  When a coin is tossed, there are two possible outcomes: Heads and Tails P(H) = ½.  When a single die is thrown, there are six possible outcomes: 1, 2, 3, 4, 5, 6. P(1) = 1/6.
  6. 6. Properties of Probability  The probability of any event E, P(E), must be between 0 and 1 inclusive. That is, 0 < P(E) < 1.  If an event is impossible, the probability of the event is 0.  If an event is a certainty, the probability of the event is 1.  If S = {e1, e2, …, en}, then P(e1) + P(e2) + … + P(en) = 1.
  7. 7. Three methods for determining Probability  Classical method  Empirical method  Subjective method
  8. 8. 1. Classical Method  The classical method of computing probabilities requires equally likely outcomes.  If an experiment has n equally likely simple events and if the number of ways that an event E can occur is m, then the probability of E, P(E), is
  9. 9. Example for classical method  Suppose a “fun size” bag of M&Ms contains 9 brown candies, 6 yellow candies, 7 red candies, 4 orange candies, 2 blue candies, and 2 green candies. Suppose that a candy is randomly selected.  (a) What is the probability that it is brown?  P (B) = 9/30
  10. 10. 2. Empirical method  The probability of an event E is approximately the number of times event E is observed divided by the number of repetitions of the experiment.  The empirical probability, also known as relative frequency.  In a more general sense, empirical probability estimates probabilities from experience and observation.
  11. 11. Example for Empirical method  It is desired to know what the probability is that someone in a particular population favors blue over other colors. We pick at random 150 people in this population, and 39 of the 150 favor blue.  The probability of someone in this population favoring blue is the relative frequency 39/150 = 0.26
  12. 12. 3. Subjective Probability  Subjective probabilities are probabilities obtained based upon an educated guess.  A subjective probability describes an individual's personal judgment about how likely a particular event is to occur.  A person's subjective probability of an event describes his/her degree of belief in the event.  A probability value is unconsciously or consciously arrived at and even may be biased.  For example, there is a 40% chance of rain tomorrow.
  13. 13. Mutually Exclusive Event /disjoint  Can't happen at the same time.  Probability of them both occurring at the same time is 0.  Turning left and turning right are Mutually Exclusive.  Tossing a coin: Heads and Tails are Mutually Exclusive.  P(E) and P(F) are mutually exclusive event.
  14. 14. Addition Rule  For any two events E and F, P(E or F) = P(E) + P(F) – P(E and F)  If E and F are mutually exclusive, then P(E and F) is zero.  For Mutually Exclusive Event, P(E or F) = P(E) + P(F)
  15. 15. Venn Diagram  Venn diagrams represent events as circles enclosed in a rectangle. The rectangle represents the sample space and each circle represents an event.  Instead of "and" you will often see the symbol ∩ (which is the "Intersection" symbol used in Venn Diagrams).  Instead of "or" you will often see the symbol ∪ (the "Union" symbol).
  16. 16. Example  16 people study French, 21 study Spanish and there are 30 altogether. Work out the probabilities.  This is definitely a case of not Mutually Exclusive (you can study French AND Spanish).  b is how many study both languages.  (16−b) + b + (21−b) = 30
  17. 17. Examples  A single 6-sided die is rolled. What is the probability of rolling a 2 or a 5?  A glass jar contains 1 red, 3 green, 2 blue, and 4 yellow marbles. If a single marble is chosen at random from the jar, what is the probability that it is yellow or green?  A single card is chosen at random from a standard deck of 52 playing cards. What is the probability of choosing a king or a club?  A number from 1 to 10 is chosen at random. What is the probability of choosing a 5 or an even number?
  18. 18. Complement  The Complement of an event is all the other outcomes (not the ones we want).  Together the Event and its Complement make all possible outcomes. P(E) + P(E') = 1
  19. 19. Example for Complement  According to the American Veterinary Medical Association, 31.6% of American households own a dog. What is the probability that a randomly selected household does not own a dog?  E= Own a dog  P(E) =31.6% P(E)  68.4%
  20. 20. Independent event  Independent events are events such that the outcome of one event does not affect the outcome of the second, and vice versa.  For Ex: Event A: It rained on Tuesday.  Event B: My chair broke at work.  These two events are unrelated. Probability of one event is not going to affect another event.
  21. 21. Mutually Exclusive vs Independent  if A and B are mutually exclusive, they cannot be independent. Because it make other event probability to be zero. (It affecting other event probability).
  22. 22. Multiplication rule for Independent event P(A and B) =P(A∩B)= P(A) * P(B) Example : Suppose we roll one die followed by another and want to find the probability of rolling a 4 on the first die and rolling an even number on the second die. P(A∩B) = 1/12
  23. 23. Dependent event  What are the chances of getting a blue marble?  The chance is 2 in 5  But after taking one out the chances change!  Event depends on what happened in the previous event, and is called dependent.
  24. 24. Multiplication rule for dependent event P(A and B) = P(A∩B)= P(A) * P(B|A)  P(B|A) means "Event B given Event A“.  In other words, event A has already happened, now what is the chance of event B?.  P(B|A) is also called the "Conditional Probability" of B given A.
  25. 25. Conditional Probability  What is the probability of drawing two blue marbles without replacement one by one?  Event A = Drawing blue marble first.  Event B = Drawing blue marble second.  P(A) = 2/5 (Probability of drawing blue marble first).  P(B|A) = ¼ (Event A has happened, what is the probability of Event B). P(A∩B) = 1/10
  26. 26. Examples for Conditional Probability  70% of your friends like Chocolate, and 35% like Chocolate AND like Strawberry. What percent of those who like Chocolate also like Strawberry?  Two cards are selected without replacement, from a standard deck. Find the probability of selecting a king and then selecting a queen.
  27. 27. Bayes’ Theorem  The Bayes’ Theorem was developed and named for Thomas Bayes (1702 – 1761).  It can be seen as a way of understanding how the probability that a theory is true is affected by a new piece of evidence.
  28. 28. Bayes’ Theorem Bayes theorem can be rewritten with help of multiplicative law of an dependent events. (One event affects probability of other event)
  29. 29. Bayes’ Theorem with Tree diagram
  30. 30. Probability from tree  G= Economic Grow  S = Economic Slow  U = Stock up  D = Stock Down  P(G) = Probability of Economic Grows (70%)  P(U/G) = Probability of stock improves (up) given that economy is growing. (80%) (Conditional probability : What is the probability of stock up with condition on economy is growing?
  31. 31. Probability  What is the probability of economy grows and stock up? P(G∩U) = P(U/G) × P(G) = 0.7 × 0.8 = 0.56  What is the probability that economy grows given that stock went up? P(G/U) = Apply Bayes’ Theorem
  32. 32. Bayes’ Theorem 푃 푈 퐺 ∗푃(퐺) P(G|U) = 푃(푈) P(G|U) = 푃 푈 퐺 ∗푃(퐺) 푃 푈 퐺 ∗푃 퐺 +푃 푈 푆 ∗푃(푆) = 86%  P(G) = 70% (Unconditional Probability)  By giving addition of new information that stock went up, unconditional probability becomes conditional probability P(G|U) = 86%  This is called Bayes’ Theorem
  33. 33. Exercise - 1  1% of the population has X disease. A screening test accurately detects the disease for 90% of people with it. The test also indicates the disease for 15% of the people without it (the false positives). Suppose a person screened for the disease tests positive. What is the probability they have it? Given: P(D) = .01 P(T|D) = 0.9 P(T|퐷 ) = 0.15 Find: P(D|T) = ?
  34. 34. Exercise - 2  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? W = Correctly predicted by Weathermen. R = Rain 1. P(R) = 5/365 2. P (W|R) = 90% 3. P (푊 |푅 ) = 10% 4. P(R|W) = ?