Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 Modeling Variation with Probability.

Similar presentations


Presentation on theme: "Chapter 5 Modeling Variation with Probability."— Presentation transcript:

1 Chapter 5 Modeling Variation with Probability

2 Chapter 5 Topics Use empirical and theoretical probability models
Apply basic probability rules

3 What is randomness? Section 5.1
ronstik. Shutterstock What is randomness? Use a Random Number Table or Technology to Simulate Randomness Distinguish Between Empirical and Theoretical Probabilities

4 What Is Randomness? Having no predictable pattern
People are not good at identifying truly random samples or random experiments. Usually a computer or some other randomizing device, such as a random number table, is used to simulate randomness.

5 Example: Simulating Randomness Using a Random Number Table
Use Row 30 from the random number table to simulate 10 coin tosses. Let odd numbers = H and even numbers = T. What is the longest streak of H or T in your data?

6 Example: Simulating Coin Tosses Using a Random Number Table
HTHTH HHTHT THHHH TTTHT Longest streak: 4 heads in a row

7 Probability Used to measure how often random events occur
When tossing a coin, the probability of a head is ½ or 50%. This means that the coin will land on heads about 50% of the time. Two types: Theoretical Empirical

8 Theoretical Probabilities
Long-run relative frequencies The relative frequency at which an event occurs after infinitely many repetitions Example: If we were to flip a coin infinitely many times, exactly 50% of the flips would be heads.

9 Empirical Probabilities
Relative frequencies based on an experiment or on observation of a real-life process Example: I toss a coin 10 times and get 4 heads. The empirical probability of getting heads is 4/10 = 0.4, or 40%.

10 Theoretical vs. Empirical Probabilities
Theoretical probabilities are always the same value. Example: The theoretical probability of getting a heads when tossing a coin is always 0.50 or 50%. Empirical probabilities change with every experiment. Example: If I toss a coin 10 times and get 7 heads, the empirical probability of heads = 0.70 or 70%. If I toss a coin 10 times and get 3 heads, the empirical probability of heads = 0.30 or 30%.

11 Why Two Probability Models?
Theoretical probabilities may be difficult to compute – empirical probabilities can help us estimate theoretical probabilities. We may not trust the theoretical probability model (for example, the model may be based on faulty assumptions) – empirical probabilities can help us verify or refute a theoretical value.

12 Simulations Experiments used to produce empirical probabilities
In a previous example, we used a random number table to simulate tossing a coin 10 times.

13 Finding theoretical probabilities
Section 5.2 MNStudio. Shutterstock Finding theoretical probabilities Find Theoretical Probabilities of Equally Likely Events Find the Probability of the Complement of an Event Use Basic Probability Rules

14 Probabilities Always between 0 and 1 (including 0 and 1)
Written in symbols: 0 ≤ P(A) ≤ 1 Can be expressed as fractions, decimals, or percents An event has a probability of 0 only if it can never happen. An event has a probability of 1 only if it is certain to happen.

15 Probability Notation Events are usually represented with uppercase letters: A, B, C, etc. The probability of event A occurring is written P(A). Example: Toss a coin. Let A represent the event “the coin lands on heads.” P(A) = ½ or 0.50 or 50%

16 The Complement of an Event: AC
The complement refers to the event “not” occurring. The complement of event A is written Ac. Example: Toss a coin. A = coin lands on heads, Ac = coin does NOT land on heads. Example: Wait for a bus and note its arrival time. A = bus arrives on time, Ac = bus does NOT arrive on time.

17 The Probability of an Event and Its Complement
P(A does NOT occur) = 1 – P(A does occur) In symbols, P(Ac) = 1 – P(A) Examples: Let event A represent the event “the candidate wins an election.” Suppose P(A)=0.70. Then Ac represent the event “the candidate does NOT win the election” and P(Ac) = 1 – P(A) = 1 – 0.70 = 0.30

18 Sample Space and Events for Equally Likely Outcomes
Sample space The set of all possible equally likely outcomes of an experiment. Event Any collection of outcomes in the sample space.

