This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: STAT 471 Assignment 1 solutions
1. A coin is tossed until a head appears twice in a row. What is the sample space for this experiment? If the coin is fair, what is the probability that it will be tossed exactly four times? Solution: The sample space consists of all of the following events: HH, T HH, T T HH, HT HH, · · · , that is, the string HH and all strings of length three or more that end with T HH . The probability that the coin will be tossed exactly four times is the total probability of such strings of length four: P (T T HH ) + P (HT HH ) = 1 1 1 + =. 16 16 8 2. How many possible postal codes are there for Alberta? (Six characters long, starts with “T”, and alternates between letters and digits. Also the letters D, F, I, O, Q and U are never used.) Solution: 400, 000. The number of possible Alberta postal codes is 1 × 10 × 20 × 10 × 20 × 10 = 3. Suppose you play a series of four games, where in each game you are equally likely to win or lose one dollar. Find the probability that, at the end of the four games, you have (a) more money than you started with. (b) the same amount of money as you started with. (c) less money than you started with. Solution: There are 16 sample points, they are listed below along with the proﬁt earned in each case. WWWW WWLW WWWL WLWW 4 LWWW 2 WLWL 2 WWLL 2 LWLW 2 LWWL 0 0 LLWW 0 0 WLLW 0 0 WLLL −2 LLLW LWLL LLWL LLLL −2 −2 −2 −4 In 5 of the cases you make money, in 5 of the cases you lose money, and in the remaining 6 cases you break even. So the associated probabilities are P (more money) = 5/16, P (less money) = 5/16, P (the same amount of money) = 6/16. 4. In Lotto 649, six numbers are randomly chosen from the set f1, 2, . . . , 49g. How likely is it that all six numbers are even? Solution: Since there are 24 even numbers in the set f1, 2, . . . , 48, 49g, the number of possible Lotto 649 draws that consist only of even numbers is 264 . Since there are a total of 469 possible Lotto 649 draws, the required probability is the ratio P (Lotto 649 draw with only even numbers) = 24 49 / 6 6 = 0.009625126. 5. A certain random number generator produces random digits from 0 to 9, each of these being equally likely to occur. (a) What is the probability that 10 calls to this generator produces all 10 diﬀerent digits? (b) What is the probability that 10 calls to this generator produces exactly 5 diﬀerent digits? Hint: How many strings are there with exactly 1 type of digit? How many strings are there with exactly 2 diﬀerent digits? Work your way slowly up to 5 diﬀerent digits, and count carefully. Solution: The sample space consists of all strings of length ten of digits f0, 1, 2, 3, 4, 5, 6, 7, 8, 9g. There are 1010 such strings. (a) The number of strings with distinct digits is 10 × 9 × 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 10! = 3628800. So P ( 10 distinct digits in 10 trials ) = 3628800/10000000000 = 0.00036288. (b) We must ﬁnd the number of strings that contain precisely 5 distinct digits from f0, 1, 2, 3, 4, 5, 6, 7, 8, 9g. Instead of tackling this problem directly, let’s look at something a bit easier. How many strings have exactly 1 distinct digit? That’s easy: there is the string with all 1’s, the string with all 2’s, etc. All together, there are 10 such strings. How many strings contain exactly 2 distinct digits? First oﬀ, there are 120 diﬀerent pairs of distinct digits that might occur. For every ﬁxed pair of digits, for example 0 and 1, there are 210 strings involving only those two digits. But two of those strings have only 1 distinct digit, for example (0, 0, 0, 0, 0, 0, 0, 0, 0, 0) and (1, 1, 1, 1, 1, 1, 1, 1, 1, 1). So the number of strings made up from the pair f0, 1g and including at least one 0 and one 1 is: 210 − 2. Putting it together shows that the number of strings with exactly 2 distinct digits is: 120 × (210 − 2). How many strings contain exactly 3 distinct digits? First oﬀ, there are 130 diﬀerent sets of distinct digits that might occur. For every ﬁxed set of digits, for example 0, 1, and 2, there are 310 strings involving only those 3 digits. But some of those strings have less than the required number of distinct digits and must be subtracted out. The same reasoning as above shows that the number of strings (using only 0,1, and 2) with 1 distinct digit is 3; and with 2 distinct digits is 3 (210 − 2). So the number of strings made up from 2 the set f0, 1, 2g and including at least one 0, one 1, and one 2 is: 310 − 3 (210 − 2) − 3. 2 Putting it together shows that the number of strings with exactly 3 distinct digits is: 10 × 310 − 3 (210 − 2) − 3 . 3 2 Now that you understand the reasoning involved, you can continue to the case 4, 5, etc. For calculation purposes it’s not a bad idea to set up a recursive equation. For 1 ≤ k ≤ 10 we deﬁne: Nk = # strings of length 10 on k symbols that include all k symbols. The word argument above simply describes a recursion formula for Nk , that is, N1 = 1 and for k > 1, k k Nk = k10 − Nk−1 − Nk−2 − · · · − k. k−1 k−2 Then the number of strings with exactly k distinct digits is this number Nk times Running through the recursion gives N1 = 1, N2 = 1022, N3 = 55, 980, N4 = 818, 520, N5 = 5, 103, 000.
10 k . So, the number of strings with exactly 5 distinct digits is 150 × N5 = 252 × 5, 103, 000 = 1, 285, 956, 000. Dividing by the total number 1010 of possible strings gives us the required probability P ( exactly 5 distinct digits ) = .1285956. ...
View
Full Document
 Spring '09
 Various.
 Probability theory, Numerical digit, Randomness, Hardware random number generator, distinct digits

Click to edit the document details