Conditional Probability and Independence Section 5.3 Reference Text: The Practice of Statistics, Fourth Edition. Starnes, Yates, Moore Objectives 1. Conditional Probability - “what's the probability of Event B given that Event A has happened” 2. Independent Events If the chances of event B occurring is not affected by whether event A occurs, then A and B are independent! 3. Tree Diagrams! Map out my probability calculations! General Multiplication Rule P(A ∩ B) = P(A) * P(B I A) Special case of independent events, multiplication rule becomes P(A ∩ B) = P(A) * P(B) 4. Conditional Probability formula Conditional Probability • The probability that one event happens given that another event is already known to have happened is called Conditional Probability. • Suppose we known that event A has happened. Then the probability that event B happens given that event A has happened is denoted by P(B I A) Lets look at the male and pierced ears example! Two way Tables • Students in college stats class wanted to find out how common it is for young adults to have their ears pierced. They recorded data on two variables- gender and whether the student had a pierced ear – for all 178 people in class. The two way table below displays the data. Pierced ears? Gender Yes No Total Male 19 71 90 Female 84 4 88 Total 103 75 178 A= male B= pierced ears P(A) = P(male) = 90/178 P(B) = P(pierced ears) = 103/178 P(A ∩ B) = P(male and pierced ears) = 19/178 P(A U B) = P(male or pierced ears) = 174/178 Now lets turn out attention to some other interesting probability questions… Heads Up • You might be thinking to yourself in the previous slide and this next slide, “hey, we’ve done this before! Is there a connection between conditional probability and the conditional distributions of Chapter 1?!” • Of course! We have been doing probability and conditional probability from the start! Conditional Probability • Conditional probability narrows your focus in onto a specific event. Given a certain condition…. P(A I B) P( B I A) Flashback! • In 1912 the luxury liner Titanic, on its first voyage across the Atlantic, struck an iceberg and sank. Some passengers got off the ship in lifeboats, but many died. The two-way table below gives information about adult passengers who lived and who died, by class of travel. Survival Status Class of Travel Survived Died First Class 197 122 Second Class 94 167 Third Class 151 476 Total Total Conditional Probability • • • • P(survived I first class) P(survived) P(died I third class) P(first class I survived) Checking for Independence • Sometimes applying a conditional probability doesn’t affect the outcome and we get the same probability as if we were just calculating the probability of the event without the condition. • When this happens, this is known as Independent events- if the occurrence of one event has no effect on the chance that the other event will happen. P(A I B) = 19/100 P(A) = 19/100 Checking for Independence • In order to know if two events are independent we need to compute probabilities. • Example: Is there a relationship between gender and handedness? To find out we used CensusAtSchool’s Random Data Selector to chose an SRS of 50 Australian high school students who completed a survey. The two way table displays data on the gender and dominant hand of each student. Checking for Independence • To check whether the two events are independent, we need to see whether knowing that one event has happened affects the probability that the other event occurs. Dominant Hand Gender Right Left Total Male 20 3 23 Female 23 4 27 Total 43 7 50 Are the events “male” and “left handed” independent? • Suppose we are told that the chosen student is male. From the two way table P(Left handed I male) = 3/23 =0.13 • The unconditional probability P(left handed) = 7/50 =0.14 These two probabilities are close, but they’re not equal. So the events “male” and “left handed” are not independent. Tree Diagrams General Multiplication Rule • When I say to you, “what's the probability of flipping a heads and heads again?” • The word “and” implies multiplication! – This same strategy works for trials that are not independent as well! • We can diagram the outcomes and probability of each through a tree diagram! Tree Diagram: flipping a coin twice General Multiplication Rule • When we calculate the probability of flipping two heads, we are following the general multiplication rule! P(A ∩ B) = P(A) * P(B I A) Read as: “The Probability of A intersect B equals the probability of flipping a heads multiplied by the probability of flipping a second heads given that the first flip was heads.” Teens with online profiles • The Pew Internet and American Life Project finds that 93% of teenagers (ages 12 to 17) use the internet, and that 55% of online teens have posted a profile on a social-networking site Question: What percent of teens are online and have posted a profile? Create a tree diagram. Lets do this on the board! Check for Understanding • A computer company makes desktops and laptop computers at factories in three states- California, Texas, and New York. The California factory produces 40% of the company’s computers, the Texas factory makes 25%, and the remaining 35% are manufactured in New York. Of the computers made in California, 75% are laptops. Of those made in Texas and New York, 70% and 50% respectively, are laptops. All computers are first shipped to a distribution center in Missouri before being sent out to stores. Suppose we select a computer at random from the distribution center. 1. Construct a tree diagram to represent the situation. 2. Find the probability that it’s a laptop from California. Show your work. Independence: A Special Multiplication Rule • If A and B are independent events, then the probability that A and B occur is P(A ∩ B) = P(A) * P(B) Note that this rule only applies to independent events. Lets look at an example. The Challenger Disaster • On January 28, 1986, Space Shuttle Challenger exploded on takeoff. All seven crew members were killed. Following the disaster, scientists and statisticians helped analyze what went wrong. They determined that the failure of O-ring joints in the shuttle’s booster rockets was to blame. Under cold conditions that day, experts estimated that the probability that an individual O-ring joint would function properly was 0.977. But there were six of these O-ring joints, and all six had to function properly for the shuttle to launch safely. • Assuming that O-ring joints succeed or fail independently, find the probability that the shuttle would launch safely under similar conditions. The Challenger Disaster • Assuming that O-ring joints succeed or fail independently, find the probability that the shuttle would launch safely under similar conditions. • P(joint 1 OK and joint 2 OK and joint 3 OK and joint 4 OK and joint 5 OK and joint 6 OK) = • (0.977) (0.977) (0.977) (0.977) (0.977) (0.977)= 0.87 • There is an 87% chance that the shuttle would launch safely under similar conditions (and a 13% chance that it wouldn’t). Conditional Probability Formula • If we rearrange the terms in the general multiplication rule, we can get the formula for the conditional probability P(A I B). We start with the general multiplication rule: P(A ∩ B) = P(A) * P(B I A) Example Cell Phone No Cell Phone Total Landline 0.60 0.18 0.78 No Landline 0.20 0.02 0.22 Total 0.80 0.20 1.00 Objectives 1. Conditional Probability - “what's the probability of Event B given that Event A has happened” 2. Independent Events If the chances of event B occurring is not affected by whether event A occurs, then A and B are independent! 3. Tree Diagrams! Map out my probability calculations! General Multiplication Rule P(A ∩ B) = P(A) * P(B I A) Special case of independent events, multiplication rule becomes P(A ∩ B) = P(A) * P(B) 4. Conditional Probability formula Homework Worksheet