16 Biostatistics for Animal Science 2.The sum of the probabilities of all simple events is equal to 1: ∑PE)=1 Example:Assume an experiment consists of one throw of a die.Possible results are 1,2,3, 4,5 and 6.Each of those possible results is a simple event.The probability of each of those events is /6,i.e.,P(E1)=P(E2)=P(E3)=P(E)=P(Es)=P(E).This can be shown in a table: Observation Event(E) P(E) 1 E PE)='6 2 E P(E2)= 3 E PE)='6 4 PE)=6 5 PE)='6 6 Es PE6)='I6 Both rules about probabilities are satisfied.The probability of each event is(),which is less than one.Further,the sum of probabilities,P(E)is equal to one.In other words the blity isequal to one that any number between one and six will result from the t Generally,any event 4 is a specific set of simple events,that is,an event consists of one or more simple events.The probability of an event 4 is equal to the sum of probabilities of the simple events in the event 4.This probability is denoted with P().For example,assume the event that is defined as a number less than 3 in one throw of a die.The simple events are 1 and 2 each with the probability ()The probability of A is then(). 2.2 Counting Rules Recall that probability is P=mmber of favorable trials/total mmber of trials Or, able to count the number of simple events in an event A and the total number P=nmber of favorable simple events/total mumber of simple events ngor calculating probability is tocount the number of favorable is or simple ev ents and div de by the total nun ber of trials. owever,practically this can often be very cumbersome,and we can use counting rules instead
16 Biostatistics for Animal Science 2. The sum of the probabilities of all simple events is equal to 1: Σi P(Ei) =1 Example: Assume an experiment consists of one throw of a die. Possible results are 1, 2, 3, 4, 5 and 6. Each of those possible results is a simple event. The probability of each of those events is 1 /6, i.e., P(E1) = P(E2) = P(E3) = P(E4) = P(E5) = P(E6). This can be shown in a table: Observation Event (Ei) P(Ei) 1 E1 P(E1) = 1 /6 2 E2 P(E2) = 1 /6 3 E3 P(E3) = 1 /6 4 E4 P(E4) = 1 /6 5 E5 P(E5) = 1 /6 6 E6 P(E6) = 1 /6 Both rules about probabilities are satisfied. The probability of each event is (1 /6), which is less than one. Further, the sum of probabilities, Σi P(Ei) is equal to one. In other words the probability is equal to one that any number between one and six will result from the throw of a die. Generally, any event A is a specific set of simple events, that is, an event consists of one or more simple events. The probability of an event A is equal to the sum of probabilities of the simple events in the event A. This probability is denoted with P(A). For example, assume the event that is defined as a number less than 3 in one throw of a die. The simple events are 1 and 2 each with the probability (1 /6). The probability of A is then (1 /3). 2.2 Counting Rules Recall that probability is: P = number of favorable trials / total number of trials Or, if we are able to count the number of simple events in an event A and the total number of simple events: P = number of favorable simple events / total number of simple events A logical way of estimating or calculating probability is to count the number of favorable trials or simple events and divide by the total number of trials. However, practically this can often be very cumbersome, and we can use counting rules instead
Chapter2 Probability 17 2.2.1 Multiplicative Rule Consider k sets of elements of size m,m.n If one element is randomly chosen from each set.then the total number of different results is: 1,2,层 Example:Consider three pens with animals marked as listed: Pen11,2,3 Pen 2:A.B.C Pen 3:x.y The number of animals per pen are m=3,m=3.n=2. e triplets with one animal taken from each pen are. The number of possible triplets is:3x3x2=18 2.2.2 Permutations From a set of n elements,the number of ways those nelements can be rearranged,i.e.,put in different orders,is the permutations of n elements: P.=n The symbol n!(factorial of n)denotes the product of all natural numbers from 1 tom nl=(1)(2)(3).() Also,by definition!=1. mple In how many ways can three animals,x.and be arranged in triplets? The number of permutations of 3 elements:P(3)=31=(1)(2)(3)=6 The six possible triplets: zy12XE1zx20y以 More generally,we can define permutations of n elements taken at a time in particula order as: P=(n-k)
Chapter 2 Probability 17 2.2.1 Multiplicative Rule Consider k sets of elements of size n1, n2,., nk. If one element is randomly chosen from each set, then the total number of different results is: n1, n2, n3,., nk Example: Consider three pens with animals marked as listed: Pen 1: 1,2,3 Pen 2: A,B,C Pen 3: x,y The number of animals per pen are n1 = 3, n2 = 3, n3 = 2. The possible triplets with one animal taken from each pen are: 1Ax, 1Ay, 1Bx, 1By, 1Cx, 1Cy 2Ax, 2Ay, 2Bx, 2By, 2Cx, 2Cy 3Ax, 3Ay, 3Bx, 3By, 3Cx, 3Cy The number of possible triplets is: 3x3x2=18 2.2.2 Permutations From a set of n elements, the number of ways those n elements can be rearranged, i.e., put in different orders, is the permutations of n elements: Pn = n! The symbol n! (factorial of n) denotes the product of all natural numbers from 1 to n: n! = (1) (2) (3) . (n) Also, by definition 0! = 1. Example: In how many ways can three animals, x, y and z, be arranged in triplets? n = 3 The number of permutations of 3 elements: P(3) = 3! = (1) (2) (3) = 6 The six possible triplets: xyz xzy yxz yzx zxy zyx More generally, we can define permutations of n elements taken k at a time in particular order as: ( )! ! , n k n Pn k − =
18 Biostatistics for Animal Science e:In how many ways can three animals x,y and=be arranged in pairs such that the P4F6-2=6 The six possible pairs are:xx 2.2.3 Combinations 图 n(n-1).(n-k+1) Example:In how many ways can three animals,x.y,and=,be arranged in pairs when the order in the pairs is not important? 目目6a There are three possible pairs:xyx=y= 2.2.4 Partition Rule From a set of n elements to be assigned to j groups of size mm,nn the number of ways in which those elements can be assigned is: 月 nin3!.n where n=m+m+.+n Example:In how many ways can a set of five animals be assigned to j=3 stalls with m=2 animals in the first,n=2 animals in the second and n=I animal in the third? 21211=30 Note that the prev intotoombinations is a special case of partitioning a set of sizen 2.2.5 Tree Diagram of all po sible outcomes of dedoud paon
18 Biostatistics for Animal Science Example: In how many ways can three animals x, y and z be arranged in pairs such that the order in the pairs is important (xz is different than zx)? ( ) 6 3 2 ! 3! , = − Pn k = The six possible pairs are: xy xz yx yz zx zy 2.2.3 Combinations From a set of n elements, the number of ways those n elements can be taken k at a time regardless of order (xz is not different than zx) is: ( ) ( ) ( ) ! 1 . 1 ! ! ! k n n n k k n k n k n − − + = − = Example: In how many ways can three animals, x, y, and z, be arranged in pairs when the order in the pairs is not important? ( ) 3 2! 3 2 ! 3! 2 3 = − = = k n There are three possible pairs: xy xz yz 2.2.4 Partition Rule From a set of n elements to be assigned to j groups of size n1, n2, n3,., nj, the number of ways in which those elements can be assigned is: ! !. ! ! 1 2 n n nj n where n = n1 + n2 + . + nj Example: In how many ways can a set of five animals be assigned to j=3 stalls with n1 = 2 animals in the first, n2 = 2 animals in the second and n3 = 1 animal in the third? 30 2!2!1! 5! = Note that the previous rule for combinations is a special case of partitioning a set of size n into two groups of size k and n-k. 2.2.5 Tree Diagram The tree diagram illustrates counting, the representation of all possible outcomes of an experiment. This diagram can be used to present and check the probabilities of a particular
Chapter2 Probability 19 event.As an example,a tree diagram of possible triplets,one animal taken from each of three pens.is shown below: Pen1:1,2,3 Pen 2:x,y Pen 3:A,B,C The number of all possible triplets is: 332)=18 The tree diagram is: Pen I Pen II Pen III AB C The first triplet has animal l from pen l animal x from pen 2 and animal a from Pen 3 if we assign the probabilities to each of the events then that tree diagram iscalled a probability tree. 2.3 Compound Events A compound event is an event composed of two or more events.Consider two events A and B.The compound event such that both events A and B occur is called the intersection of the events,denoted by 4n B.The compound event such that either event 4 or event B occurs is called the union ofevents.denoted by AB.The probability of an intersection is P(An B) and the probability of union is P(B).Also: P(AB)=P(A)+P(B)-P(A0B) The complement of an event A is the event that A does not occur,and it is denoted by 4. The probability of a complement is: P(4=1-P(A) Example:Let the event A be such that the result of a throw of a die is an even number.Let the event B be such that the number is greater than 3. The event 4 is the set:(2,4,6) The event B is the set:(4,5,6)
Chapter 2 Probability 19 event. As an example, a tree diagram of possible triplets, one animal taken from each of three pens, is shown below: Pen 1: 1, 2, 3 Pen 2: x, y Pen 3: A, B, C The number of all possible triplets is: (3)(3)(2) = 18 The tree diagram is: Pen I 1 2 3 Pen II x y x y x y Pen III A B C A B C A B C A B C A B C A B C The first triplet has animal 1 from Pen 1, animal x from pen 2, and animal A from Pen 3. If we assign the probabilities to each of the events then that tree diagram is called a probability tree. 2.3 Compound Events A compound event is an event composed of two or more events. Consider two events A and B. The compound event such that both events A and B occur is called the intersection of the events, denoted by A ∩ B. The compound event such that either event A or event B occurs is called the union of events, denoted by A ∪ B. The probability of an intersection is P(A ∩ B) and the probability of union is P(A ∪ B). Also: P(A ∪ B) = P(A) + P(B) - P(A ∩ B) The complement of an event A is the event that A does not occur, and it is denoted by Ac . The probability of a complement is: P(Ac ) = 1 - P(A) Example: Let the event A be such that the result of a throw of a die is an even number. Let the event B be such that the number is greater than 3. The event A is the set: {2,4,6} The event B is the set: {4,5,6}
20 Biostatistics for Animal Science the lan evmerd The intersec ion (4nB)={4,6} with the probability P(B)=P(4)+P(6)=because the probability of an event is the sum of probabilities of the simple events that make up the set The union of the events A and B is an event such that the result is an even number or a number greater than 3.This is the set: (4UB)={2.4,5,6} with the probability PAUB)=P2)+P4)+PS)+P6)=6 Figure 2.1 presents the intersection and union of the events A and B. EventA Event B AUB- Figure 2.1 Intersection and union of two events A conditional probability is the probability that an event will occur if some assumptions are satisfied.In other words a conditional probability is a probability that an event B will occur if it is known that an event A has already occurred.The conditional probability of B given A is calculated by using the formula: P(B14)=P(40B) P(A) Events can be dependent or independent.Ifevents 4 and B are independent then: P(BI A)=P(B)and P(AIB)=P(B) If independent the probability of B does not depend on the probability of A.Also,the probability that both events occur is equal to the product of each probability:
20 Biostatistics for Animal Science The intersection A and B is an event such that the result is an even number and a number greater than 3 at the same time. This is the set: (A ∩ B) = {4,6} with the probability: P(A ∩ B) =P(4) + P(6) = 2 /6, because the probability of an event is the sum of probabilities of the simple events that make up the set. The union of the events A and B is an event such that the result is an even number or a number greater than 3. This is the set: (A ∪ B) = {2,4,5,6} with the probability P(A ∪ B) = P(2) + P(4) + P(5) + P(6) = 4 /6 Figure 2.1 presents the intersection and union of the events A and B. Event A Event B 6 2 4 5 4 6 2 4 5 6 A ∩ B A ∪ B Figure 2.1 Intersection and union of two events A conditional probability is the probability that an event will occur if some assumptions are satisfied. In other words a conditional probability is a probability that an event B will occur if it is known that an event A has already occurred. The conditional probability of B given A is calculated by using the formula: ( ) ( ) ( ) | P A P A B P B A ∩ = Events can be dependent or independent. If events A and B are independent then: P(B | A) = P(B) and P(A | B) = P(B) If independent the probability of B does not depend on the probability of A. Also, the probability that both events occur is equal to the product of each probability: