Basic Probability and Statistics Department of Electrical Engineering and Information Technology Faculty of Engineering, Universitas Gadjah Mada Discrete & Continuous Probability Distributions Sunu Wibirama
OUTLINE Basic Probability Distributions Binomial Distributions Poisson Distributions Normal Distributions (!)
SOME IMPORTANT THINGS Please read Walpole 8 th Chapter 5 (for Binomial and Poisson) and Chapter 6 (for Normal Distribution) You can use Table A.1, A.2, and A.3 from Walpole book (p. 751) Some exercises from these chapters (5 and 6) will be used in Midterm Exam
Binomial Distribution
CASE 1 Suppose that 80% of the jobs submitted to a data-processing center are of a statistical nature. Selecting a random sample of 10 submitted jobs would be analogous to tossing an unbalanced coin 10 times, with the probability of observing a head (drawing a statistical job) on a single trial equal to 0.80.
CASE 2 Test for impurities commonly found in drinking water from private wells showed that 30% of all wells in a particular country have impurity A. If 20 wells are selected at random then it would be analogous to tossing an unbalanced coin 20 times, with the probability of observing a head (selecting a well with impurity A) on a single trial equal to 0.30.
BINOMIAL EXPERIMENT Inspection of chip (defective or non-defective) Inspection of public opinian (approve or not) Inspection of digging wells (success or failed) Etc.
BERNOULLI PROCESS An experiment often consists of repeated trials, each with two possible outcome that may be labeled success and failed The process is called Bernoulli Process: Consists of n repeated trials The outcome can be classified as success of failed (i.e., only 2 possible outcomes) The probability of success (p) remains constant from trial to trial The repeated trials are independent
BINOMIAL DISTRIBUTION The number X of successes in n Bernoulli trials is called binomial random variable The probability of success is denoted by p The probability distribution of binomial random variable is called binomial distribution b(x; n, p)
BINOMIAL DISTRIBUTION Each success has probability, p Each failure has probability, q q = 1 - p x = number of successes n - x = numbe of failures Since independent, combination probabilities are multiplied b(x;n, p) = " # $ n! % x!(n! x )!& ' p x q n!x
GRAPH OF BINOMIAL DISTRIBUTION b(x;n,p) 0 1 2 3 4 5 6 7 8 9 10 11 12 13
BINOMIAL CUMULATIVE DISTRIBUTION As with all other distributions, the sum of all probabilities must equal unity: B( x; n, p) = x b( x; n, p) = 1 x= 0
13 Table A.1: Binomial Cumulative Distribution Proportion, p Trials Success 0.1 0.2 0.25 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 0.9000 0.8000 0.7500 0.7000 0.6000 0.5000 0.4000 0.3000 0.2000 0.1000 1 1 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 2 0 0.8100 0.6400 0.5625 0.4900 0.3600 0.2500 0.1600 0.0900 0.0400 0.0100 2 1 0.9900 0.9600 0.9375 0.9100 0.8400 0.7500 0.6400 0.5100 0.3600 0.1900 2 2 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 3 0 0.7290 0.5120 0.4219 0.3430 0.2160 0.1250 0.0640 0.0270 0.0080 0.0010 3 1 0.9720 0.8960 0.8438 0.7840 0.6480 0.5000 0.3520 0.2160 0.1040 0.0280 3 2 0.9990 0.9920 0.9844 0.9730 0.9360 0.8750 0.7840 0.6570 0.4880 0.2710 3 3 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 4 0 0.6561 0.4096 0.3164 0.2401 0.1296 0.0625 0.0256 0.0081 0.0016 0.0001 4 1 0.9477 0.8192 0.7383 0.6517 0.4752 0.3125 0.1792 0.0837 0.0272 0.0037 4 2 0.9963 0.9728 0.9492 0.9163 0.8208 0.6875 0.5248 0.3483 0.1808 0.0523 4 3 0.9999 0.9984 0.9961 0.9919 0.9744 0.9375 0.8704 0.7599 0.5904 0.3439 4 4 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000
BINOMIAL DISTRIBUTION Mean µ = np Variance! 2 = npq
EXAMPLE Test for impurities commonly found in drinking water from private wells showed that 30% of all wells in a particular country have impurity A. If a random sample of 5 wells is selected from the large number of wells in the country, what is the probability that: Exactly 3 will have impurity A? At least 3? Fewer than 3?
SOLUTION (Preliminary) Confirm that this experiment is a binomial experiment. This experiment consists of n = 5 trials, one corresponding to each random selected well. Each trial results in an S (the well contains impurity A) or an F (the well does not contain impurity A). Since the total number of wells in the country is large, the probability of drawing a single well and finding that it contains impurity A is equal to 0.30 and this probability will remain the same for each of the 5 selected wells.
SOLUTION (a) Therefore, the sampling process represents a binomial experiment with n = 5 and p = 0.30. a) The probability of drawing exactly x = 3 wells containing impurity A, with n = 5, p = 0.30 and x = 3 b(3;5, 0.30) = 5! 3!2! (0.30)3 (1! 0.30) 5!3 = 0.1323
SOLUTION (b) b) The probability of observing at least 3 wells containing impurity A is: P(x 3) = p(3)+p(4)+p(5). We have calculated p(3) = 0.1323 p(4) = 0.02835, p (5) = 0.00243. In result, P(x 3) = 0.1323+0.02835+0.00243 = 0.16380.
SOLUTION (c) c) Probability of observing less than 3 wells containing impurity A is P(x<3) = p(0)+p(1)+p(2). We can avoid calculating 3 probabilities by using the complementary relationship P(x<3) = 1-P(x 3) = 1-0.16380 = 0.83692.
Poisson Distribution
POISSON DISTRIBUTION The experiment consists of counting the number x of times a particular event occurs during a given unit of time The probability that an event occurs in a given unit of time is the same for all units The number of events that occur in one unit of time is independent of the number that occur in other units. The mean number of events in each unit will be denoted by the Greek letter!
POISSON DISTRIBUTION
EXAMPLE Suppose that we are investigating the safety of a dangerous intersection. Past police records indicate a mean of 5 accidents per month at this intersection. Suppose the number of accidents is distributed according to a Poisson distribution. Calculate the probability in any month of exactly 0, 1, 2, 3 or 4 accidents.
SOLUTION Since the number of accidents is distributed according to a Poisson distribution and the mean number of accidents per month is 5, we have the probability of happening accidents in any month p(x) = 5x e!5 x! By this formula we can calculate: p(0) = 0.00674, p(1) = 0.03370, p(2) = 0.08425, p(3) = 0.14042, p(4) = 0.17552.
POISSON CUMULATIVE DISTRIBUTION P(r;!) =! p( x;!) Consider the previous example. Suppose we want to know cumulative distribution of probability less than 3 accidents per month x=0 Than we have p(x < 3) = p(0) + p(1) + p(2) p(x < 3) = 0.00674+0.03370+0.08425 = 0.12469 Simplify your computation using Table A.2 r
POISSON CUMULATIVE DISTRIBUTION r P(r;!) =! p( x;!) see Table A.2 x=0! p(x < 3) = p(0) + p(1) + p(2) p(x < 3) = 0.00674+0.03370+0.08425 = 0.12469
Normal Distribution
NORMAL DISTRIBUTION Most important continuous probability distribution Graph called the normal curve (bell-shaped). Total area under the curve = 1 Derived by DeMoivre and Gauss. Called the Gaussian distribution. Describes many phenomena in nature, industry and research Random variable, X f(x) 2 3 4 5 6 28
NORMAL DISTRIBUTION Definition: Density function of the normal random variable, X, with mean and variance such that: f (x) = n(x;µ,! ) = e!0.5 " # $ (x!µ)! 2 % & '! 2",! ( < x < ( f(x) 0.4500 0.4000 0.3500 0.3000 0.2500 0.2000 0.1500 0.1000 0.0500 0.0000-4.0-2.0 0.0 2.0 4.0 Z-value 2
DIFFERENT NORMAL DISTRIBUTION f(x) Different means 0 1 2 3 4 Different f(x) 0 1 2 3 4 Different means and f(x) 30 0 1 2 3 4 5 6
DIFFERENT NORMAL DISTRIBUTIONS
32 AREAS UNDER THE CURVE Area under the curve between x= x 1 and x= x 2 equals P(x 1 < x < x 2 ) dx e dx x n x X x P x x x x x = = < < 2 1 2 2 1 ) ( 0.5 2 1 2 1 ), ; ( ) ( σ µ π σ σ µ f(x) x 1 x 2 = P(x < x 2 ) - P(x < x 1 ) P(x 1 < x < x 2 )
STANDARD NORMAL DISTRIBUTION General density function: For standardized normal distribution: f (x) = n(x;µ,! ) = e!0.5 f (x) = n(x;µ,! ) = e! " # $ (x!µ)!! 2" " x # $ % 2 2 & ' 2" 2 % & '
STANDARD NORMAL DISTRIBUTION Itʼ s also called z- distribu*on It has a mean of 0 and standard devia@on of 1 Transforming normal random variable x to standard normal random variable z z = x µ σ
THE ORIGIN OF Z-DISTRIBUTION To enable use of z-table (Table A.3), transform to unit values Mean = 0 Z = X Variance =1 µ σ 1 ( x µ ) 0.5 σ 2 1 P( x1 < X < x2) = e dx σ 2π x x 2 = 1 σ 2π z z { z } 2 2 1 e 0.5 dz = z z 2 1 n(;0,1) z dz 35
Find area under normal curve Example: (P < -2.13) = 0.0166
EXAMPLE Given the standard normal distribution, find the area under the curve that lies to the LEFT of z = 1.84 Solution: (use Table A.3) f(x) 0 z 0.0000 0.0100 0.0200 0.0300 0.0400 0.0500 1.7 0.9554 0.9564 0.9573 0.9582 0.9591 0.9599 1.8 0.9641 0.9649 0.9656 0.9664 0.9671 0.9678 37
SOLVING CASE WITH Z-DISTRIBUTION Suppose we have a problem finding probability of a case in X domain p(x) We can use Z-Distribution to solve the problem We should transform X Z Finding X from Z
Finding x from z
EXAMPLE
SOLUTION
SOLUTION
SOLUTION
TUGAS INDIVIDU (sekaligus latihan untuk Ujian MIDTERM) Kerjakan dari ebook Walpole (8th Edi@on): Exercise 5.9 (page 151, kasus truck) Exercise 5.58 (page 165, kasus traffic accidents) Exercise 6.11 (page 186, kasus lawyer) Exercise 6.14 (page 187, kasus students) Kerjakan dengan tulisan yang jelas, bila diperlukan, tambahkan ilustrasi pada jawaban Anda. Jangan lupa cantumkan NAMA dan NIM Batas waktu pengumpulan, hari Senin 04 April 2011, pkl. 12.00 WIB (siang), di lab SE
THANK YOU and GOOD LUCK