probability

0 downloads 0 Views 186KB Size Report
Feb 5, 2018 - The 6/36 lottery is where there are 36 specific numbers and 6 num- bers will be ...... Mr Narayanan is a civil engineer with Kerala Government.
CHAPTER 2

PROBABILITY 2.1. Introduction In Chapter 1 we have introduced the basic notion of probability. In the present chapter we will explore more properties of probability, the idea of conditional probability, basic notions of independence of events, pair-wise independence, mutual independence, Beyes’ theorem etc. For the computations of probabilities in given situations we will need some ideas of permutations and combinations. Students may be familiar with these aspects but for the sake of those who are not familiar, or forgotten, a brief description is given here as Sections 2.2 and 2.3. In Section 2.4 a note on sigma and pi notations is given. Those who already know these materials may skip these sections and go directly to Section 2.5. 2.2. Permutations To permute means to rearrange and the number of permutations means the number of such rearrangements. We shall look into the problem of filling up some positions with some objects. For example, let there be r seats and n individuals to be seated on these r seats. In how many different ways can we select individuals from this set of n individuals to occupy these r seats. For example suppose that there are r = 2 seats and n = 5 individuals. The first seat can be given to one of the 5 individuals and hence there are five choices of filling up the first seat. When the first seat is already filled there are 4 individuals left and one seat is left. Hence the second seat can be filled with one of the four remaining individuals or in 4 different ways. For each of the five choices for the first seat there are four choices for the second seat. Hence the total number of choices for filling up these two seats is 5 × 4 = 20 ways. If A, B, C, D, E denote the five individuals and if the first seat is given to A then the sequences possible for the two seats are AB, AC, AD, AE. If B is given the first seat again there are four such choices, and so on. We can state this as the total number of permutations of five, taken two at a time, and it is 20. We can also state this as the total number of ordered sets of two from a set of five or the total number of sequences of 41

42

Probability and Statistics

two items taken from a set of five items. Thus, if there are n individuals and r seats to be filled then the total number of choices for filling up these r seats with n individuals is n(n − 1)(n − 2)...(n − (r − 1)). Notation 2.1. P (n, r) = n Pr = Total number of permutations of n, taken r at a time. Definition 2.1. Permutations. The total number of permutations of n objects, taken r at a time or the total number of ordered sets of r items from the set of n distinct items or the total number of sequences of r items from a set of n distinct items is given by

P (n, r) = n(n − 1)(n − 2)...(n − (r − 1)) = n(n − 1)...(n − r + 1).

(2.1)

For example, the total number of permutations of 5 items, taken 3 at a time is 5 × 4 × 3 = 60. The total number of permutations of 5, taken 5 at a time or all is 5 × 4 × 3 × 2 × 1 = 120.

P (1, 1) = 1, P (2, 1) = 2, P (n, 1) = n, P (10, 2) = (10)(9) = 90, P (4, 4) = (4)(3)(2)(1) = 24 = 4!, P (−3, 2) = no meaning, 1 P (2, ) = no meaning. 2 Notation 2.2. n! = factorial n or n factorial Definition 2.2. n! = (1)(2)...(n), 0! = 1( convention). That is,

2! = (1)(2) = 2, 3! = (1)(2)(3) = 6, 4! = (1)(2)(3)(4) = 24, 1 (−2)! = not defined , ( )! = not defined 2

Probability

43

and so on. We can also write the number of permutations in terms of factorials. n(n − 1)...(n − r + 1)(n − r)...(2)(1) (n − r)(n − r − 1)...(2)(1) by multiplying and dividing by (n − r)(n − r − 1)...(2)(1) n! = . (2.2) (n − r)! P (n, r) = n(n − 1)...(n − r + 1) =

If we want this formula, in terms of factorials, to hold for all n then let us see what happens if we compute P (n, n). Writing in terms of factorials, by substituting r = n on the right side of the above equation (2.2), we have

P (n, n) =

n! . 0!

But, from the original definition P (n, n) = n(n − 1)...(2)(1) = n! Hence we need the convention 0! = 1 if we want to use the representation of P (n, r) in terms of factorials for all r and n. [Mathematical conventions are convenient assumptions which will not contradict or interfere with any of the mathematical derivations or computations. Also note that all computations can be carried out without this convention also. If we do not want to use the convention then at equation (2.2) write r = 1, ..., n − 1 and P (n, n) = n!]. As a simple example we can consider words in a text. Words are ordered set or ordered sequence of alphabets. If the alphabets are rearranged or permuted then we obtain different words. House numbers in a city, postal codes in addresses etc are all ordered set of numbers, and if the numbers are permuted we get other house numbers, other postal codes etc. Example 2.1. How many different 3-letter words can be made by using all the alphabets in the word (1): “can”; (2): how many different 4-letter words can be made by using all the alphabets of the word “good”; (3): how many 11-letter words can be made by using all the alphabets in the word “Mississippi”? Solution 2.1. (1): The different words are the following:

