Universitas Gadjah Mada Department of Civil and Environmental Engineering Master in Engineering in Natural Disaster Management Data Processing Techniques s 1
Illustrative Example Investigation on population characteristics of the population à variables values of the variables scores of exam: 0 to 100 ages: 0 to marital status: single, married, divorced weather: sunny, cloudy, rain 2
Illustrative Example Another situation Answer to a question yes / no true / false win / loose success / failure success / failure 3
If an experiment (operation) has two outcomes, that is either success or failure the probability of the outcome is constant, irrespective of the preceding outcome Probability of a binomial distribution prob(success) = p prob(failure) = 1 p = q 4
Event Binomial? Why? rain no rain no probability changes sex (male female) of people in a village no probability changes sex (male female) of newly born infant yes probability is constant 5
PERMUTATIONS AND COMBINATIONS 6
Permutations and Combinations Counting the number of ways in which a number of objects can be arranged or selected. a set of n different elements a sample of size r is taken from this set The answer depends on: the meaning of the word different and the way in which the sampling is performed. How many different samples can be taken? 7
Permutations and Combinations Taking sample of size r from a set of n elements (n r) ordered with replacement ordered without replacement unordered without replacement unordered with replacement ordered sample à the order of element in the sample is important with replacement à an element may be taken more than once 8
Permutations and Combinations Example Select two stations out of four (A,B,C,D) to visit. How many different pair of stations that possibly be visited? 9
Permutations and Combinations To visit 2 stations out of 4 (r = 2, n = 4) The order of visits is important à visiting first Sta. A and Sta. B afterward is different with visiting first Sta. B and then Sta. A. With replacement à a station can be visited twice. Possibility of pair (A,A) (A,B) (A,C) (A,D) (B,A) (B,B) (B,C) (B,D) (C,A) (C,B) (C,C) (C,D) (D,A) (D,B) (D,C) (D,D) 16 à n r = 4 2 = 16 10
Permutations and Combinations To visit 2 stations out of 4 (r = 2, n = 4) The order of visits is important à visiting first Sta. A and Sta. B afterward is different with visiting first Sta. B and then Sta. A. Without replacement à a station can only be visited once. Possibility of pair (A,B) (A,C) (A,D) (B,A) (B,C) (B,D) (C,A) (C,B) (C,D) (D,A) (D,B) (D,C) ( n) r = n! ( n r)! = 4! ( 4 2)! = 12 permutation 11
Permutations and Combinations To visit 2 stations out of 4 (r = 2, n = 4) The order of visits is not important à visiting first Sta. A and Sta. B afterward is similar to visiting first Sta. B and then Sta. A. Without replacement à a station can only be visited once. Possibility of pair (A,B) (A,C) (A,D) (B,C) (B,D) (C,D) n r = n! ( n r)! r! = 4! ( 4 2)! 2! = 6 combination binomial coefficient 12
Permutations and Combinations To visit 2 stations out of 4 (r = 2, n = 4) The order of visits is not important à visiting first Sta. A and Sta. B afterward is similar to visiting first Sta. B and then Sta. A. With replacement à a station can be visited twice. Possibility of pair (A,A) (A,B) (A,C) (A,D) (B,B) (B,C) (B,D) (C,C) (C,D) (D,D) n + r 1 r ( = n + r 1 )! = ( n 1)! r! ( = 4 + 2 1 )! = 10 ( 4 1)! 2! 13
Permutations and Combinations With replacement Without replacement Ordered Unordered n + r 1 r n r ( = n + r 1 )! ( n 1)! r! ( n) r = n r n! n r ( )! = n! ( n r)! r! 14
MSExcel s Functions =FACT(n) n is a positive number, n 0 =PERMUT(n,r) n and r are integer numbers, n r =COMBIN(n,r) n and r are integer numbers, n r 15
In an operation probability of a success is p à prob(s) = p probability of a failure is q = 1 p à prob(g) = 1 p The operation is carried out once probability of a success p probability of a failure q The operation is carried out twice probability of a success followed by another success (S,S) probability of a success followed by a failure (S,G)pq probability of a failure followed by a success (G,S)qp probability of a failure followed by another failure (G,G) pp qq 16
Number of successes in two times experiments Number of successes Events Number of events with success Probability 2 (S,S) 1 pp 1 p 2 1 (S,G) or (G,S) 2 pq + qp 2 p 1 q 1 0 (G,G) 1 qq 1 q 2 17
Number of successes in three times experiments Number of successes Events Number of events with success Probability 3 (S,S,S) 1 1 ppp 1 p 3 2 (S,S,G) or (S,G,S) or (G,S,S) 1 (S,G,G) or (G,S,G) or (G,G,S) 3 3 ppq 3 p 2 q 1 3 3 pqq 3 p 1 q 2 0 (G,G,G) 1 1 qqq 1 q 3 18
Number of successes in three experiments probability of a success in the third experiment is qqp probability of a success in one of the experiments is pqq + qpq + qqp Number of successes in five experiments probability of two successes is 5 2 p2 q 3 = 10p 2 q 3 19
If experiment has the following characteristics the probability of a success is p and the probability of a failre is q = 1 p the probability of a success, p, is constant then the probability of x successes in n experiments is f X ( x;n, p) = n x px ( 1 p) n x x = 0,1,2,...,n binomial coefficient 20
Example #1 Every year in five consecutive years, a program is randomly selected out of four proposals (A,B,C,D) to receive fundings. Each program has the same probability to be selected. Questions What is the probability of A to get fundings three times? What is the probability of A to get fundings 5x, 4x, 3x, 2x, 1x, and 0x? 21
Example #1 In every selection prob(as) = probability of A being selected = ¼ = 0.25 = p prob(af) = probability of A being not selected = 1 0.25 = 0.75 = q Within five selections probability of A being selected 3 times is f X ( x;n, p) = f X ( 3;5,0.25) = 5 3 0.253 0.75 2 = 0.088 22
Number of success years in five years Number of successes Number of events Probability 0 1 0.237 1 5 0.396 2 10 0.264 3 10 0.088 4 5 0.015 5 1 0.001 Σ 1.000 23
Example #2 The probability of water level exceeding elevation h meter is 0.05 in a year. If that happens, the residential area A will be flooded. If flooding is an independent event (flooding in a particular year does not depend on the other year s event), the flooding can then be regarded as a Bernoulli process à binomial distribution. Question What is the probability of two floodings in residential area A in 20 year period? 24
Example #2 Define Thus x is the number of floodings in residential area A n is the period being considered p is the probability of water level exceeding elevation h meter, i.e. the probability of residential area A be flooded in a year x = 2; n = 20; p = 0.05 f X ( x;n, p) = f X ( 2;20,0.05) = 20 2 0.052 0.95 18 = 0.1887 25
Example #3 To be 90% sure that a design flood discharge will not be exceeded within 10 year period, what is the return period of the design flood? Example #4 Considering the above example, what is the risk of T-year flood discharge be exceeded at least once within T years? 26
27