19 Example: Sample Space Experiment: Roll a fair die one time. Sample space: S = 1, 2, 3, 4, 5, 6 Example: Event = “roll an even number” Outcomes: 2, 4, 6 Example: Event = “roll a number less than 3” Outcomes: 1, 2

20 Using a Sample Space to find a Theoretical Probability
For equally likely events: P(A) = number of outcomes in A number of all possible outcomes Example: Roll a die. Let A represent the event “get a number less than 3.” Find P(A). Sample space: 1, 2, 3, 4, 5, 6 6 outcomes A: 1, 2 2 outcomes

21 Using a Sample Space to find a Theoretical Probability
A family has 2 children. Find the probability that both children are girls. Let A represent the event that both are girls. Sample space: BB, BG, GB, GG 4 outcomes Event A: GG 1 outcome

22 Combining Events with “And”
An event belonging to “A and B” must belong to both A and B. Example: If event A represents “wearing a hat” and event B represents “raising a hand” then someone in A and B is wearing a hat and raising a hand.

23 Combining Events Using “And”
A person is selected at random from this group. Find the probability that he/she is wearing a hat AND raising his/her hand. Number in sample space = 6, number raising a hand and wearing a hat = 2 (Maria and David), P(A and B) = 2/6.

24 Combining Events Using “Or”
An event belonging to “A or B” must belong to A or B or both. Example: If event A represents “wearing a hat” and event B represents “raising a hand” then someone in A or B is wearing a hat or raising a hand or both.

25 Combining Events Using “Or”
A person is selected at random from this group. Find the probability that he/she is wearing a hat OR raising his/her hand. Number in sample space = 6, number raising a hand or wearing a hat or both (Rena, Maria, David) = 3, P(A or B) = 3/6

26 Finding Probabilities from Two-Way Tables
In the 2012 General Social Survey (GSS) people were asked about their happiness and were also asked whether they agreed with the following statement: “In a marriage, the husband should work and the wife should take care of the home.” The following table summarizes the data collected: Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146

27 Finding Probabilities from Two-Way Tables
Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146 Suppose a person is randomly selected from this group. Find: P(happy and agree) P(happy or agree) P(Agree or Don’t Know)

28 Finding Probabilities from Two-Way Tables
Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146 Suppose a person is randomly selected from this group. Find: P(happy and agree) = 242/1146 = 0.211

29 Finding Probabilities from Two-Way Tables
Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146 Suppose a person is randomly selected from this group. Find: P(happy or agree) The total number of people who are happy or agree is: = 1036 P(happy or agree) = 1036/1146 = 0.904

30 Finding Probabilities from Two-Way Tables
P(Agree or Don’t Know) The total number of people who Agree or Don’t Know is = 382 P(Agree or Don’t Know) = 382/1146 = or 33.3% Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146

31 Mutually Exclusive Events
Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146 When counting the number of people who Agree or Don’t Know, no person was in BOTH categories. We say the events “Agree” and “Don’t Know” are MUTUALLY EXCLUSIVE EVENTS.

32 Mutually Exclusive Events
Agree Don’t Know Disagree Total Happy 242 65 684 991 Unhappy 45 30 80 155 287 95 764 1146 When counting the number of people who are happy or agree, notice that there is a group of people (242) who appear in both categories at the same time – those who are happy AND agree. The events “Happy” and “Agree” are NOT mutually exclusive.

33 Probability Rule: “OR”
P(A or B) = P(A) + P(B) – P(A AND B) NOTE: If A and B are mutually exclusive, then they cannot happen at the same time, so P(A AND B) = 0. For MUTUALLY EXCLUSIVE EVENTS: P(A or B) = P(A) + P(B)

34 Example: Probabilities with “OR”
Experiment: Roll a fair six-sided die. Find: P(rolling an odd number or a number greater than 3) P(rolling a number less than 3 or rolling a 6)

35 Example: Probabilities with “OR”
Experiment: Roll a fair six-sided die. Find: P(rolling an odd number or a number greater than 3) The outcomes for event “rolling an odd number” are 1, 3, 5 and the probability of this event is 3/6. The outcomes for event “a number greater than 3” are 4, 5, 6 and the probability of this event is 3/6. Notice these are NOT mutually exclusive since both events contain the outcome “5”. P(rolling an odd number or a number greater than 3) = 3/6 + 3/6 – 1/6 = 5/6.