44

Probability and Statistics

can, cna, anc, acn, nac, nca. There are 6 = 3! such words. In (2) we have the letter o repeated 2 times. If the o’s were different such as o1 , o2 then the total number of words possible is 4! = 24. But o1 o2 or o2 o1 will give the same oo. Note that o1 , o2 can be permuted in 2! ways and all these permutations will produce the same word. Hence the total number of distinct words possible is 4! = 12. 2! In (3) the letter “s” is repeated four times, “i” is repeated 4 times and “p” is repeated 2 times. Hence the total number of distinct words possible is 11! = 34650. 4!4!2! Example 2.2. How many different number plates can be made containing only 3 digits if (1) repetition of numbers is allowed, (2) no repetition is allowed. Solution 2.2. A number plate with 3 digits means filling up 3 positions with one of the numbers 0, 1, ..., 9. The first position can be filled in 10 different ways with one of the 10 numbers 0, 1, ..., 9. When repetition is allowed the second and third positions can also be filled in 10 different ways. Thus the total number of number plates possible is 10 × 10 × 10 = 103 = 1000 when repetition is allowed. When repetition is not allowed then the first position can be filled in 10 ways, the second only in 9 ways and the third position in only 8 ways. Thus the total number of number plates possible is 10 × 9 × 8 = 720 when repetition is not allowed. We can also write the number of permutations by using Pochhammer symbol which is widely used in mathematical analysis Notation 2.3. (α)k : Pochhammer symbol, where α is the Greek letter alpha. Definition 2.3.

Probability

(α)k = α(α + 1)(α + 2)...(α + k − 1), α 6= 0, (α)0 = 1.

45

(2.3)

For example,

(1)n = (1)(2)...(1 + n − 1) = n!; (2)3 = (2)(3)(4) = 24; 1 1 1 3 3 1 (−2)3 = (−2)(−2 + 1)(−2 + 2) = 0; ( )2 = ( )( + 1) = ( )( ) = ; 2 2 2 2 2 4 (0)2 = not defined; (3)0 = 1; (5)−2 = not defined. Note that the various factors in the Pochhammer symbol are in ascending orders in the form a(a + 1)(a + 2).... Suppose we have factors in descending order such as b(b − 1)(b − 2)... then can we write this also in Pochhammer symbol? The answer is in the affirmative. Consider the following:

b(b − 1)...(b − k + 1) = (−1)k (−b)(−b + 1)...(−b + k − 1) = (−1)k (−b)k .

(2.4)

With the help of (2.4) we can write the number of permutations in terms of Pochhammer symbol. The total number of permutations of n, taken r at a time, is given by P (n, r) where

P (n, r) = n(n − 1)(n − 2)...(n − r + 1) = (−1)r (−n)(−n + 1)...(−n + r − 1) = (−1)r (−n)r . (2.5)

Exercises 2.2 2.2.1. Evaluate the following numbers of permutations, if possible: (1): P (4, 2); (2):P (3, 4); (3): P (−5, 2); (4): P ( 12 , 2); (5): P ( 32 , 12 ). 2.2.2. If there are 20 students in a class then their birthdays could be any one of the 365 days 1, 2, ..., 365. If no two birthdays are the same or if all students have distinct birthdays then how many possibilities are there?

46

Probability and Statistics

