Discrete & Continuous Probability Distributions

46
Discrete & Continuous Probability Distributions Sunu Wibirama Basic Probability and Statistics Department of Electrical Engineering and Information Technology Faculty of Engineering, Universitas Gadjah Mada

Transcript of Discrete & Continuous Probability Distributions

Page 1: Discrete & Continuous Probability Distributions

Discrete & Continuous Probability Distributions

Sunu Wibirama

Basic Probability and Statistics Department of Electrical Engineering and Information Technology Faculty of Engineering, Universitas Gadjah Mada

Page 2: Discrete & Continuous Probability Distributions

OUTLINE

 Basic Probability Distributions  Binomial Distributions  Poisson Distributions  Normal Distributions (!)

Page 3: Discrete & Continuous Probability Distributions

SOME IMPORTANT THINGS

 Please read Walpole 8th 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

Page 4: Discrete & Continuous Probability Distributions

Binomial Distribution

Page 5: Discrete & Continuous Probability Distributions

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.

Page 6: Discrete & Continuous Probability Distributions

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.

Page 7: Discrete & Continuous Probability Distributions

BINOMIAL EXPERIMENT

 Inspection of chip (defective or non-defective)

 Inspection of public opinian (approve or not)

 Inspection of digging wells (success or failed)

 Etc….

Page 8: Discrete & Continuous Probability Distributions

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

Page 9: Discrete & Continuous Probability Distributions

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)

Page 10: Discrete & Continuous Probability Distributions

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

Page 11: Discrete & Continuous Probability Distributions

GRAPH OF BINOMIAL DISTRIBUTION

b(x;n,p)

6 5 8 7 10 9 12 11 2 1 4 3 13 0

Page 12: Discrete & Continuous Probability Distributions

BINOMIAL CUMULATIVE DISTRIBUTION

∑=

==x

xpnxbpnxB

0

1),;(),;(

•  As with all other distributions, the sum of all probabilities must equal unity:

Page 13: Discrete & Continuous Probability Distributions

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

Page 14: Discrete & Continuous Probability Distributions

BINOMIAL DISTRIBUTION

 Mean

 Variance

µ = np

! 2 = npq

Page 15: Discrete & Continuous Probability Distributions

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?

Page 16: Discrete & Continuous Probability Distributions

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.

Page 17: Discrete & Continuous Probability Distributions

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

Page 18: Discrete & Continuous Probability Distributions

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.

Page 19: Discrete & Continuous Probability Distributions

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.

Page 20: Discrete & Continuous Probability Distributions

Poisson Distribution

Page 21: Discrete & Continuous Probability Distributions

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 !

Page 22: Discrete & Continuous Probability Distributions

POISSON DISTRIBUTION

Page 23: Discrete & Continuous Probability Distributions

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.

Page 24: Discrete & Continuous Probability Distributions

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

 By this formula we can calculate:

p(x) = 5x e!5

x!

p(0) = 0.00674, p(1) = 0.03370, p(2) = 0.08425, p(3) = 0.14042, p(4) = 0.17552.

Page 25: Discrete & Continuous Probability Distributions

POISSON CUMULATIVE DISTRIBUTION

 Consider the previous example. Suppose we want to know cumulative distribution of probability less than 3 accidents per month

 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

P(r;!) = p(x=0

r

! x;!)

Page 26: Discrete & Continuous Probability Distributions

POISSON CUMULATIVE DISTRIBUTION

P(r;!) = p(x=0

r

! x;!) see Table A.2

p(x < 3) = p(0) + p(1) + p(2) p(x < 3) = 0.00674+0.03370+0.08425 = 0.12469

!

Page 27: Discrete & Continuous Probability Distributions

Normal Distribution

Page 28: Discrete & Continuous Probability Distributions

28

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 5 4 6

Page 29: Discrete & Continuous Probability Distributions

0.0000

0.0500

0.1000

0.1500

0.2000

0.2500

0.3000

0.3500

0.4000

0.4500

-4.0 -2.0 0.0 2.0 4.0

f(x)

Z-value 29

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 < (

Page 30: Discrete & Continuous Probability Distributions

30

DIFFERENT NORMAL DISTRIBUTION

Different ________ f(x)

0 1 32 4

Different means

f(x)

0 1 32 4 5 6

Different means and _______

f(x)

0 1 32 4

Page 31: Discrete & Continuous Probability Distributions

DIFFERENT  NORMAL  DISTRIBUTIONS  

Page 32: Discrete & Continuous Probability Distributions

32

AREAS UNDER THE CURVE

 Area under the curve between x= x1 and x= x2

equals P(x1 < x < x2)

dxedxxnxXxPx

x

xx

x∫∫ ⎭

⎬⎫

⎩⎨⎧ −−

==<<2

1

22

1

)(5.0

21 21),;()( σ

µ

πσσµ

f(x)

x1 x2

= P(x < x2) - P(x < x1) P(x1 < x < x2)

Page 33: Discrete & Continuous Probability Distributions

STANDARD NORMAL DISTRIBUTION

•  General density function:

•  For standardized normal distribution:

f (x) = n(x;µ,! ) = e! x2"#$

%&'2

2"

f (x) = n(x;µ,! ) = e!0.5 (x!µ )

!"#$

%&'2

! 2"

Page 34: Discrete & Continuous Probability Distributions

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   xz µ

σ−=

Page 35: Discrete & Continuous Probability Distributions

35

THE ORIGIN OF Z-DISTRIBUTION

 To enable use of z-table (Table A.3), transform to unit values  Mean = 0

 Variance =1 σµ−= XZ

{ }

22

1

2 2

1

2

1

( )0.5

1 2

0.5

1( )2

12

( ;0,1)

xx

x

zz

z

z

z

P x X x e dx

e dz

n z dz

µσ

σ π

σ π

−⎧ ⎫− ⎨ ⎬⎩ ⎭

< < =

=

=

Page 36: Discrete & Continuous Probability Distributions

Find area under normal curve Example: (P < -2.13) = 0.0166

Page 37: Discrete & Continuous Probability Distributions

37

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

Page 38: Discrete & Continuous Probability Distributions

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”

Page 39: Discrete & Continuous Probability Distributions

Finding  x  from  z  

Page 40: Discrete & Continuous Probability Distributions

EXAMPLE

Page 41: Discrete & Continuous Probability Distributions

SOLUTION  

Page 42: Discrete & Continuous Probability Distributions

SOLUTION  

Page 43: Discrete & Continuous Probability Distributions
Page 44: Discrete & Continuous Probability Distributions

SOLUTION  

Page 45: Discrete & Continuous Probability Distributions

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  

Page 46: Discrete & Continuous Probability Distributions

THANK YOU and

GOOD LUCK