36 Example: Probabilities with “OR”
Experiment: Roll a fair six-sided die. Find: P(rolling a number less than 3 or rolling a 6) The outcomes for event “rolling a number less than 3” are 1 and 2, and the probability of this event is 2/6. The outcome for the event “rolling a 6” is simply 6, and the probability of this event is 1/6. Notice that these are mutually exclusive events. P(rolling a number less than 3 or rolling a 6) = 2/6 + 1/6 = 3/6 or ½.

37 Associations in categorical variables
Section 5.3 Ruben Pinto. Shutterstock Associations in categorical variables Find Conditional Probabilities Determine if Events are Dependent or Independent Use Probabilities to Determine if an Association May Exist Between Categorical Variables

38 Associations Between Categorical Variables
This table shows marital status and educational level for a random sample. Question: Is there an association between marital status and educational level? In other words, are the proportions of married people different for various levels of education? For example, are college-educated more (or less) likely to be married than HS-educated?

39 Conditional Probabilities
Probabilities where we focus on just one group and imagine taking a random sample from that group alone are called conditional probabilities. Example: P(a person is married given that the person is college-educated) Example: P(a person is single given that the person’s highest educational level is HS)

40 “Given That” vs. “And” P(married and college educated) would use the number in the intersection of married and college. P(married given that they are college educated) would focus solely on the number of college educated and count the number in that group who are married.

41 Example: “And” Ed. Level Single Married Divorced Widow/er Total
Less HS 17 70 10 28 125 HS 68 240 59 30 397 College or + 27 98 15 3 143 112 408 84 61 665 P(Married and College-Educated) = 98/665 = .147 or 14.7%

42 Example: “Given that” Ed. Level Single Married Divorced Widow/er Total Less HS 17 70 10 28 125 HS 68 240 59 30 397 College or + 27 98 15 3 143 112 408 84 61 665 To find P(Married, given that s/he is college-educated), we only focus on the college-educated group for our total and from this group, find the number who are married. P(Married, given that s/he is college-educated) = 98/143 = .685 or 68.5%.

43 Conditional Probability: Notation
To write P(married, given that s/he is college-educated) we write: P(married | college-educated) In general, P(A|B) means find the probability that event A occurs given that event B has occurred.

44 Calculating Conditional Probabilities
One can calculate conditional probabilities from tables by isolating the group from which you are sampling as we did in the previous example. Conditional probabilities can also be calculated by using this formula (helpful in cases where you do not have complete information):

45 Example: Isolating the Sampling Group
Ed. Level Single Married Divorced Widow/er Total Less HS 17 70 10 28 125 HS 68 240 59 30 397 College or + 27 98 15 3 143 112 408 84 61 665 Find P(married|less HS). By isolating the sampling group, the total of less HS is Of these, 70 are married, so P(married|less HS) = 70/125 = 0.56

46 Example: Using the Formula
Ed. Level Single Married Divorced Widow/er Total Less HS 17 70 10 28 125 HS 68 240 59 30 397 College or + 27 98 15 3 143 112 408 84 61 665 Find P(married|less HS). Using the formula: P(married AND less HS) = 70/665, P(less HS)=125/665, so P(married|less HS) = (70/665)/(125/665) = 70/125 = 0.56.

47 Independent Events Variables or events that are not associated are called INDEPENDENT EVENTS. Two events are independent if knowledge that one has happened tells you nothing about whether or not the other event has happened. In symbols: A and B are independent events means P(A|B) = P(A)

48 Example: Independent Events
Suppose a card is drawn from a standard deck of playing cards. Are the events “the card is a club” and “the card is black” independent? P(card is a club) = 13/52 = 1/4 P(card is black) = 26/52 = ½ P(card is a club|card is black) = 13/26 = ½ (Note: There are 26 black cards, of which 13 are clubs.) P(card is club) ≠ P(card is club|card is black) so the events are NOT independent. The events are associated.