2.2.3. How many 3-letter words can be made by using the alphabets of the word, (1): mind; (2): big, with (a): no letter is repeated, (b): the letter i is present. 2.2.4. How many 3-digital number plates can be made (1): with no restriction; (2): no numbers should be repeated; (3): one number 5 must be present; (4): the plate should start with a number 5. 2.2.5. In how many ways 10 persons can be seated (a): on the straight line of 4 chairs; (b): on a circular table with 4 chairs? 2.2.6. Evaluate the following Pochhammer symbols: (1): (−5)2 ; (2): (−5)5 ; (3): (− 12 )3 ; (4): ( 31 )4 . 2.2.7. Convert the following number of permutations into Pochhammer notation: (1): P (5, 3); (2): P (10, 2); (3): P (5, 0); (4): P (5, 5). 2.2.8. From a box containing 3 red and 5 green identical marbles, three marbles are picked at random (i): with replacement; (ii): without replacement. How many sample points are there in the sample space? 2.2.9. In Exercise 2.2.8 if we are interested in the event of getting exactly 2 red and one green marbles then how many sample points are there favorable to this event? 2.2.10. A coin is tossed 3 times. Write down all possible sequences of head H and tails T . 2.3. Combinations In permutations we were interested in the rearrangement or in sequences or in ordered sets or ordered subsets from the given set of objects. Suppose that we are not interested in the order but only in the subsets. For example, if we have 3 letters a, b, c and if we are looking at the ordered subsets of two letters from these three letters then the ordered sequences are ab, ac, ba, bc, ca, cb or there are 3×2 = 6 such ordered sets. Suppose that we are only concerned with the subsets of two letters from this set of three letters then the subsets

Probability

47

are {a, b}, {a, c}, {b, c} because whether the sequence ab or ba appears it is the same subset of the letters a and b. How many subsets of r elements possible from a set of n distinct elements? If a subset of r elements is there then we can order them in r! ways to get all ordered sequences. Hence the total number of subsets of r elements from a set of n elements = total number of permutations of n taken r at a time, divided by r! =

P (n, r) n(n − 1)...(n − r + 1) n! = = . r! r! r!(n − r)!

(2.6)

This is known as the number ¡nof ¢ combinations of n taken r at a time. The ¡ ¢ standard notations used are r , n Cr , C(n, r). We will use the notation nr . ¡ ¢ Notation 2.4. nr = the number of combinations of n, taken r at a time = the number of subsets of r distinct elements from the set of n distinct elements. Definition 2.4. The number of combinations of n, taken r at a time or the number of possible subsets of r distinct elements from a set of n distinct elements, is given by, µ ¶ n(n − 1)...(n − r + 1) n! n P (n, r) = = . = r! r! r!(n − r)! r (−1)r (−n)r = (in terms of Pochhammer symbol). r!

(2.7) (2.8)

From this definition itself the following properties are evident by substituting for r: µ ¶ µ ¶ µ ¶ µ ¶ n n n n = = 1; = = n; n 0 1 n−1 µ ¶ µ ¶ µ ¶ µ1¶ n n n(n − 1) −3 2 = = = not defined . , = not defined ; 1 2 n−2 2! 2 4

48

Probability and Statistics

From the representation in terms of factorials we have the following results for all r: µ ¶ µ ¶ n n = , r = 0, 1, 2, ..., n ⇒ (2.9) r n−r µ ¶ µ ¶ µ ¶ n n−1 n−1 = + (2.10) r r r−1 ¶ µ ¶ µ ¶ µ ¶ µ ¶ µ ¶ µ n n n n n n = , = , = , and so on. 0 n 1 n−1 2 n−2 For example, µ ¶ µ ¶ µ ¶ 100 100 100 (100)(99) = = = = 4950, 98 100 − 98 2 2! µ ¶ µ ¶ µ ¶ 210 210 210 = = = 1, 210 210 − 210 0 µ ¶ µ ¶ (10)(9)(8) 10 10 (10)(9)(8) = = 120. = = 3! (3)(2)(1) 7 3 Note that for the definitions of the numbers of permutations and combinations to hold both n and r must be non-negative integers, 0, 1, 2, .... When evaluating the number of permutations or the number of combinations in a given situation, do not use the representations in terms of factorials, use the basic definitions, that is µ ¶ n P (n, r) n(n − 1)...(n − r + 1) P (n, r) = n(n−1)...(n−r+1) and = = . r r! r! The representations in terms of factorials is useful for theoretical developments. When factorials are evaluated for large numbers, the computer is not going to give you the correct value. It will print out a number which is the maximum number that the computer can handle, need not be equal to the value of that factorial. Hence if that large factorial is divided by another big factorial, not the same as the numerator factorial, the computer will give the value as 1.

Probability

49

