* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Conditional probability and Markov chains
Survey
Document related concepts
Transcript
P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> C H A P T E R 11 M PL E Conditional probability and Markov chains Objectives To introduce the ideas of conditional probability and independent events. To use the law of total probability to calculate probabilities To use matrices to display conditional probabilities and perform probability calculations To define transition matrices that can be used to determine probabilities for a sequence of conditional events To define Markov chains and use the associated transition matrices to calculate probabilities 11.1 Conditional probability and the multiplication rule SA The probability of an event A occurring when it is known that some event B has occurred is called conditional probability and is written Pr(A|B). This is usually read as ‘the probability of A given B’, and can be thought of as a means of adjusting probability in the light of new information. Example 1 Suppose we roll a fair die and define event A as ‘rolling a six’ and event B as ‘rolling an even number’. What is the probability of rolling a six given the information that an even number was rolled? Solution The events A and B can be shown on a Venn diagram thus: We know that event B has already occurred, so we know that the outcome was 2, 4 or 6. 1 5 B 2 A 4 6 3 317 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 318 Essential Mathematical Methods 1 & 2 CAS Thus number of favourable outcomes total number of outcomes n(A) = n(A ∪ B) Pr(a 6 is rolled given an even number is rolled) = = 1 3 E P1: FXS/ABE Example 2 M PL 1000 drivers were questioned and classified according to age and number of accidents in the last year. The results are shown in the table. Age < 30 Age ≥ 30 Total At most one accident More than one accident 130 470 170 230 300 700 Total 600 400 1000 A driver is selected at random from the 1000 drivers. Given that the selected driver is less that 30 years of age, what is the probability that this person has had more than one accident? Solution SA It is known that the driver selected is less than 30 years of age, so the driver in question is one of the 600 drivers in this age group. Of these, 470 have had more than 470 . one accident. Thus, the probability is 600 47 470 = Thus: Pr(more than one accident|age < 30) = 600 60 It may be seen from the table that the same answer is obtained from the quotient 470 Pr(more than one accident ∩ age < 30) 1000 = 470 = 47 = 600 Pr(age < 30) 600 60 1000 That is: Pr(more than one accident|age < 30) = Pr(more than one accident ∩ age < 30) Pr(age < 30) It can be shown that this relationship between the conditional probability of event A given that event B has already occurred, the probability of the intersection of events A and B, and the probability of event B is true for all events A and B, so long as the probability of event B is not equal to zero. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 319 In general, the conditional probability of an event A, given that event B has already occurred, is given by Pr(A|B) = Pr(A ∩ B) Pr(B) if Pr(B) = 0 This formula may be rearranged to give the multiplication rule for probability: Pr(A ∩ B) = Pr(A|B) × Pr(B) E P1: FXS/ABE Example 3 Given that for two events A and B, Pr(A) = 0.7, Pr(B) = 0.3 and Pr(B|A) = 0.4, find: a Pr(A ∩ B) b Pr(A|B) M PL Solution a Pr(A ∩ B) = Pr(B|A) × Pr(A) = 0.4 × 0.7 = 0.28 b Pr(A|B) = 0.28 14 Pr(A ∩ B) = = Pr(B) 0.3 15 Example 4 In a particular school 55% of the students are male and 45% are female. Of the male students 13% say mathematics is their favourite subject, while of the female students 18% prefer mathematics. Find the probability that: a a student chosen at random prefers mathematics and is female b a student chosen at random prefers mathematics and is male. Solution SA Let us use M to represent male, F for female, and P for prefer mathematics. Thus: Pr(M) = 0.55, Pr(F) = 0.45, Pr(P|M) = 0.13 and Pr(P|F) = 0.18 We can use the multiplication rule to find the required probabilities: a The event ‘prefers mathematics’ and ‘is female’ is represented by P ∩ F. Thus: Pr(P ∩ F) = Pr(P|F) × Pr(F) = 0.18 × 0.45 = 0.081 b The event ‘prefers mathematics’ and ‘is male’ is represented by P ∩ M. Thus: Pr(P ∩ M) = Pr(P|M) × Pr(M) = 0.13 × 0.55 = 0.0715 As has already been seen, the tree diagram is an efficient way of listing a multi-stage sample space. If the probabilities associated with each stage are also added to the tree diagram, it becomes a very useful way of calculating the probability for each sample outcome. The probabilities at each stage are conditional probabilities that the particular path will be followed, and the multiplication rule says that the probability of reaching the end of a given branch is the product of the probabilities associated with each segment of that branch. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 320 Essential Mathematical Methods 1 & 2 CAS Example 5 Using the information for Example 4, construct a tree diagram and use it to determine: a the probability that a student selected is female and does not prefer mathematics b the overall percentage of students who prefer mathematics. Solution The situation described can be represented by a tree diagram as follows: 0.13 M 0.87 PM Pr(P ∩ M) = 0.55 × 0.13 = 0.0715 P'M Pr(P ∩ M) = 0.55 × 0.87 = 0.4785 M PL 0.55 E P1: FXS/ABE 0.45 0.18 PF Pr(P ∩ F) = 0.45 × 0.18 = 0.081 0.82 P' F Pr(P ∩ F) = 0.45 × 0.82 = 0.369 F a To find the probability that a student is female and does not prefer mathematics we multiply along the appropriate branches thus: Pr(F ∩ P ) = Pr(F) × Pr(P |F) = 0.45 × 0.82 = 0.369 b Now, to find the overall percentage of students who prefer mathematics we recall that: P = (P ∩ F ) ∪ (P ∩ M ) Since P ∩ F and P ∩ M are mutually exclusive: SA Pr(P) = Pr(P ∩ F) + Pr(P ∩ M) = 0.081 + 0.0715 = 0.1525 Thus 15.25% of all students prefer mathematics. The solution to part b of Example 5 is an application of a rule known as the law of total probability. This can be expressed in general terms as follows: In general, the law of total probability states that in the case of two events, A and B: Pr(A) = Pr(A|B) Pr(B) + Pr(A|B ) Pr(B ) A further example of the use of the law of total probability is given in the following example. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 321 Example 6 In a certain town, the probability that it rains on any Monday is 0.21. If it rains on Monday, then the probability that it rains on Tuesday is 0.83. If it does not rain on Monday, then the probability of rain on Tuesday is 0.3. Find the probability that it rains: a on both days b on Tuesdays E Solution Let M represents the event ‘rain on Monday’ and T represent the event ‘rain on Tuesday’. The situation described in the question can be represented by a tree diagram. You can check that the probabilities are correct by seeing if they add to 1. Pr(T ∩ M) = 0.21 × 0.83 = 0.1743 TM 0.17 T ' M Pr(T ∩ M) = 0.21 × 0.17 = 0.0357 0.3 TM' Pr(T ∩ M ) = 0.79 × 0.3 = 0.237 0.7 T' M' Pr(T ∩ M ) = 0.79 × 0.7 = 0.553 M PL 0.83 0.21 M 0.79 M' a The probability that it rains on both Monday and Tuesday is given by Pr(T ∩ M) = 0.21 × 0.83 = 0.1743 b The probability that it rains on Tuesdays is given by Pr(T ) = Pr(T ∩ M) + Pr(T ∩ M ) = 0.1743 + 0.237 = 0.4113 SA Exercise 11A Example 1 1 Suppose that a fair die is rolled, and event A is defined as ‘rolling a six’ and event B as ‘rolling a number greater than 2’. Find Pr(A|B). Example 2 2 The following data was derived from accident records on a highway noted for its above-average accident rate. Probable cause Type of accident Speed Alcohol Reckless driving Other Total Fatal Non fatal 42 88 61 185 22 98 12 60 137 431 Total 130 246 120 72 568 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 322 Essential Mathematical Methods 1 & 2 CAS Use the table to estimate: a b c d Example 3 the probability that speed is the cause of the accident the probability that the accident is fatal the probability that the accident is fatal, given that speed is the cause the probability that the accident is fatal, given that alcohol is the cause. 3 Given that for two events A and B, Pr(A) = 0.6, Pr(B) = 0.3 and Pr(B|A) = 0.1, find: a Pr(A ∩ B) b Pr(A|B) E P1: FXS/ABE 4 For events A and B: a Pr(A) = 0.7, Pr(A ∩ B) = 0.4, find Pr(B|A) b Pr(A|B) = 0.6, Pr(B) = 0.5, find Pr(A ∩ B) c Pr(A|B) = 0.44, Pr(A ∩ B) = 0.3, find Pr(B) M PL 5 In a random experiment Pr(A) = 0.5, Pr(B) = 0.4, and Pr(A ∪ B) = 0.7. Find: a Pr(A ∩ B) b Pr(A|B) c Pr(B|A) 6 In a random experiment Pr(A) = 0.6, Pr(B) = 0.54, and Pr(A ∩ B ) = 0.4. Find: a Pr(A ∩ B) b Pr(A|B) c Pr(B|A) 7 In a random experiment Pr(A) = 0.4, Pr(A|B) = 0.6, and Pr(B) = 0.5. Find: a Pr(A ∩ B) b Pr(B|A) 8 A fair coin is tossed twice. Let A be the event ‘the first toss is a head’, B be the event ‘the second toss is a head’ and C be the event ‘at least one toss is a head’. Find the following probabilities: a Pr(B) d Pr(C|A) b Pr(C) e Pr(B|C) c Pr(B|A) f Pr(C|B ) SA 9 The current football fixture has the local team playing at home for 60% of its matches. When it plays at home, the team wins 80% of the time. When it plays away, the team wins only 40% of the time. What percentage of its games does the team play away and win? 10 The probability that a car will need an oil change is 0.15, the probability that it needs a new oil filter is 0.08, and the probability that both the oil and the filter need changing is 0.03. Given that the oil has to be changed, what is the probability that a new oil filter is also needed? 11 A card is selected from a pack of 52 playing cards. The card is replaced and a second card chosen. Find the probability that: a both cards are hearts c the first card is red and the second is black b both cards are aces d both cards are picture cards 12 A card is selected from a pack of 52 playing cards, and not replaced. Then a second card chosen. Find the probability that: a both cards are hearts c the first card is red and the second is black b both cards are aces d both cards are picture cards Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 323 13 A person is chosen at random from the employees of a large company. Let W be the event that the person chosen is a woman, and A be the event that the person chosen is 25 years or older. Suppose the probability of selecting a woman Pr(W ) = 0.652 and the probability of a woman being 25 years or older is Pr(A|W ) = 0.354. Find the probability that a randomly chosen employee is a woman aged 25 years or older. 14 In a class of 28 students there are 15 girls. Of the students in the class, six girls and eight boys play basketball. A student is chosen at random from the class. If G represents the event that a girl student is chosen and B represents the event that the student chosen plays basketball, find: a Pr(G) e Pr(G|B) b Pr(B) f Pr(B|G ) E P1: FXS/ABE c Pr(B ) g Pr(B ∩ G ) d Pr(B|G) h Pr(B ∩ G) M PL 15 In a recent survey it was found that 85% of the population eats red meat. Of those who eat red meat, 60% preferred lamb. A person is chosen at random from the population. If R represents the event that the person eats red meat, and L represents the event that the person prefers lamb, find: a Pr(R) b Pr(L|R) c Pr(L ∩ R) d Pr(L) 16 In a senior college, 25% of the Year 11 students and 40% of the Year 12 students would prefer not to wear school uniform. This particular college has 320 Year 11 students and 280 Year 12 students. Find the probability that a randomly chosen student is in Year 11 and is in favour of wearing school uniform. What is the overall percentage of students who are in favour of wearing school uniform? 17 At a certain school it was found that 35% of the 500 boys and 40% of the 400 girls enjoyed bushwalking. One student from the school is chosen at random. Let G represent the event that the student is a girl, and B represent the event that the student enjoys bushwalking. SA a Find, correct to 2 decimal places: i Pr(G) ii Pr(B|G ) iii Pr(B|G ) b Find Pr(B). c Hence find: i Pr(G|B) ii Pr(G|B ) iv Pr(B ∩ G ) v Pr(B ∩ G ) 18 In a factory two machines produce a particular circuit board. The older machine produces 480 boards every day, of which an average of 12% are defective. The newer machine produces 620 boards each day, of which an average of 5% are defective. A board is chosen at random and checked. Let N represent the event that the board comes from the newer machine, and D represent the event that the board is defective. a Find, correct to 2 decimal places: i Pr(N ) ii Pr(D|N ) iii Pr(D|N ) iv Pr(D ∩ N ) b Find Pr(D). c Hence find Pr(N|D), correct to 2 decimal places. v Pr(D ∩ N ) Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 324 Essential Mathematical Methods 1 & 2 CAS 19 Jane has three bags of lollies. In bag 1 there are three mints and three toffees, in bag 2 there are three mints and two toffees and in bag 3 there are two mints and one toffee. Jane selects a bag at random, and then selects a lolly at random. Find: a the probability she chooses a mint from bag 1 b the probability she chooses a mint c the probability that Jane chose bag 1, given that she selects a mint. 20 Describe the relationship between non-empty events A and B if: Pr(A) c Pr(A|B) = a Pr(A|B) = 1 b Pr(A|B) = 0 Pr(B) 11.2 Independent events E P1: FXS/ABE M PL Two events A and B are independent if the occurrence of one event has no effect on the probability of the occurrence of the other. That is, if Pr(A|B) = Pr(A) If Pr(B) = 0 then: Pr(A|B) = Pr(A ∩ B) Pr(B) (multiplication rule of probability) Thus, equating the two expressions for Pr(A|B): Pr(A) = Pr(A ∩ B) Pr(B) or Pr(A ∩ B) = Pr(A) × Pr(B) When A and B are independent events: Pr(A ∩ B) = Pr(A) × Pr(B) SA Compare this with the multiplication rule: Pr(A ∩ B) = Pr(A|B) × Pr(B) Example 7 Consider the information given in Example 2 in the previous section. Is the number of accidents independent of the driver’s age? Solution From the table in Example 2: Pr(more than one accident|age < 30) = Pr(more than one accident) = 470 = 0.783 600 700 = 0.7 1000 Therefore, as Pr(more than one accident|age < 30) = Pr(more than one accident), the two events are not independent. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 325 The concept of mathematical independence is sometimes confused with physical independence. If two events are physically independent, then they are also mathematically independent, but the converse is not necessarily true. The following example illustrates this. Example 8 Suppose we roll a die twice and define the following events: A = the first roll shows a 4 B = the second roll shows a 4 E P1: FXS/ABE C = the sum of the numbers showing is at least 10 Are A and B independent events? What about A and C? Solution M PL Since A and B are physically independent they are also mathematically independent. Checking gives 1 6 1 Pr(B) = 6 Pr(A) = If we write the sample space as ordered pairs, in which the first element is the result of the first throw, and the second the result of the second throw, then ε = {(1, 1), (1, 2), (1, 3), . . . (6, 5), (6, 6)} and n(ε) = 36 The event A ∩ B corresponds to the outcome (4, 4) and so n(A ∩ B) = 1 1 = Pr(A) × Pr(B) 36 and so A and B are independent. Pr(A ∩ B) = SA Thus: Now consider event and so Hence Also So Thus: C = {(4, 6), (5, 5), (5, 6), (6, 4), (6, 5), (6, 6)} n(C) = 6 1 Pr(C) = 6 A ∩ C = {(4, 6)} and n(A ∩ C) = 1 1 Pr(A ∩ C) = 36 1 1 1 Pr(A) × Pr(C) = × = 6 6 36 This means that A and C are also independent events. Knowing that events are independent means that we can determine the probability of their intersection by multiplying together individual probabilities. This is illustrated in the following example. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 326 Essential Mathematical Methods 1 & 2 CAS Example 9 Suppose that the probability that a family in a certain town owns a television set (T ) is 0.75, and the probability that a family owns a station wagon (S) is 0.25. If these events are independent, find the following probabilities: a A family chosen at random owns both a television set and a station wagon. b A family chosen at random owns at least one of these items. Solution E P1: FXS/ABE a The event ‘owns a television set’ and ‘owns a station wagon’ is represented by T ∩ S. Thus: (T and S are independent) M PL Pr(T ∩ S) = Pr(T) × Pr(S) = 0.75 × 0.25 = 0.1875 b The event ‘owns at least one of these items’ is represented by T ∪ S. Thus: Pr(T ∪ S) = Pr(T) + Pr(S) − Pr(T ∩ S) = 0.75 + 0.25 − 0.75 × 0.25 = 0.8125 (from the addition rule) (T and S are independent) Confusion often arises between independent and mutually exclusive events. That two events A and B are mutually exclusive means that A ∩ B = Ø and hence that Pr(A ∩ B) = 0. Thus, if two events are independent, they cannot also be mutually exclusive, unless one or other (or both) are empty. SA Exercise 11B Example 7 1 An experiment consists of drawing a number at random from {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}. Let A = {1, 2, 3, 4, 5, 6}, B = {1, 3, 5, 7, 9, 11} and C = {4, 6, 8, 9}. a Are A and B independent? c Are B and C independent? b Are A and C independent? 2 If A and B are independent events with Pr(A) = 0.5 and Pr(B) = 0.2 find Pr(A ∪ B). 3 A die is thrown and the number uppermost is recorded. A and B are events defined by an even number and a square number respectively. Show that A and B are independent. 4 Two events A and B are such that Pr(A) = 0.3, Pr(B) = 0.1, and Pr(A ∩ B) = 0.1. Are A and B independent? 5 A and B are independent events, and Pr(A) = 0.6, Pr(B) = 0.7. Find: a Pr(A|B) b Pr(A ∩ B) c Pr(A ∪ B) Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 327 Example 8 6 A man and a woman decide to marry. Assume that the probability that each will have a specific blood group is as follows: Blood group O A B AB Probability 0.5 0.35 0.1 0.05 E If the blood group of the husband is independent of that of his wife, find the probability that: a the husband is group A c both are group A b the husband is group A and his wife is group B d the wife is group AB and her husband is group O M PL 7 The 165 subjects volunteering for a medical study are classified by sex and blood pressure (high (H), normal (N) and low (L)). H N L M 88 22 10 F 11 22 12 If a subject is selected at random, find: a Pr(N ) b Pr(F ∩ H ) c Pr(F ∪ H ) d Pr(F|L ) e Pr(L|F ) Are F and L independent? Explain. 8 Events A and B are as shown in the Venn diagram. Show that A and B are independent. B A 15 5 4 12 SA 9 The probability that a married woman watches a certain television show is 0.4, and the probability that her husband watches the show is 0.5. The television viewing habits of a husband and wife are clearly not independent. In fact, the probability that a married woman watches the show, given that her husband does, is 0.7. Find the probability that: a both the husband and wife watch the show b the husband watches the show given that his wife watches it. 10 The 65 middle managers in a company are classified by age (in years) and income as follows: Age Income 30−39 (T) 40−49 (F) 50−69 (S) Low (L) 13 4 1 Moderate (M) 8 10 3 High (H) 2 16 8 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 328 Essential Mathematical Methods 1 & 2 CAS A middle manager is selected at random from the company. Find: a Pr(L ) b Pr(S ) c Pr(T ) e Pr(L ∩ F ) f Pr(T ∩ M ) g Pr(L|F ) Is income independent of age? Explain your answer. d Pr(M ) h Pr(T|M ) 11 A consumer research organisation has studied the services provided by the 150 TV repair persons in a certain city and their findings are summarised in the following table: Good service (G ) Poor service (G ) 48 Not factory trained (F ) 24 16 62 M PL Factory trained (F ) E P1: FXS/ABE One of the TV repairers is randomly selected. a Calculate the following probabilities: i Pr(G|F ), the probability that a factory trained repairer is one who gives good service ii Pr(G ∩ F ), the probability that this person is factory trained and is giving good service iii Pr(G ∪ F ), the probability that the repairer is giving good service or is factory trained or both b Are events G and F independent? c Are the events G and F mutually exclusive? 12 A fair coin is to be tossed three times. SA a Draw a tree diagram showing all the possible outcomes and their respective probabilities. b Find the probability that the tosses result in: i three heads ii two heads and a tail in any order iii at most two heads 13 A spinner is divided into three regions, 1, 2 and 3, such that Pr(1) = 0.2, Pr(2) = 0.3 and Pr(3) = 0.5. a Draw a tree diagram showing the outcomes and their associated probabilities after two spins. b Find the probability that: i both spins result in a 2 ii the same number shows both times iii the sum of the numbers showing is 4 iv the second number is larger than the first 14 Three dice are rolled. Find the probability that: a a four is showing on each die c at least two dice show an even number b an even number is showing on each die d all dice show the same number Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 329 15 A coin is tossed five times. Find the probability that: a b c d a head results from each toss the first three tosses are heads and the last two tails the result of the third toss is the same as the result of the second toss no two consecutive tosses have the same result the first number is a 6 the first number is a 6 and the second a 5 the first number is one more than the second number the first number is not 5 the second number is 5 M PL a b c d e E 16 A bag contains six balls numbered 1, 2, 3, 4, 5, 6. A ball is chosen at random and its number recorded. A second ball is then chosen from the remaining five balls and its number recorded. Find the probability that: 17 A three-digit random number is chosen from the numbers 000 to 999. Find the probability that: a the first digit is odd b all three digits are odd c the random number is odd 11.3 Displaying conditional probabilities with matrices SA As you are aware, a matrix is a rectangular array of numbers. Matrices can be used to display conditional probabilities. Consider, for example, the scenario from Example 6, in which in a certain town the probability that it rains on any Monday is 0.21. If it rains on Monday, then the probability that it rains on Tuesday is 0.83. If it does not rain on Monday, then the probability it rains on Tuesday is 0.30. Let : A = the event that it rains on Monday B = the event that it rains on Tuesday then: Pr(B|A) = Pr(rains on Tuesday|rains on Monday) = 0.83 Pr(B |A) = Pr(fine on Tuesday|rains on Monday) = 1 − Pr(B|A) = 0.17 Pr(B|A ) = Pr(rains on Tuesday|fine on Monday) = 0.30 Pr(B |A ) = Pr(fine on Tuesday|fine on Monday) = 1 − Pr(B|A ) = 0.70 These conditional probabilities can be arranged in a matrix as follows: A A B 0.83 0.30 Pr(B|A) Pr(B|A ) = B 0.17 0.70 Pr(B |A) Pr(B |A ) Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 330 Essential Mathematical Methods 1 & 2 CAS Here, the row indicates the event for which the probability is given, and the column indicates the event that is being assumed. The numbers in each column add up to 1, because they indicate the only possible outcomes that can occur. This matrix of conditional probabilities is often called a transition matrix, denoted by T. The law of total probability is used to find Pr(B) and Pr(B ). Writing the law in terms of this problem gives: Pr(B) = Pr(B|A)Pr(A) + Pr(B|A )Pr(A ) and E P1: FXS/ABE Pr(B ) = Pr(B |A)Pr(A) + Pr(B |A )Pr(A ) M PL These equations can be written as the product of two matrices: Pr(B) Pr(B|A) Pr(B|A ) Pr(A) = Pr(B ) Pr(A ) Pr(B |A) Pr(B |A ) The probability of Monday being wet has been given as 0.21, so Pr(B) 0.83 0.30 0.21 0.4113 = = Pr(B ) 0.17 0.70 0.79 0.5887 Note that these answers are consistent with those found in Example 6. Using the TI-Nspire SA The matrix multiplication can be undertaken as shown. Using the Casio ClassPad The matrix multiplication can by undertaken on the CAS calculator. Note: Matrices are entered using the Keyboard—2D—Calc screen. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 331 Example 10 Suppose that a netball team has a probability of 0.8 of winning its next game if the team won its last game, and a probability of only 0.5 of winning if it lost its last game. If the probability of the team winning the first game of the season is 0.5, then what is the probability that the team wins the second game? Solution M PL A = the event that the team wins game 1 B = the event that the team wins game 2 then: Pr(B|A) = 0.8 Pr(B |A) = 0.2 Pr(B |A ) = 0.5 and Pr(B|A ) = 0.5 In addition Pr(A) = Pr(A ) = 0.5 E P1: FXS/ABE Pr(B) Now Pr(B ) Pr(B|A ) Pr(B |A ) Pr(B|A) = Pr(B |A) Pr(B) Substituting gives Pr(B ) 0.8 = 0.2 0.5 0.5 Pr(A) Pr(A ) 0.5 0.5 = 0.65 0.35 So the probability that the team wins the second game is 0.65, and the probability that they lose is 0.35. SA What might be the outcome of the netball team’s next game? If C is the event that the team wins game 3, then: Pr(C) Pr(C|B) Pr(C|B ) Pr(B) = Pr(C ) Pr(B ) Pr(C |B) Pr(C |B ) Pr(C|B) Pr(C|B ) The matrix is numerically the same as the matrix Pr(C |B) Pr(C |B ) Pr(B|A) Pr(B|A ) in that it describes in general the probabilities of each outcome given Pr(B |A) Pr(B |A ) the outcome of the preceding event, which are constant. Thus: 0.8 0.5 Pr(B) 0.8 0.5 0.8 0.5 Pr(A) Pr(C) = = 0.2 0.5 Pr(B ) 0.2 0.5 0.2 0.5 Pr(A ) Pr(C ) 0.8 = 0.2 0.5 0.5 2 Pr(A) Pr(A ) This process can be continued so that the probability of winning games further ahead can be determined by continuing to multiply by the matrix of probabilities. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 332 Essential Mathematical Methods 1 & 2 CAS Example 11 If the probability of the netball team from Example 10 winning the first game of the season is 0.5, then what is the probability that they win the fourth game? Solution A = the event that the team wins game 1 D = the event that the team wins game 4 Pr(D) Pr(D ) 0.8 = 0.2 0.5 0.5 3 Pr(A) Pr(A ) E P1: FXS/ABE 0.722 = 0.278 0.695 0.305 0.5 0.5 = 0.7085 0.2915 M PL Thus the probability that the team wins game 4 is 0.7085. Exercise 11C 1 In a certain country the probability of a child being female is 0.6 if the preceding child is female, and 0.45 if the preceding child is male. If Fi is the event that the ith child is female, and Mi is the event that the ith child is male, then this can be written in the form: Pr(Fi ) Pr(Fi+1 ) =T× Pr(Mi+1 ) Pr(Mi ) where T is a 2 × 2 matrix. SA a Write down the matrix T. b If the probability of a first child being female is 0.5, find the probability that the second child will be female. 2 Suppose a netball player has a probability of 0.5 of scoring a goal (G) on her first attempt, and that this player is more likely to score a goal on a subsequent attempt if she scored a goal on the previous attempt, and more likely to miss a goal (M) on a subsequent attempt if she missed the goal on the previous attempt. The probabilities associated with her goaling are as follows: 3 1 Pr(G i+1 |Mi ) = Pr(G i+1 |G i ) = 5 3 2 2 Pr(Mi+1 |Mi ) = Pr(Mi+1 |G i ) = 5 3 a Write down the matrix T that summarises these probabilities. b Find the probability that she will score a goal on the second attempt. 3 Suppose that the probability of snow on any day is conditional on whether or not it snowed on the preceding day. The probability that it will snow on Saturday, given that it snowed on Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 333 Friday, is 0.43, and the probability that it will snow on Saturday, given that it did not snow on Friday, is 0.33. a Write down the matrix T that summarises these probabilities. b If the probability that it will snow Friday is 0.55, what is the probability that it will snow on Saturday? E 4 Suppose that the probability of a squash player winning a game is 0.6 if he has won the preceding game and 0.5 if he has lost the preceding game. Let Wi is the event that he wins the ith game, and Li the event he loses the ith game: a Write down a matrix equation relating Pr(Wi+1 ) and Pr(L i+1 ) to Pr(Wi ) and Pr(L i ). b If the probability of this player winning the first game is 0.52, find the probability that he wins the second game. M PL 5 Suppose that the probability that Daisy is late to work is 0.25 if she was late the day before, and the probability of being on time for work is 0.9 if she was on time the day before. Let Li be the event that she is late on the ith day, and Ti the event she is on time on the ith day. a Write down a matrix equation relating Pr(L i+1 ) and Pr(Ti+1 ) to Pr(L i ) and Pr(Ti ). b If the probability of Daisy being late on Monday is 0.4, find the probability that she is on time on Tuesday. 6 Suppose that the outcome of a cricket match between Australia and England is such that: Pr(A1 ) = 0.6 Pr(Ai+1 |Ai ) = 0.7 Pr(Ai+1 |E i ) = 0.5 Pr(E 1 ) = 0.4 Pr(E i+1 |Ai ) = 0.3 Pr(E i+1 |E i ) = 0.5 where A represents the event that Australia wins, and E represents the event that England wins. Write down a matrix equation that relates Pr(Ai+1 ) and Pr(E i+1 ) to Pr(A1 ) and Pr(E 1 ), and use it to determine the probability that Australia wins: SA a the second game b the third game c the fifth game 7 Suppose that the probability of rain (R) if it has rained the day before is 0.49. If it was fine (F) the previous day then the probability of rain is 0.13. Suppose further that the probability of rain on Monday one week is 0.3. Write down a matrix equation that relates Pr(Ri+1 ) and Pr(Fi+1 ) to Pr(R1 ) and Pr(F1 ), and use it to determine the probability that: a Tuesday is fine b Saturday will be fine c it rains on Sunday 8 Consider a basketball team that has the following probabilities of winning (W) or losing (L): 3 1 3 Pr(Wi+1 |Wi ) = Pr(Wi+1 |L i ) = Pr(W1 ) = 7 2 8 4 1 5 Pr(L 1 ) = Pr(L i+1 |Wi ) = Pr(L i+1 |L i ) = 7 2 8 What is the probability that the team will win the fifth game of the season? Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 334 11.4 Essential Mathematical Methods 1 & 2 CAS Transition matrices and Markov chains E There are many situations in which the probability of an individual outcome is dependent only on the outcome of the trial immediately preceding it. This makes sense in certain situations. For example, it seems logical that the probability that it would rain today would depend on whether or not it rained yesterday. Sequences of repetitions such as these where it is assumed that: the probability of each possible outcome is conditional only on the immediately preceding outcome, and the conditional probabilities for each possible outcome are the same on each occasion (that is the same matrix is used for each transition) are called Markov chains, named after a Russian mathematician. M PL In general, a Markov chain is defined by: a transition matrix, T, which for a situation that has m outcomes or states is a square matrix of dimension m × m. The elements of the transition matrix are conditional probabilities. an initial state vector, S0 , which has dimension m × 1, and gives information about the Markov chain at the beginning of the sequence, or step 0. The elements of the initial state vector may be numbers, percentages or the results of an individual trial. Information about the Markov chain at step n is given in the state matrix Sn , which can be determined from the transition matrix, T, and the initial state vector S0 . Since S 1 = T × S0 and S2 = T × S1 = T × (T × S0 ) = (T × T) × S0 = T2 × S0 and S3 = T × S2 = T × (T × S1 ) = T × (T × (T × S0 )) = (T × T × T) × S0 = T3 × S0 SA and so on, it follows that: Sn = T × Sn−1 = Tn × S0 This gives the general result, for a Markov chain, where: S0 is an m × 1 column vector that describes the states at step 0 T is a corresponding m × m transition matrix Sn is an m × 1 column vector giving information about the states at step n of the Markov chain then Sn = T × Sn−1 = Tn × S0 The information in the state matrix Sn may be numbers, percentages, or probabilities. For a two state Markov chain: Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 335 If S0 = then estimate of the number in State 1 at step n Sn = estimate of the number in State 2 at step n percentage in State 1 at step 0 If S0 = then percentage in State 2 at step 0 estimate of the percentage in State 1 at step n Sn = estimate of the percentage in State 2 at step n 1 0 If S0 = which means that a ‘success’: has been observed at step 0, or , which 0 1 meansthat a ‘failure’ has been observed at step 0, then probability of observing a success at step n Sn = probability of observing a failure at step n An example in which the initial state information is in percentages is given in Example 12. M PL E number in State 1 at step 0 number in State 2 at step 0 Example 12 Suppose that there are only two choices of supermarket in a country town, and records show that 73% of the time consumers will continue to purchase their groceries from store A if they purchased their groceries from store A in the previous month, while 65% of the time consumers will continue to purchase their groceries from store B if they purchased their groceries from store B in the previous month. Suppose that in the previous month 56% of customers chose store A and 44% chose store B. a Find the transition matrix that can be used to represent this information. b Find the predicted percentages of customers choosing each store in month 3. SA Solution a Using the convention of the previous section, in which the row indicates the event for which the probability is given and the column indicates the probability of the event that is being assumed, then this information can be represented by the following transition matrix: A|A A|B 0.73 0.35 T= = B|A B|B 0.27 0.65 b To find the percentages associated with month 3, calculate S3 = T3 × S0 . 56 From the information given, S0 = . 44 0.73 S3 = 0.27 3 0.35 56 0.5884 × = 0.65 44 0.4116 0.5335 56 56.4 × = 0.4665 44 43.6 Thus the prediction is that in month 3, 56.4% of customers will choose store A and 43.6% of the customers will choose store B. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 336 Essential Mathematical Methods 1 & 2 CAS Sometimes the initial step of the Markov chain, S0 , will not be a percentage as in Example 12, but rather the outcome of a single event, as illustrated in the following example. Example 13 Suppose that the probability that a train is late, given that it is late the previous day, is 0.1, while the probability that it is on time, if it is on time the previous day, is 0.95. a Find the transition matrix that can be used to represent this information. b What is the probability it will be late on day 4: i if the train is on time on day 0? ii if the train is late on day 0? E P1: FXS/ABE Solution M PL a This information can be represented by the transition matrix: 0.1 0.05 T= 0.9 0.95 4 b To find the probabilities associated with day 4, calculate S4 = T × S0 0 i If the train was on time, then S0 = . 1 0.1 S4 = 0.9 0.05 0.95 4 0 0.0526 × = 1 0.9474 0.0526 0 0.0526 × = 0.9474 1 0.9474 Thus the probability of the train being late on day 4 is Pr(late) = 0.0526 and the probability of the train being on time on day 4 is Pr(on time) = 0.9474 SA 1 . ii If the train was late, then S0 = 0 0.1 S4 = 0.9 0.05 0.95 4 1 0.0526 × = 0 0.9474 0.0526 1 0.0526 × = 0.9474 0 0.9474 Thus the probability of the train being late on day 4 is: Pr(late) = 0.0526 and the probability of the train being on time on day 4 is Pr(on time) = 0.9474 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 337 Interestingly, the probabilities determined in Example 13 are identical, to the accuracy to which they are expressed (4 decimal places). This seems to indicate that, in this example, after a while the values in the transition matrix will settle down to constant values. This is called the steady state of the transition matrix, denoted Ts . As another example, consider the transition matrix from Example 13. It can readily be determined that: 0.1 0.05 T= 0.9 0.95 0.1 T2 = 0.9 3 0.055 = 0.945 0.0525 0.9475 M PL 2 0.05 0.95 E P1: FXS/ABE 0.1 T = 0.9 3 0.1 T4 = 0.9 0.1 T = 0.9 5 0.05 0.95 4 0.05 0.95 5 0.05 0.95 0.0528 = 0.9473 0.0526 = 0.9474 0.0526 = 0.9474 and so on. What about T10 or T20 ? 10 0.1 0.05 0.0526 = T10 = 0.9 0.95 0.9474 0.0526 0.9474 0.0526 0.9474 0.0526 0.9474 0.0526 0.9474 T20 0.1 = 0.9 0.05 0.95 20 0.0526 = 0.9474 0.0526 0.9474 SA It can be seen that by T4 the transition matrix has settled into a steady state (to 4 decimal places). Using the TI-Nspire A CAS calculator may be used to investigate the limiting values. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 338 Essential Mathematical Methods 1 & 2 CAS Using the Casio ClassPad A CAS calculator may be used to investigate the limiting values. E P1: FXS/ABE M PL Example 14 Find the steady state of the transition matrix in Example 12. Solution 0.73 0.27 0.35 0.65 0.73 T5 = 0.27 0.35 0.65 T= Try T5 . 5 0.5680 = 0.4320 0.5600 0.4400 Try T10 . T10 0.73 = 0.27 0.35 0.65 10 0.5645 = 0.4355 0.5645 0.4355 SA Try T20 . 20 T 0.73 = 0.27 0.35 0.65 20 0.5645 = 0.4355 0.5645 0.4355 The probabilities are no longer changing, so the steady state, correct to four decimal places, of the transition matrix is: 0.5645 0.5645 Ts = 0.4355 0.4355 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 339 Exercise 11D 0.8 0.5 40 1 Let the transition matrix T = and the initial state matrix S0 = . 0.2 0.5 60 E a Use the relationship Sn = TSn−1 to determine: ii S2 iii S3 i S1 b Determine the value of T5 . c Use the relationship Sn = Tn S0 to determine: ii S3 iii S7 i S2 0.85 0.25 150 2 Let the transition matrix T = and the initial state matrix S0 = . 0.15 0.75 240 SA M PL a Use the relationship Sn = TSn−1 to determine: ii S2 iii S3 i S1 b Determine the value of T6 . (Entries to 4 decimal places.) c Use the relationship Sn = Tn S0 to determine: ii S3 iii S5 i S2 0.56 0.39 3 A Markov chain has the transition matrix T = . 0.44 0.61 0 find: a If the initial state matrix S0 = 1 i S1 ii S2 iii S5 (ii and iii entries correct to 4 decimal places.) 1 b If the initial state matrix S0 = find: 0 i S1 ii S2 iii S5 3 1 4 A Markov chain has the transition matrix T = 7 8 . 4 7 7 8 0 find: a If the initial state matrix S0 = 1 i S1 ii S2 iii S7 (ii and iii entries correct to 4 decimal places.) 1 b If the initial state matrix S0 = find: 0 i S1 ii S2 iii S7 (ii and iii entries correct to 4 decimal places.) 5 There are two swimming pools in a resort complex, one indoor and one outdoor. Most people tend to go back to the same pool each day, but there is a probability of 0.13 that a person who goes to the indoor pool one day will go to the outdoor pool the next, and a probability of 0.23 that a person who goes to the outdoor pool on one day goes to the indoor pool on the next day. Suppose that on one Monday 62% of people are at the indoor pool and 38% of people are at the outdoor pool. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> 340 Essential Mathematical Methods 1 & 2 CAS a Determine the transition matrix T that can be used to represent this information. b Find the estimated percentage of people at each pool on Wednesday (give your answers to 1 decimal place). 6 A factory has a large number of machines which can be in one of two states, operating or broken down. The probability that an operating machine breaks down by the end of the day is 0.04, and the probability that a machine that has broken down is repaired by the end of the day is 0.98. M PL E a Find the transition matrix that can be used to represent this information. b Find the percentage of machines which are operating at the end of day 3, if initially, day 0, 8% of machines are broken down. Give your answer correct to the nearest per cent. 30 0.8 0.5 calculate 7 For the transition matrix T = and an initial state matrix S0 = 70 0.2 0.5 Sn = Tn S0 for n = 10, 15, 20 and 25 to find the steady state solution. 180 0.85 0.25 8 For the transition matrix T = and an initial state matrix S0 = 200 0.15 0.75 n calculate Sn = T S0 for n = 10, 15, 20 and 25 to find the steady state solution. 9 A large company has 1640 employees, 60% of whom currently work fulltime and 40% of whom currently work part-time. Every year 20% of fulltime workers move to part-time work, and 14% of part-time workers move to fulltime work. a Determine the transition matrix T that can be used to represent this information. b Find the estimated number of people working fulltime in the long term, assuming that the total number of employees remains constant. SA 10 Suppose that there are two primary schools in a region. Experience has shown that 7% of students will move from school A to school B at the end of each year, while 11% of students will move from school B to school A. Suppose that initially 30% of students attend school A and 70% attend school B. a Determine the transition matrix which can be used to represent this information. b Find the percentage of students attending each school at the end of 3 years. c Determine the percentage of students attending each school in the long term. 11 Suppose that the probability that Melbourne will beat Brisbane in AFL football is 0.5 if Melbourne won the previous year, and 0.37 if Brisbane won the previous year. a Find the transition matrix that can be used to represent this information. b What is the probability, correct to 4 decimal places, that Melbourne will win in year 3: i if Melbourne won in year 0? ii if Melbourne lost in year 0? c What is the steady state probability that Melbourne will win? Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 341 12 A tennis player can serve to the forehand or to the backhand of his opponent. If he serves to the forehand, there is a 75% chance that his next serve will be to the backhand. If he serves to the backhand there is a 65% chance that his next serve will be to the forehand. E a Find the transition matrix that can be used to represent this information. b What is the probability that the tennis player will serve the third serve to the backhand of his opponent: i if the first serve was to the forehand? ii if the first serve was to the backhand? c What is the steady state probability that the player will serve to the forehand of his opponent? M PL 13 Suppose that there are two doctors in a country town, Dr Black and Dr White. Each year, 13% of patients move from Dr Black to Dr White, while 19% of patients move from Dr White to Dr Black. Suppose that initially 33% of patients go to Dr Black and 67% go to Dr White. Find the percentage of patients who will eventually be attending each doctor if this pattern continues indefinitely. 14 There are only two choices of garage in a country town. It has been found that 74% of customers will continue to purchase their petrol from garage A if they purchased their petrol from garage A in the previous week, while 86% of customers will continue to purchase their petrol from garage B if they purchased their petrol from garage B in the previous week. Suppose that in the previous week (week 0) garage A recorded 563 customers and garage B recorded 926 customers. Assume that the total number of customers remains the same. SA a Find the transition matrix that can be used to represent this information. b Determine the number of customers at each garage in week 3, to the nearest whole number. c Find the number of customers purchasing from each garage in the long term, to the nearest whole number. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Essential Mathematical Methods 1 & 2 CAS Chapter summary Pr(A|B) describes the conditional probability of event A occurring given that event B has already occurred: Pr(A|B) = Pr(A ∩ B) Pr(B) M PL Pr(A|B) = Pr(A) E or Pr(A ∩ B) = Pr(A|B) × Pr(B) (the multiplication rule) The probabilities associated with multi-stage experiments can be calculated by constructing an appropriate tree diagram and multiplying along the relevant branches (from the multiplication rule). Two events are independent if so whether or not B has occurred has no effect on the probability of A occurring. Pr(A ∩ B) = Pr(A) × Pr(B) if and only if A and B are independent. Matrices can be used to represent conditional probabilities, and multiplication of matrices can be used to evaluate problems associated with the law of total probability. A Markov chain describes a situation of repetitions of an experiment in which: the probability of each possible outcome is conditional only on the result of each immediately preceding outcome, and the conditional probabilities for each possible outcome are the same on each occasion. The state of the system at the beginning of the Markov chain is called the initial state, usually denoted S0 , and for an m state Markov chain is a column matrix of dimension m × 1. A transition matrix T is a matrix giving the probability for each of the possible outcomes at each step of a Markov chain conditional on each of the possible outcomes at the previous step. For an m state Markov chain T is a square matrix of dimension m × m. The transition matrix T enables each step of a Markov chain to be predicted from the previous step, according to the rules: SA Review 342 and S n + 1 = T × Sn Sn = Tn × S0 Eventually all two-state Markov chains will converge to a state where the probabilities are no longer dependent on the initial state. These constant probabilities are called the steady state probabilities of the Markov chain. Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 343 4 8 3 , then Pr(A|B) 1 If for two events A and B, Pr(A) = , and Pr(B) = , and Pr(A ∩ B) = 8 7 21 is equal to 2 21 63 3 3 E D C B A 3 32 64 14 8 M PL E The following information relates to questions 2 and 3. The probability that Brett goes to the gym on Monday is 0.6. If he goes to the gym on Monday then the probability that he will go again on Tuesday is 0.7. If he doesn’t go to the gym on Monday then the probability that Brett will go on Tuesday is only 0.4. 2 The probability that Brett goes to the gym on both Monday and Tuesday is A 0.36 B 0.24 C 0.42 D 0.16 E 0.28 3 The probability that Brett goes to the gym on Tuesday is A 0.58 B 0.42 C 0.16 D 0.84 E 0.32 4 If A and B are independent events such that Pr(A) = 0.35 and Pr(B) = 0.46, then Pr(A ∪ B) is equal to A 0.810 B 0.649 C 0.161 D 0.110 E cannot be determined 5 Consider the following matrices. 0.7 0.43 −1 0 U= V= W= 0.3 1 1 0.57 1 0 2 0.5 0.1 X = 3 2 0 Y = 0.5 0.2 1 1 2 The matrix that could be a transition matrix for a Markov chain is A U B V C W D X E Y SA The following information is needed for questions 6 to 8. 0.6 A Markov chain is defined by a transition matrix T = 0.4 60 . S0 = 40 6 For this Markov chain, S1 is equal to 60 3600 160 A B C 40 1600 140 7 For this chain, Markov S2 isclosest to 60 3600 160 A B C 40 1600 140 D D 0.2 0.4 0.8 and an initial state matrix 0.2 68 32 68 32 E 8 For this Markov chain, the steady state solution is closest to 66.4 66.5 66.6 66.7 A B C D 33.6 33.5 33.4 33.3 E E 66.4 33.6 66.4 33.6 66.8 33.2 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard Review Multiple-choice questions P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Essential Mathematical Methods 1 & 2 CAS E The following information is needed for questions 9 and 10. A factory has a large number of machines which can be in one of two states, operating or broken down. The probability that an operating machine breaks down by the end of the day is 0.05 and the probability that a broken machine is repaired by the end of the day is 0.80. 9 A transition matrix T that can be used to represent this information is 0.95 0.20 0.05 0.20 0.05 A B C 0.05 0.80 0.95 0.80 0.80 0.9125 0.3500 0.95 0.80 D E 0.0875 0.6500 0.05 0.20 M PL 10 If a machine is operating at the beginning of day 1, then the probability that it has broken down by the end of day 5 can be found by evaluating 1 0 1 0 B T6 × C T5 × D × T5 E T5 × 0 1 A T5 × 1 1 0 1 Short-answer questions (technology-free) 2 1 3 , Pr(A|B) = and Pr(A|B ) = , determine: 3 3 7 a Pr(A ∩ B ) b Pr(A) c Pr(B |A) 1 Given Pr(B) = 2 Of the patients reporting to a clinic with the symptoms of sore throat and fever, 25% have a sore throat, 50% have an allergy and 10% have both. a What is the probability that a patient selected at random has either a sore throat or an allergy, or both? b Are the events ‘sore throat’ and ‘allergy’ independent? 3 The primary cooling unit in a nuclear power plant has a reliability of 0.999. There is also a back-up cooling unit to substitute for the primary unit when it fails. The reliability of the back-up unit is 0.890. Find the reliability of the cooling system of the power plant. Assume independence. SA Review 344 4 A group of executives is classified according to body weight and incidence of hypertension. The proportion of the various categories is as shown. Overweight Normal weight Underweight Hypertensive 0.1 0.08 0.02 Not hypertensive 0.15 0.45 0.20 a What is the probability that a person selected at random from this group will have hypertension? b A person, selected at random from this group, is found to be overweight. What is the probability that this person is also hypertensive? Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Chapter 11 — Conditional probability and Markov chains 345 7 Suppose that the probability of snow is dependent on whether or not it has snowed on the previous day. The probability of snow is 0.64 if it has snowed the day before and 0.22 if it has not snowed on the previous day. If it snows on Wednesday, what is the probability that it will snow on the following Friday? M PL Extended-response questions 1 Two bowls each contain eight pieces of fruit. In bowl A there are five oranges and three apples; in bowl B there is one orange and seven apples. a For each bowl, find the probability that two pieces of fruit chosen at random will both be apples, if the first piece of fruit is not replaced before the second piece of fruit is chosen. b For each bowl, find the probability that two pieces of fruit chosen at random will both be apples, when the first piece of fruit is replaced before the second is chosen. c One bowl is chosen at random and from it two pieces of fruit are chosen at random without replacement. If both pieces of fruit are apples, find the probability that bowl A was chosen. d One bowl is chosen at random, and from it two pieces of fruit are chosen at random, the first piece of fruit being replaced before the second is chosen. If both pieces of fruit are apples, find the probability that bowl A was chosen. SA 2 Explain, in terms of the relation between the events A and B, the implication of each of the following: a Pr(A|B) = 1 b Pr(A|B) = 0 c Pr(A|B) = Pr(A). 3 Three students, Dudley, Ted and Michael, have equal claim for an award. They decide to determine the winner by each tossing a coin, and the person whose coin falls unlike the other two will be the winner. If all the coins fall alike they will toss again. a Determine the probability that Dudley wins on the first toss. b Given that there is a winner on the first toss, what is the probability that it is Dudley? c What is the probability that the winner is not decided: i on the first two tosses? ii on the first n tosses? d Given that no winner is decided in the first n tosses, what is the probability that Dudley wins on the next toss? Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard Review 5 Given an experiment such that Pr(A) = 0.3, Pr(B) = 0.6, Pr(A ∩ B) = 0.2, find: c Pr(A|B) d Pr(B|A) a Pr(A ∪ B) b Pr(A ∩ B ) 1 0.9 0.2 , use the 6 For the transition matrix T = and an initial state matrix S0 = 0 0.1 0.8 relationship Sn = TSn−1 to determine: b S2 a S1 E P1: FXS/ABE P1: FXS/ABE P2: FXS 9780521740524c11.xml CUAU021-EVANS August 22, 2008 22:14 Back to Menu >>> Essential Mathematical Methods 1 & 2 CAS E 4 Suppose that a car rental firm has two branches, one in Melbourne and the other in Tullamarine. Cars are usually rented for a week and returned to the same place. However, the probability that a car rented in Melbourne will be returned to Tullamarine is known to be 0.1, and the probability that a car rented in Tullamarine is returned to Melbourne is 0.2. Initially the company places 100 cars in Melbourne and 100 in Tullamarine. a Determine the transition matrix T that can be used to represent this information. b Determine the estimated number of cars in each location at the end of week 3. c Find the estimated number of cars in each location in the long term. M PL 5 Suppose that the probability that a tram is late, given that it was late the previous day is 0.25, while the probability that it is on time if it was on time the previous day is 0.80. a Find the transition matrix that can be used to represent this information. b What is the probability that the tram will be late on day 4: i if it was on time on day 0? ii if it was late on day 0? c What is the steady state probability that the tram will be late? SA Review 346 Cambridge University Press • Uncorrected Sample Pages • 2008 © Evans, Lipson, Wallace TI-Nspire & Casio ClassPad material prepared in collaboration with Jan Honnens & David Hibbard