49 Example Ed. Level Single Married Divorced Widow/er Total Less HS 17 70 10 28 125 HS 68 240 59 30 397 College or + 27 98 15 3 143 112 408 84 61 665 Are the events “person selected has a HS education” and “person selected is divorced” independent? P(HS|divorced) = 59/84 = 0.702 P(HS)=397/665 = 0.597 The probabilities are not equal so the events are not independent. The events are associated.

50 Probability and “AND” The Multiplication Rule: For INDEPENDENT events, P(A AND B) = P(A) P(B).

51 Example: Gender of Babies
Suppose 49% of babies born in the US are girls. A couple has 2 children. Find P(both are girls). P(first is a girl and second is a girl) = P(first is a girl) P(second is a girl) = 0.49 x 0.49 = 0.24

52 Example: Gender of Babies
A couple has 2 children. Find P(the first is a boy and the second is a girl). P(first is a boy and second is a girl) = P(first is a boy) P(second is a girl) = 0.51 x 0.49 =

53 Example According to a Wall Street Journal survey, 70% of consumers prefer to shop online rather than in person at their favorite retailer. Suppose three consumers are randomly selected with replacement from the population of consumers. What is the probability that all three prefer to shop online? What is the probability that none prefer to shop online? What is the probability that at least one prefers to shop online? Source:

54 Example NOTE: These are independent events because one consumer’s answer will not affect the probability of the next consumer’s answer, so we can use the Multiplication Rule. P(all three prefer to shop online) = P(first prefers online AND second prefers online AND third prefers online) = 0.70 x 0.70 x 0.70 = 0.343 P(none prefer online) = P(first does not prefer online AND second does not prefer online AND third does not prefer online) = 0.30 x 0.30 x 0.30 = 0.027

55 Example P(at least one prefers online) = P(one prefers online OR two prefer online OR three prefer online). We could calculate the probability of each of these events and add them together, but it is easier to note that “at least one is satisfied” is the complement of “none is satisfied” since is includes all categories except “none.” So P(at least one prefers online) = 1 – P(none prefer online) = 1 – = 0.973

56 Finding empirical probabilities
Section 5.4 Ferran Recio. Shutterstock Finding empirical probabilities Use Simulations to Find Empirical Probabilities

57 Empirical Probabilities
Based on observations of real-life events Examples: Baseball player’s batting average Percentage of times a bus arrives late

58 Empirical Probabilities
When we can’t find data or when a situation is too complex for us to find the empirical probability of a random event, we can sometimes simulate the situation to generate data needed to find the empirical probability.

59 Steps for a Simulation Identify the random action and the probability of a successful outcome. Determine how to simulate this random action (for example: technology, random number table). Determine the event you’re interested in. Explain how you will simulate one trial. Carry out a trial, record whether or not the event of interest occurred. Repeat the trial many times (at least 100) and count the number of times your event occurred. Use the data to find the empirical probability.

60 Example: Simulation for P(3 Heads) When Tossing a Coin 3 Times
Identify the random action and the probability of a successful outcome. Random action is the outcome of a single coin toss. P(head) = 0.50 Determine how to simulate this random action (for example: technology, random number table). Use a random number table. Let even digits = “tails” and odd digits = “heads.” Determine the event you’re interested in. Interested in whether we get 3 Heads in 3 tosses.

61 Example: Coin Toss Simulation
Explain how you will simulate one trial. Read off 3 digits from a row in the table; each digit represents a toss. Record T for even numbers and H for odd numbers. Carry out a trial, record whether or not the event of interest occurred. If 3 heads occur in 3 tosses, record “yes”; otherwise record “no.” Repeat the trial many times (at least 100) and count the number of times your event occurred. Use the data to find the empirical probability. Empirical probability = #yes/total number of trials

62 Example: Coin Toss Simulation
Starting with line 01: 210 = THT = NO (did not get 3 heads) 333 = HHH = YES (did get 3 heads) 252 = THT = NO (did not get 3 heads) Repeat at least 100 times

63 Law of Large Numbers If an experiment with a random outcome is repeated a large number of times, the empirical probability of an event is likely to be close to the true probability. The larger the number of repetitions, the closer together these probabilities are likely to be.


Download ppt "Chapter 5 Modeling Variation with Probability."

Similar presentations


Ads by Google