Example 2.3. A box contains 7 identical marbles, except for color, of which 4 are red and 3 are green. Two marbles are selected at random (a) one by one with replacement; (b) one by one without replacement; (c) two marbles together. (i): Compute the numbers of sample points in these cases; (ii): compute the probabilities of getting the sequence (RG) = (R = red G = green) in (a) and (b); (iii): compute the probabilities of getting exactly one red and one green marbles in (a),(b) and (c). Solution 2.3. (a) It is like filling two positions with 7 objects. The first position can be filled in 7 ways and since the first marble is put back the second position can also be filled in 7 ways and hence the total number of sample points is 72 = 49 and the sample space consists of all such 49 pairs of marbles . (b) Here the sampling is done without replacement and hence the first position can be filled in 7 ways and the second in 6 ways because the first marble is not put back. Hence the total number of sample points here is 7 × 6 = 42 and the sample space consists of all such 42 pairs of marbles. (c) Here we are looking at all possible subsets of 2 items from a set of 7 items and hence the sample space consists of all such subsets of 2 items and the total number of sample points is µ ¶ 7 (7)(6) 42 = = = 21. 2 2! 2 In order to compute the probabilities we will assume symmetry in the outcomes because of the phrase “at random”. Hence in (a) all the elementary 1 1 1 events get the probabilities of 49 each, in (b) 42 each and in (c) 21 each. Now we need to compute only how many sample points are favorable to the events. (ii): If the first marble has to be red then that can only come from the set of red marbles and hence there are 4 choices to fill the first position and similarly there are 3 choices to fill the second position and the number of sample points favorable to the events in (a) and (b) is 4 × 3 = 12. Hence the required probabilities in (a) and (b) are the following: 12 12 for (a) and for (b). 49 42

50

Probability and Statistics

For answering (iii) one has to look into all possible sequences of getting exactly one red and one green in (a) and (b) and all subsets containing exactly one red and one green in (c). Exactly one red and one green can come from the two sequences RG and GR and the number of sample points favorable to the event in (a) and (b) is 4 × 3 = 12 plus 3 × 4 = 12, equal to 24. Hence the required probabilities in (a) and (b) are the following: 24 24 4 for (a) and = for (b) . 49 42 7 In (c) the total number of sample points favorable to the event of getting exactly one red and one green marble is the following: One ¡ ¢ red can come only from the set of red marbles and this can be done in 41 = 4 ways and ¡¢ similarly the one green can come in 31 = 3 ways. Thus the total number of sample points favorable to the event is 12. Hence the required probability of getting exactly one red and one green marble is 12 4 = . 21 7 Observe that sampling without replacement and taking a subset of two produced the same result. This, in fact, is a general property. Exercises 2.3. 2.3.1. From a deck of 52 playing cards (13 diamonds, 13 spades, 13 clubs, 13 hearts) a hand of 8 cards is to be taken. (a): How many possibilities are there in making this hand of 8? (b): How many possibilities are there in making a hand of 8 consisting of 5 spades and 3 clubs? 2.3.2. A committee of 5 people is to be formed consisting of 3 women and 2 men. There are 10 men and 5 women available for selection. In how many ways can this committee be formed? 2.3.3. The 6/36 lottery is where there are 36 specific numbers and 6 numbers will be selected at random one by one without replacement or a subset of 6 numbers from the set of 36 numbers is taken. How many points are there in the sample space? 2.3.4. The 7/49 lottery consists of 49 specific numbers and a subset of 7 is taken, either together or one by one without replacement. (a): How many

Probability

51

sample points are there in this experiment? (b): If someone wishes to buy one lottery ticket to play 6/36 or 7/49, should she buy a ticket from 6/36 or 7/49 and why? 2.3.5. Show that

(1) :

4 µ ¶ X 4 r=0

r

= 16; (2) :

5 µ ¶ X 5 r=0

r

= 32; (3) :

n µ ¶ X n r=0

r

= 2n .

2.3.6. Show that ¶ ¶ 2 µ ¶µ 2 µ ¶µ X X 3 2 4 3 = 10; = 21; r 2 − r r 2 − r r=0 r=0 ¶ µ ¶ r µ ¶µ X m n m+n = . s r − s r s=0 2.3.7. Suppose there are r indistinguishable balls and n boxes. Balls are put into the boxes without any restriction. A box may receive none, one or more balls. In how many ways r¡indistinguishable balls can be distributed ¢ n+r−1 into n boxes and show that it is . r 2.3.8. Compute the combinations in Exercise 2.3.7 for (i): r = 2, n = 3; (ii): r = 4, n = 3; (iii): Verify the results in (i) and (ii) by the actual count. 2.3.9. Evaluate the following sum: µ ¶ µ ¶ µ ¶ n n n + + ... + . 0 1 n 2.3.10. Evaluate the following sum: µ ¶ µ ¶ µ ¶ µ ¶ n n n n n − + − ... + (−1) . 0 1 2 n

