1 / 89

Lecture Slides

Lecture Slides. Elementary Statistics Eleventh Edition and the Triola Statistics Series by Mario F. Triola. Chapter 4 Probability. 4-1 Review and Preview 4-2 Basic Concepts of Probability 4-3 Addition Rule 4-4 Multiplication Rule: Basics

molly
Download Presentation

Lecture Slides

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Lecture Slides Elementary StatisticsEleventh Edition and the Triola Statistics Series by Mario F. Triola

  2. Chapter 4Probability 4-1 Review and Preview 4-2 Basic Concepts of Probability 4-3 Addition Rule 4-4 Multiplication Rule: Basics 4-5 Multiplication Rule: Complements and Conditional Probability 4-6 Probabilities Through Simulations 4-7 Counting

  3. Section 4-1 Review and Preview

  4. Preview Rare Event Rule for Inferential Statistics: If, under a given assumption, the probability of a particular observed event is extremely small, we conclude that the assumption is probably not correct. Statisticians use the rare event rule for inferential statistics.

  5. Example of rare event: A company claims that it developed a gender selection technique to ensure that you get a baby girl. In a clinical study they got 13 girls out of 14 babies on which they applied the technique. If the technique were not effective, there would be approximately equal chance of boy or girl. If so, 13 girls out of 14 babies are very unlikely – rare event => Even though there is a chance of getting 13 out of 14 cases by chance, that chance (probability) is so low, that it would be rejected as a reasonable explanation – rare event!!! Instead, the technique would be considered effective. Statisticians reject explanations based on very low probabilities.

  6. Section 4-2 Basic Concepts of Probability

  7. Part 1 Basics of Probability

  8. My example Consider coin tosses. Single coin toss: Heads (H) or Tails (T). This is a simple event (cannot be broken down) – got H or got T Sample space = {H,T} Consider 2 coin tosses. Simple events are HH, HT etc… Sample space = { HH, HT, TH, TT } Note that event 1 H and 1 T is NOT simple, because it can be further broken into 2 events HT and TH.

  9. H - HHH H M - HHM H S = { HHH, HHM, HMH, HMM, MHH, MHM, MMH, MMM} Note: 8 elements, 23 H - HMH M M - HMM M … … Sample spacesIt’s the question that determines the sample space. A. A basketball player shoots three free throws. What are the possible sequences of hits (H) and misses (M)? B. A basketball player shoots three free throws. What is the number of baskets made? S = { 0, 1, 2, 3 } C. A nutrition researcher feeds a new diet to a young male white rat. What are the possible outcomes of weight gain (in grams)? S = (all numbers ≥ 0)

  10. P- denotes a probability. A, B, andC- denote specific events. P(A)- denotes the probability of event A occurring. Notation for Probabilities

  11. Rule 1: Relative Frequency Approximation of Probability Conduct (or observe) a procedure, and count the number of times event A actually occurs. Based on these actual results, P(A) is approximated as follows: P(A)= # of times A occurred # of times procedure was repeated Basic Rules for Computing Probability

  12. Examples of relative frequency approach: 1) Out of 400 new accounts opened by an investment firm last year, 300 were profitable => P(particular account is profitable) = 300/400 = 0.75

  13. Rule 2: Classical Approach to Probability (Requires Equally Likely Outcomes) Assume that a given procedure has n different simple events and that each of those simple events has an equal chance of occurring. If event A can occur in s of these n ways, then Basic Rules for Computing Probability - continued s P(A) = number of ways A can occur = n number of different simple events

  14. Example: Probability Model for a Coin Toss: S = {Head, Tail} – sample space (assume equal chance of occurring) Probability of heads = 0.5 Probability of tails = 0.5 Example: If you flip two coins, and the first flip does not affect the second flip: S = {HH, HT, TH, TT} – sample space. The probability of each of these events is 1/4, or 0.25. Example: Probability of winning grand prize in lottery by selecting 6 numbers between 1 and 60. Each combination is assumed to have equal probability of occurring. P = 2e-8

  15. When finding probabilities with relative frequency approach, we obtain an approximation, not an exact value. As a procedure is repeated again and again, the relative frequency probability of an event tends to approach the actual probability. With only a few trials, we can get a very different result. Law of Large Numbers

  16. The result of any single coin toss is random. But the result over many tosses is predictable, as long as the trials are independent (i.e., the outcome of a new coin flip is not influenced by the result of the previous flip). Coin toss The probability of heads is 0.5 = the proportion of times you get heads in many repeated trials – low of large numbers at work First series of tosses Second series

  17. Example – 2 coin tosses (classical approach). If you flip two coins, H and T are equally likely, and 1st flip does not affect 2nd : S = {HH, HT, TH, TT} – sample space. H and T are equally likely => probability of each of these events is 1/4, or 0.25 – equally likely outcomes. What is the probability we get 2 different coins? Among 4 total outcomes, there are 2 where coins are different HT and TH. P = 2/4 = 0.5. Example – Genotypes. When studying effects of heredity on height, the genotypes are {AA, Aa, aA, aa} = S – sample space. -- Assume all 4 are equally likely. Then, it is the same as coin tosses above Probability to get two different genotypes is P = 0.5 (Aa and aA)

  18. Example – 3 coin tosses (classical approach). Assume you flip three coins, H and T are equally likely, and one flip does not affect another: S = {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT} – sample space, 8 elements In this case the total number of outcomes is not obvious – have to enumerate! H and T are equally likely => probability of each of these events is 1/8 – equally likely outcomes. What is the probability we get exactly 2 Heads? Among 8 total outcomes, there are 3 with exactly two heads. => P = 3/8 = 0.375. Example – Gender of children. A couple has 3 children. What is probability of having exactly 2 girls? Assume boys and girls are equally likely and gender of one child is not influenced by the gender of another. S = {GGG, GGB, GBG, GBB, BGG, BGB, BBG, BBB} – sample space, 8 elements Then, it is the same as coin tosses above Probability to get two girls is P = 0.375

  19. Example – survey (relative frequency approach). A polling firm conducted a survey of party affiliations. They obtained 340 Dem, 300 Rep, and 360 Indep out of 1000 subjects. What is the probability that a randomly selected individual is Democrat? P = # Dem / total = 340/1000 = 0.34

  20. Example: Polygraph test Sample space consists of 100 tests. Assume they are all randomly selected. Probability of negative test result is (40+5)/100 = 0.45 ------||------------ positive (10+45)/100 = 0.55 false positive (10)/100 = 0.1 false negative (5) / 100 = 0.05 polygraph being wrong (10+5)/100 = 0.15

  21. NOTE on Simulations: It may seem that we should always use classical approach when a procedure has equally likely outcomes. In reality, many procedures are so complicated that classical approach is impractical and relative frequency is employed. Some card game hands may all be equally likely, but there are so many possibilities, that it is too hard to find it classically. A computer simulation is usually employed where the same game rules are coded into a program and it is run, say, 1 million times.

  22. Probability Limits The probability of an event that is certain to occur is 1. Always express a probability as a fraction or decimal number between 0 and 1. • The probability of an impossible event is 0. • For any event A, the probability of A is between 0 and 1 inclusive. That is,0 P(A)  1.

  23. The complement of event A, denoted by A, consists of all outcomes in which the event A does not occur. Complementary Events

  24. Part 2 skip Beyond theBasics of Probability: Odds

  25. Odds (optional) skip The actual odds against event A occurring are the ratio P(A)/P(A), usually expressed in the form of a:b (or “a to b”), where a and b are integers having no common factors. The actual odds in favor ofevent A occurring are the ratio P(A)/P(A), which is the reciprocal of the actual odds against the event. If the odds against A are a:b, then the odds in favor of A are b:a. The payoff odds against event A occurring are the ratio of the net profit (if you win) to the amount bet. payoff odds against event A = (net profit) : (amount bet)

  26. skip Example: casino roulette Assume you bet on one particular number (say 10) out of 38 possible. P(10) = 1/38 P(not 10) = 37/38 Actual odds against 10 = P(not A)/P(A) = 37/1 <=> 37:1 Casino gives payoff odds 35:1. 35:1 = (net profit):(amount bet) => If bet $100, win $3500 If casino was not operated for profit, it should have been 37:1 and you would win $3700 NOTE: odds against event A = a:b correspond to probability P(A) = b/(a+b) Odds against 10 are 37:1 => P(10) = 1/(37+1) = 1/38

  27. Section 4-3 Addition Rule

  28. Key Concept This section presents the addition rule to find probabilities that can be expressed as P(AorB), the probability that either event A occurs or event B occurs (or they both occur) as the single outcome of the procedure. The key words in this section are “or” and “single outcome” It is the inclusive or, which means either one or the other or both. Compound Event: any event combining 2 or more simple events Formal Addition Rule P(A or B) = P(A) + P(B) – P(A and B) where P(A and B) denotes the probability that A and B both occur at the same time as an outcome in a trial of a procedure.

  29. Examples: Addition rule 1) Suppose a high school consists of 25% juniors, 15% seniors, and the remaining 60% is students of other grades. The relative frequency of students who are either juniors and seniors is 40%. We can add the relative frequencies of juniors (P(J)=0.25) and seniors (P(S)=0.15) because no student can be both junior and senior P(J and S) = 0. P(J or S) = 0.25 + 0.15 = 0.40 2) Suppose that we draw one card from a deck of 52 playing cards. What is the probability that the card will be either a king or a heart? The probability of drawing a king is P(K) = 4/52. The probability of drawing a heart is P(H) = 13/52 The probability of drawing the king of hearts is P(K and H) = 1/52. Therefore: P(K or H) = 4/52 + 13/52 - 1/52 = 16/52 = 4/13 Or informally there are 4 kings and 13 heats, adding King of Hearts only once: 3 + 13 16 P = --------- = ----- 52 52

  30. Examples: Back to polygraph example. P( get positive test result or subject lied ) = P(get positive) + P(lied) – P(both) = 0.55 + 0.5 - 0.45 = 0.6 Or more directly counting only once: (10+45+5)/100 = 0.6 -- be careful to avoid double counting!!!

  31. Disjoint or Mutually Exclusive Events A and B are disjoint (or mutually exclusive) if they can NOT occur at the same time. That is, disjoint events do not overlap. Venn Diagram for Disjoint Events A and B empty, P(A and B) = 0 P (A or B) = P(A) + P(B) Venn Diagram for Events That Are Not Disjoint – A and B not empty P(A and B) not 0 P (A or B) = P(A) + P(B) - P(A and B) -- have to remove double counting

  32. Back to same examples: Addition rule 1) Suppose a high school consists of 25% juniors, 15% seniors, and the remaining 60% is students of other grades. The relative frequency of students who are either juniors and seniors is 40%. We can add the relative frequencies of juniors (P(J)=0.25) and seniors (P(S)=0.15) because no student can be both junior and senior P(J and S) = 0. P(J or S) = 0.25 + 0.15 = 0.40 2) Suppose that we draw one card from a deck of 52 playing cards. What is the probability that the card will be either a king or a heart? The probability of drawing a king is P(K) = 4/52. The probability of drawing a heart is P(H) = 13/52 The probability of drawing the king of hearts is P(K and H) = 1/52. Therefore: P(K or H) = 4/52 + 13/52 - 1/52 = 16/52 = 4/13 Disjoint events Not disjoint (overlapping) events

  33. Examples: Back to polygraph example. • Consider a procedure of selecting randomly 1 of 100 test subjects. • Let Event A = Get a subject with negative test results • Event B = Get a subject who lied • -- NOT disjoint, there is overlap of 5 subjects (false positive) – it is hard, but not impossible to beat a polygraph

  34. Return to Complementary Events Remember that the complement of event A, denoted by A, consists of all outcomes in which the event A does not occur. A and A are disjoint => (A and A) is empty. It is impossible for an event and its complement to occur at the same time. Also, we are certain that either A or A does occur => P(A) + P(A) = 1 = 1 – P(A) P(A) = 1 – P(A) P(A)

  35. Examples: 1) A coin is flipped, it can either land on "heads" or on "tails" Because these two events are complementary, we have P(H) + P(T) = 1 2) Three marbles are in a bag. One is blue and two are red. Assuming that each has an equal chance of being pulled out of the bag, we get P(B) = 1/3 P(R) = 2/3 3) A single card is chosen at random from a standard deck of 52 playing cards. What is the probability of choosing a card that is not a king? Probability:  P(not king) = 1 - P(king)  = 1 -  4 /52  = 48/52  = 12/13 4) A single 6-sided die is rolled. What is the probability of rolling a number that is not 4?  Probability:  P(not 4) = 1 - P(4)  = 1 - 1/6  = 5/6

  36. Section 4-4 Multiplication Rule: Basics

  37. Key Concept The basic multiplication rule is used for finding P(A and B), the probability that event A occurs in a first trial and event B occurs in a second trial (NOT same trial). If the outcome of the first event A somehow affects the probability of the second event B, it is important to adjust the probability of B to reflect the occurrence of event A. P(A and B) = P(event A occurs in a first trial and event B occurs in a second trial) Compare to the “or” before: P(A or B) = P (in a singletrial, event A occurs or event B occurs or they both occur)

  38. Tree Diagrams A tree diagram is a picture of the possible outcomes of a procedure, shown as line segments emanating from one starting point. These diagrams are sometimes helpful in determining the number of possible outcomes in a sample space, if the number of possibilities is not too large.

  39. Tree Diagrams This figure summarizes the possible outcomes for a true/false question followed by a multiple choice question. Note that there are 10 possible combinations. What is the probability that if somebody makes random guesses for both answers, the 1st answer will be correct and 2nd will be correct. If answers are random guesses, then all 10 possible outcomes are equally likely => P(both correct) = P(T and c) = 1/10 Note that P(T) = ½ and P(c) = 1/5 => P(T and c) = P(T)*P(c) This suggests that in general P(A and B) = P(A) * P(B) – NOT True Correct answers are T and c

  40. Examples: A card is chosen at random from a standard deck of 52 playing cards. Without replacing it, a second card is chosen. What is the probability that the first card chosen is a queen and the second card chosen is a jack? P(queen on first pick) = 4/52  P(jack on 2nd pick given queen on 1st pick) =  4/51  P(queen and jack) =  4/52  ·  4/51  =   0.006033183 --- not 4/52  ·  4/52 P(jack on 2nd pick given queen on 1st pick) --- Conditional Probability We must adjust the probability of the second event to reflect the outcome of the first event. I.e. the probability for the second event B should take into account the fact that the first event A has already occurred. P(B|A) represents the probability of event B occurring after it is assumed that event A has already occurred (read B|A as “B given A.”) Note that: P(jack on 2nd pick |jack on 1st pick) = 4/52  ·  3/51 =0.0045

  41. Example: Two subjects are randomly selected without replacement. • Find probability that 1st person had a positive test and 2nd negative. • P(1st positive) = 55/100 = 0.55 • After the 1st selection, there are 99 subjects left, 45 of whom had negative test. • P(2nd negative adjusted) = 45/99 = 0.4545455 • Then P(1st positive and 2nd negative) = P(1st positive) * P(2nd negative adjusted) • = 0.55* 0.4545455 = 0.25 • NOTE that P(1st positive)*P(2nd negative not adjusted) = 0.55*0.45 = 0.2475 • -- NOTsame => • In general P(A and B) is not P(A)*P(B)

  42. Dependent and Independent Two events A and B are independent if the occurrence of one does NOT affect the probability of the occurrence of the other. If A and B are not independent, they are said to be dependent. (NOT one causing another just affecting probability). Several events are similarly independent if the occurrence of any does not affect the probabilities of the occurrence of the others.

  43. Multiplication Rule P(A and B) = P(A) • P(BA) When finding the probability that event A occurs in one trial and event B occurs in the next trial, multiply the probability of event A by the probability of event B, but be sure that the probability of event Btakes into account the previous occurrence of event A. Note that if A and B are independent events, P(B A) is really the same as P(B).

  44. Applying the Multiplication Rule

  45. Examples: • Answering correctly T/F in 1st test question and 2nd multiple choice questions were independent => P(A and B) = P(A)*P(B) • On polygraph test, picking 1st subject affects picking 2nd subject (less options) => • dependent => P(A and B) = P(A)*P(B|A) --- NOT P(A)*P(B) • Choosing 2 cards without replacement, choosing 1st affects probability for 2nd => • dependent => P(A and B) = P(A)*P(B|A) --- NOT P(A)*P(B) • NOTE • In examples 2 and 3, if the selection were done with replacement => • Then for 2nd subject or for 2nd card, the selection would begin with exactly the same collection of items => • The events A and B would be independent and P(A and B) = P(A)*P(B)

  46. Multiplication Rule for Several Events In general, the probability of any sequence of independent events is simply the product of their corresponding probabilities. Example: Probability of tossing a fair coin 6 times and getting all Heads is : P = 0.5*0.5* … *0.5 = 0.5^6 = 0.015625 -- because tossing coin are independent events.

  47. Treating Dependent Events as Independent Some calculations are cumbersome, but they can be made manageable by using the common practice of treating events as independent when small samples are drawn from large populations. In such cases, it is rare to select the same item twice. If a sample size is no more than 5% of the size of the population, treat the selections as being independent (even if the selections are made without replacement, so they are technically dependent).

  48. Example: • Assume that out of 1000 computer chips produced 30 are defective. • If 3 are randomly selected without replacement, what is probability that they are all good? • Exact probability = (1000-30)/1000 * (1000-30-1)/999 * (1000-30-2)/998 = 0.9125882 • Approximate = ( (1000-30)/1000 ) ^ 3 = 0.912673 --- very close • 30/1000 << 5%, so the rule is applicable and we can see that it works. • 2) If 20 are randomly selected without replacement, what is probability that they are all good? • > P = 1 • > N = 1000 • > n = 20 • > bad = 30 • > for ( i in 1:n ) { • + P = P*(N-i+1-bad)/(N-i+1) • + } • > P • [1] 0.5405657 • > • > Papprox = ( (N-bad)/N )^n • > Papprox • [1] 0.5437943 • The error is very small.

  49. Ex 4, p165 : optional • The following example is designed to illustrate the importance of carefully identifying the event being considered. • Note that parts (a) and (b) appear to be quite similar, but their solutions are very different. • Birthdays problem Assume two people are randomly selected and their b-days occur on the days of the week with equal frequencies. • What is the probability that they are born on the same day of the week? • Because no particular day is specified, the 1st person can be born on any day. • The probability that the 2nd is born on the same day is just 1/7 => • The probability that two people are born on the same day of the week is 1/7. • What is the probability that two people are born on Sat. • The probability that 1st is born on Sat is 1/7, same for the 2nd. • These events are independent => • The probability that two people are born on Sat is (1/7)*(1/7) = 1/49. • (b) illustrates independent events, while (a) shows how one must be careful with wording of the problem.

  50. Quality control example, faulty cell phones. Assume manufacturer claims that only about 1% of its cell phones are faulty. However, in a batch of 10 phones, all 10 turn out to be bad. What is the probability of such an event occurring by chance? One phone is independent of another => independent events. P(10 are faulty) = P(1st bad and 2nd bad ….) = independent = P(1st bad)*P(2nd bad) * … = 0.01^10 = 1e-20 - manufacturer’s claim is extremely unlikely.

More Related