051 Probability
051 Probability
Using a Histogram
We can express these results (from the 1000 rolls) in terms of relative frequencies and display the results using a histogram:
0.7 0.6 0.5
Relative Frequency
Threes Face Up
Probability of Events
Probability that an Event Will Occur: The relative frequency with which that event can be expected to occur The probability of an event may be obtained in three different ways:
Empirically Theoretically Subjectively
3. n(A): number of times the event A has occurred 4. n: number of times the experiment is attempted
Example
Example: Consider tossing a fair coin. Define the event H as the occurrence of a head. What is the probability of the event H, P(H)?
1. In a single toss of the coin, there are two possible outcomes 2. Since the coin is fair, each outcome (side) should have an equally likely chance of occurring 3. Intuitively, P(H) = 1/2 (the expected relative frequency)
Notes: This does not mean exactly one head will occur in every two tosses of the coin In the long run, the proportion of times that a head will occur is approximately 1/2
Long-Run Behavior
To illustrate the long-run behavior:
1. Consider an experiment in which we toss the coin several times and record the number of heads 2. A trial is a set of 10 tosses 3. Graph the relative frequency and cumulative relative frequency of occurrence of a head 4. A cumulative graph demonstrates the idea of long-run behavior 5. This cumulative graph suggests a stabilizing, or settling down, effect on the observed cumulative probability 6. This stabilizing effect, or long-term average value, is often referred to as the law of large numbers
Experiment
Experimental results of tossing a coin 10 times each trial:
Number of Relative Cumulative Trial Heads Observed Frequency Relative Frequency 1 5 5/10 5/10 = 0.5000 2 4 4/10 9/20 = 0.4500 3 4 4/10 13/30 = 0.4333 4 5 5/10 18/40 = 0.4500 5 6 6/10 24/50 = 0.4800 6 7 7/10 28/60 = 0.4667 7 6 6/10 34/70 = 0.4857 8 4 4/10 38/80 = 0.4750 9 7 7/10 45/90 = 0.5000 10 3 3/10 48/100 = 0.4800 11 4 4/10 52/110 = 0.4727 12 6 6/10 58/120 = 0.4838 13 7 7/10 65/130 = 0.5000 14 4 4/10 69/140 = 0.4929 15 3 3/10 72/150 = 0.4800 16 7 7/10 79/160 = 0.4938 17 6 6/10 85/170 = 0.5000 18 3 3/10 88/180 = 0.4889 19 6 6/10 94/190 = 0.4947 20 4 4/10 98/200 = 0.4900
Relative Frequency
0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 5 10 15 20 25
Trial
0.55
0.5
0.45
0.4 0 5 10 15 20 25
Trial
In symbols: As n ,
P ' (A ) P (A )
Tree Diagram
Student 1 Student 2 Outcomes Y Y N Y N N N, N
1. This diagram consists of four branches: 2 first generation branches and 4 second generation branches 2. Each branch shows a possible outcome
Y, Y Y, N N, Y
Examples
Example: An experiment consists of two trials. The first is tossing a penny and observing a head or a tail; the second is rolling a die and observing a 1, 2, 3, 4, 5, or 6. Construct the sample space:
S = { H1, H2, H3, H4, H5, H6, T1, T2, T3, T4, T5, T6 }
Example: Three voters are randomly selected and asked if they favor an increase in property taxes for road construction in the county. Construct the sample space:
S = { NNN, NNY, NYN, NYY, YNN, YNY, YYN, YYY}
Example
Example: An experiment consists of selecting electronic parts from an assembly line and testing each to see if it passes inspection (P) or fails (F). The experiment terminates as soon as one acceptable part is found or after three parts are tested. Construct the sample space: Outcome F FFF F F P FFP P FP P P S = { FFF, FFP, FP, P }
Example
Example: The 1200 students at a local university have been cross tabulated according to resident and college status:
Arts and Sciences Resident 600 Nonresident 175 Business 280 145
The experiment consists of selecting one student at random from the entire student body n(S) = 1200
Example
Example: On the way to work, some employees at a certain company stop for a bagel and/or a cup of coffee. The accompanying Venn diagram summarizes the behavior of the employees for a randomly selected work day:
Coffee Bagel
32 18
16
11
10
Notes
1. The outcomes in a sample space can never overlap 2. All possible outcomes must be represented 3. These two characteristics are called mutually exclusive and all inclusive
Rules of Probability
Consider the concept of probability and relate it to the sample space Recall: the probability of an event is the relative frequency with which the event could be expected to occur, the long-term average
11
4. This formula gives a theoretical probability value of event As occurrence 5. The use of this formula requires the existence of a sample space in which each outcome is equally likely
Example
Example: A fair coin is tossed 5 times, and a head (H) or a tail (T) is recorded each time. What is the probability of:
A = {exactly one head in 5 tosses}, and B = {exactly 5 heads}?
The outcomes consist of a sequence of 5 Hs and Ts A typical outcome includes a mixture of Hs and Ts, like: HHTTH There are 32 possible outcomes, all equally likely A = {HTTTT, THTTT, TTHTT, TTTHT, TTTTH}
P (A ) = n(A ) 5 = n(S ) 32 n( B) 1 P ( B) = = n ( S ) 32
B = {HHHHH}
12
Subjective Probability
1. Suppose the sample space elements are not equally likely, and empirical probabilities cannot be used 2. Only method available for assigning probabilities may be personal judgment 3. These probability assignments are called subjective probabilities 4. Personal judgment of the probability is expressed by comparing the likelihood among the various outcomes
13
Properties
1. The probability of any event A is between 0 P(A ) 1 0 and 1: 2. The sum of the probabilities of all outcomes in the sample space is 1:
P (A ) = 1
all outcomes
Notes: The probability is zero if the event cannot occur The probability is one if the event occurs every time (a sure thing)
Example
Example: On the way to work Bobs personal judgment is that he is four times more likely to get caught in a traffic jam (TJ) than have an easy commute (EC). What values should be assigned to P(TJ) and P(EC)?
P (T J ) = 4 P ( EC ) P (T J ) + P ( E C ) = 1
14
Odds
Odds: another way of expressing probabilities If the odds in favor of an event A are a to b, then:
1. The odds against A are b to a 2. The probability of event A is: P(A) =
b a +b a a +b
Example
Example: The odds in favor of you passing an introductory statistics class are 11 to 3. Find the probability you will pass and the probability you will fail.
15
Complement of An Event
Complement of an Event: The set of all sample points in the sample space that do not belong to event A. The complement of event A is denoted by
A
(read A complement).
Example
Example:
1. The complement of the event success is failure 2. The complement of the event rain is no rain 3. The complement of the event at least 3 patients recover out of 5 patients is 2 or fewer recover Notes: P ( A ) + P ( A ) = 1 for any event A P(A ) = 1 P(A ) Every event A has a complementary event A Complementary probabilities are very useful when the question asks for the probability of at least one.
16
Example
Example: A fair coin is tossed 5 times, and a head(H) or a tail (T) is recorded each time. What is the probability of 1) A = {at least one head in 5 tosses} 2) B = {at most 3 heads in 5 tosses} Solutions: 1) P ( A ) = 1 P ( A ) = 1 P ( 0 heads in 5 tosses) 1 31 = 1 = 32 32 2) P ( B ) = 1 P ( B ) = 1 P ( 4 or 5 heads) = 1 ( P ( 4 heads) + P (5 heads)) 5 1 6 26 13 = 1 + = = = 1 32 32 32 32 16
Example
Example: A local automobile dealer classifies purchases by number of doors and transmission type. The table below gives the number of each classification. M anual Automatic
2-door 4-door Transmission Transmission 75 155 85 170
If one customer is selected at random, find the probability that: 1) The selected individual purchased a car with automatic transmission 2) The selected individual purchased a 2-door car
17
Solutions
1) P ( Automatic Transmission)
Compound Events: formed by combining several simple events: The probability that either event A or event B will occur: P(A or B) The probability that both events A and B will occur: P(A and B) The probability that event A will occur given that event B has occurred: P(A | B)
18
Notes: Complementary events are also mutually exclusive Mutually exclusive events are not necessarily complementary
Example
Example: The following table summarizes visitors to a local amusement park:
Male Female Total All-Day Pass 1200 900 2100 Half-Day Pass 800 700 1500 Total 2000 1600 3600
One visitor from this group is selected at random: 1) Define the event A as the visitor purchased an all-day pass 2) Define the event B as the visitor selected purchased a halfday pass 3) Define the event C as the visitor selected is female
19
Solutions
1) The events A and B are mutually exclusive 2) The events A and C are not mutually exclusive. The intersection of A and C can be seen in the table above or in the Venn diagram below:
3)
A C
1200
900
700
800
Illustration:
A B
20
This can be expanded to consider more than two mutually exclusive events:
P(A or B or C) = P(A) + P(B) + + P(E)
B
A
D C
Example
Example: All employees at a certain company are classified as only one of the following: manager (A), service (B), sales (C), or staff (D). It is known that P(A) = 0.15, P(B) = 0.40, P(C) = 0.25, and P(D) = 0.20
P ( A ) = 1 P ( A ) = 1 0.15 = 0.85 P ( A and B ) = 0 (A and B are mutually exclusive ) P ( B or C ) = P ( B) + P ( C ) = 0.40 + 0.25 = 0.65 P ( A or B or C ) = P ( A ) + P ( B) + P ( C ) = 0.15 + 0.40 + 0.25 = 0.80
21
Example
Example: A consumer is selected at random. The probability the consumer has tried a snack food (F) is 0.5, tried a new soft drink (D) is 0.6, and tried both the snack food and the soft drink is 0.2
P(Tried the snack food or the soft drink ) = P( F or D) = P( F) + P( D) P( F and D) = 0.5 + 0.6 0.2 = 0.9
P ( Not tried the snack food ) = P ( F) = 1 P ( F) = 1 0.5 = 0.5
P(Tried neither the snack food nor the soft drink ) = P[( F or D)] = 1 P( F or D) = 1 0.9 = 0.1
P ( Tried only the soft drink ) = P ( D ) P ( F and D ) = 0.6 0.2 = 0.4
Independent Events: Two events A and B are independent events if the occurrence (or nonoccurrence) of one does not affect the probability assigned to the occurrence of the other. Note: If two events are not independent, they are dependent
22
Conditional Probability
1. Sometimes two events are related in such a way that the probability of one depends upon whether the second event has occurred 2. Partial information may be relevant to the probability assignment Conditional Probability: The symbol P(A | B) represents the probability that A will occur given B has occurred. This is called conditional probability. P(A and B) 1. P(A| B) = P(B) 2. Given B has occurred, the relevant sample space is no longer S, but B (reduced sample space) 3. A has occurred if and only if the event A and B has occurred
Independent Events
Independent Events: Two events A and B are independent events if: P(A | B) = P(A) or P(B | A) = P(B) Notes: If A and B are independent, the occurrence of B does not affect the occurrence of A If A and B are independent, then so are:
A and B A and B A and B
23
Example
Example: Consider the experiment in which a single fair die is rolled: S = {1, 2, 3, 4, 5, 6 }. Define the following events:
A = a 1 occurs, B = an odd number occurs, and C = an even number occurs
P (A| B) = P ( A | C) = P ( B| A ) = P ( A and B) 1 / 6 1 = = P ( B) 3/ 6 3 P ( A and C) 0 = =0 P ( C) 3/ 6 P ( B and A ) 1 / 6 = =1 P(A ) 1/ 6
Example
Example: In a sample of 1200 residents, each person was asked if he or she favored building a new town playground. The responses are summarized in the table below:
Age Less than 30 (Y) 30 to 50 (M) More than 50 (O) Total
1) Favor the new playground? 2) Favor the playground if the person selected is less than 30? 3) Favor the playground if the person selected is more than 50? 4) Are the events F and M independent?
If one resident is selected at random, what is the probability the resident will:
24
Solutions
1) P( F) =
950 19 = 1200 24 P ( F and Y) 250 / 1200 5 2) P ( F| Y) = = = P ( Y) 300 / 1200 6 P ( F and O) 100 / 1200 4 = = P ( O) 225 / 1200 9
3) P ( F| O) = 4) P ( F| M ) =
25
Solutions
1) P (All three get colds this winter )
= P ( A and B and C) = P ( A ) P( B) P (C) = (0.15)(0.25)(0.30) = 0.0113
= (0.15)(0.25)(0.70) = 0.0263
26
Notes
1. Independence and mutually exclusive are two very different concepts a. Mutually exclusive says the two events cannot occur together, that is, they have no intersection b. Independence says each event does not affect the other events probability 2. P(A and B) = P(A) P(B) when A and B are independent a. Since P(A) and P(B) are not zero, P(A and B) is nonzero b. Thus, independent events have an intersection 3. Events cannot be both mutually exclusive and independent a. If two events are independent, then they are not mutually exclusive b. If two events are mutually exclusive, then they are not independent
27
Example
Example: A certain company uses three overnight delivery services: A, B, and C. The probability of selecting service A is 1/2, of selecting B is 3/10, and of selecting C is 1/5. Suppose the event T is on time delivery. P(T|A) = 9/10, P(T|B) = 7/10, and P(T|C) = 4/5. A service is randomly selected to deliver a package overnight. Construct a tree diagram representing this experiment. Notes: A set of branches that initiate from a single point has a total probability of 1 Each outcome for the experiment is represented by a branch that begins at the common starting point and ends at the terminal points at the right
Solution
The resulting tree diagram:
A
9 / 10 T 1 / 10 T 7 / 10 T
1/ 2
3 / 10 1/ 5
3 / 10 T 4/5 T
C
1/ 5
28
1 9 9 P (A and T) = P (A ) P (T| A ) = = 2 10 20
Example
Example: A manufacturer is testing the production of a new product on two assembly lines. A random sample of parts is selected and each part is inspected for defects. The results are summarized in the table below:
Defective (D) 40 25 65
Suppose a part is selected at random: 1) Find the probability the part is defective 2) Find the probability the part is produced on Line 1 3) Find the probability the part is good or produced on Line 2
29
Solutions
1) P ( D) =
65 215 (total defective divided by total number of parts)
2) P (1) =
3) P ( G or 2) = n( G or 2) = 175 n( S ) 215 (total good or produced on Line 2 divided by total parts) 150 105 80 = 175 = P ( G ) + P ( 2) P ( G and 2) = + 215 215 215 215
Example
Example: This problem involves testing individuals for the presence of a disease. Suppose the probability of having the disease (D) is 0.001. If a person has the disease, the probability of a positive test result (Pos) is 0.90. If a person does not have the disease, the probability of a negative test result (Neg) is 0.95. For a person selected at random: 1) Find the probability of a negative test result given the person has the disease 2) Find the probability of having the disease and a positive test result 3) Find the probability of a positive test result
30
0.90 0.001
D
Pos
Neg
Pos
0.95
Neg
Solutions
1) P ( Neg| D ) = 1 P ( Pos| D ) = 1 0.90 = 0.10 2) P ( D and Pos ) = P ( D ) P ( Pos| D ) = (0.001)(0.90) = 0.0009 3) P ( Pos) = P ( D and Pos) + P ( D and Pos) = P ( D) P ( Pos|D) + P ( D) P ( Pos| D) = (0.001)(0.90) +(0.0009)(0.05) = 0.5085
31