52

Probability and Statistics

2.4. Sum

P

and Product

Q

Notation

P : notation for a sum. Pn Definition 2.5. j=1 aj = a1 + a2 + ... + an . P The standard notation used for a sum is (similar to Greek capital letter sigma). For example if x is any element of the set {2, −1, 0, 5} then Notation 2.5.

X

x = sum of all elements in the set = (2) + (−1) + (0) + (5) = 6.

If a1 = 50kg, a2 = 45kg, a3 = 40kg, a4 = 55kg, a5 = 40kg denote the weights in kilograms of five sacks of potato then the total weight of all the five sacks will be the sum, which can be written as, 5 X

aj = a1 + a2 + a3 + a4 + a5 = 50 + 45 + 40 + 55 + 40 = 230kg.

j=1

P Here the notation aj means write the first number, which is a1 or aj for j = 1, add to it the number for j = 2, and so on until the last number. Thus n X j=1

bj = b1 + b2 + ... + bn =

n X i=1

bi =

n X

bk ,

k=1

the subscript can be denoted by any symbol i, j, k etc because in the notation for the sum or called the sigma notation the subscript is replaced by 1, 2, ... and the successive numbers are added up. If c1 = Rs 100, c2 = Rs 250, c3 = Rs 150 are the costs of three items bought by a shopper then the total cost is 3 X

cj = c1 + c2 + c3 = 100 + 250 + 150 = Rs 500.

j=1

If the shopper bought 4 items all were of the same price Rs 50 then as per our notation

Probability 4 X

53

50 = 50 + 50 + 50 + 50 = 4 × 50 = Rs 200.

j=1

Thus one property is obvious. If c is a constant then n X

c = n × c = nc.

(2.11)

j=1

Suppose that the first day a person spent a1 = Rs 20 for breakfast and b1 =Rs 35 for lunch. In the second day he spent a2 = Rs 25 for breakfast and b2 = Rs 30 for lunch. Then the total amount spent for the two days is given by 2 X

(ai + bi ) = (a1 + b1 ) + (a2 + b2 ) =

i=1

2 X

ai +

i=1

2 X

bi

i=1

= (20 + 25) + (35 + 30) = Rs 110. Hence another general property is obvious n X

(aj + bj ) =

j=1

n X j=1

aj +

n X

bj .

(2.12)

j=1

Another property is the following: k X j=1

caj = c

k X j=1

k k k X X X aj = c(a1 +...+ak ); (caj +dbj ) = c aj +d bj (2.13) j=1

j=1

j=1

where c and d are constants, free of j. The average of a set of numbers x1 , ..., xn , denoted by x ¯, can be written as   n (x1 + ... + xn ) 1 X  x ¯= =  xj . (2.14) n n j=1

54

Probability and Statistics

For example, if the numbers are 2, −3, 5 then as per our notation x1 = 2, x2 = −3, x3 = 5, n = 3 and x ¯= Let us see what happens if we consider 3 X

P3

(2) + (−3) + (5) 4 = . 3 3

j=1 (xj

−x ¯) here.

(xj − x ¯) = (x1 − x ¯) + (x2 − x ¯) + (x3 − x ¯)

j=1

4 4 4 = (2 − ) + (−3 − ) + (5 − ) 3 3 3 by adding up all terms by putting j = 1, j = 2, ... 4 = [(2) + (−3) + (5)] − 3( ) = 4 − 4 = 0. 3 This, in fact, is a general property. Whatever be the numbers x1 , x2 , ..., xn n X

(xj − x ¯) =

j=1

n X

xj −

j=1

n X

x ¯=

j=1

n X j=1

xj −

n X

xj = 0

(2.15)

j=1

since x ¯ is free of j it acts as a constant and Pn n n X ( j=1 xj ) X x ¯ = n¯ x=n = xj . n j=1 j=1 Whatever be the numbers x1 , x2 , ..., xn n X

 

x2j = x21 + x22 + ... + x2n ;

(2.16)

j=1 n X

2

xj  = (x1 + ... + xn )2 = x21 + ... + x2n + 2x1 x2 + ... + 2x1 xn

j=1

+ 2x2 x3 + ... + 2x2 xn + ... + 2xn−1 xn n n X X X X = x2j + 2 xi xj = x2j + 2 xi xj =

j=1 n X n X i=1 j=1

ij

(2.17)

Probability

55

P For example, the sum i