Vous êtes sur la page 1sur 46

ECON 1005 Lectures

Discrete Probability Distributions

Random Variables
A random variable is one whose value is determined by the outcome of a random experiment.
A discrete random variable assumes countable values A continuous random variable assumes values that can be measured or a value that is contained in one or more intervals.

Probability Distributions
A probability distribution links a random variable X with the probability that X assumes a discrete value or a range of values This can be presented by a table, function or formula

Random variables can be discrete or continuous


Probability distributions are also correspondingly discrete or continuous
3

Discrete v Continuous Probability Distributions

Every random variable has associated with it a probability distribution. discrete random variables possess discrete probability distributions continuous random variables possess continuous probability distributions.
4

Discrete Probability Distributions covered in this course


The Binomial Distribution The Poisson Distribution We shall also explore the Approximation of the Binomial Distribution by the Poisson Distribution.
5

Continuous Probability Distributions covered in this course


The Normal Distribution The Student-t Distribution The Chi Square Distribution The F Distribution

Some Preliminaries
Before we continue, it is useful to introduce two types of notation that we will be using in this lecture:
Factorials The Combination Notation

The symbol ! (read as factorial) is used to denote factorials The value of the factorial of a number is obtained by multiplying all the integers from that number to 1 The symbol n!, read as n factorial, represents the product of all the integers from n to 1. In other words,n! = (n) (n-1) (n-2)(n-3).3.2.1 By definition, 0! = 1 For example
6! = 6x5x4x3x2x1 10! = 10x9x8x7x6x5x4x3x2x1
8

Factorials

Combinations
Combinations give the number of ways r elements can be selected from n elements. The number of Combinations for selecting r from n distinct elements is given by: nCr = n ! r! ( n-r)! 5C2 is therefore calculated as (5!) / (2! 3!) = 5x4x3x2x1 (2x1) (3x2x1) = 120/12 = 10 All Scientific Calculators possess the Combination 9 Formula: look for it!

P(Heads) = , P(Tails) = If you were to toss the coin 10 times, would you get Heads for 5 of those times? The truth is that you can get Heads any amount of times ranging from 0 to 10 Of course, you are more likely to get 5 than 0, but the fact remains that both these numbers (as well as others in the range 0-10) are possible So the question is, how probable is each one? In other words, if we define the random variable X as the number of Heads we get, can we create a probability distribution for X? 10

Tossing a (Fair) Coin

Still Tossing the Coin.


the experiment is the tossing of the coin You are doing 10 trials of this experiment (tossing the coin 10 times) Each time you toss the coin (for each trial of the experiment), only one of two outcomes is possible: Heads (H) or Tails (T) No matter the previous outcomes, for each time you toss the coin, the P(H) remains and the P(T) remains This is an example of what is known as a Binomial Experiment

11

The Binomial Experiment


More generally, a Binomial Experiment is one that possesses the following properties:
The experiment consists of n repeated trials, n = 0, 1, 2, ... Each trial results in an outcome that may be classified as a success or a failure The probability of a success, denoted by p, remains constant from trial to trial (in our illustration, p = 1/2) The repeated trials are independent If any ONE of these conditions is violated, we do NOT have a Binomial Experiment.
12

Back to Our Example.


Tossing a Fair Coin 30 times, defining X as the r.v. the number of Heads, and we are interested in creating the probability distribution for X
The experiment (tossing the coin) consists of n repeated trials, n = 0, 1, 2, ... (n=10) Each trial (tossing the coin) results in an outcome that may be classified as a success (Heads) or a failure (Tails) The probability of a success, denoted by p, remains constant from trial to trial (the probability of getting Heads remains constant each time, and p= ) The repeated trials are independent (however many Heads we get on previous trials, that is not affecting the probability of getting Heads in future trials) 13

Which of the following are Binomial Experiments? Explain why.


Rolling a die 15 times and observing whether the number obtained is even or odd Drawing 3 balls without replacement from a box that contains 10 balls, 6 of which are red and 4 of which are blue, and observing the colour of the balls Rolling a die 15 times and observing the number of spots Drawing 3 balls with replacement from a box that contains 10 balls, 6 of which are red and 4 of which are blue, and observing the colour of the balls
14

Activity

Rolling a die 15 times and observing whether the number obtained is even or odd The experiment consists of n repeated trials, n = 0, 1,.. yes, n = 15 Each trial results in an outcome that may be classified as a success or a failure yes, either even or odd The probability of a success, denoted by p, remains constant from trial to trial yes, if we define the success as even, then p = 3/6 The repeated trials are independent Yes, whatever we obtain on one roll does not affect the probabilities of the other rolls of the die 15 THIS IS THEREFORE A BINOMIAL EXPERIMENT

Drawing 3 balls without replacement from a box that contains 10 balls, 6 of which are red and 4 of which are blue, and observing the colour of the balls The experiment consists of n repeated trials, n = 0, 1, yes, n = 3 Each trial results in an outcome that may be classified as a success or a failure yes, either red or blue The probability of a success, denoted by p, remains constant from trial to trial NO! we are sampling without replacement, so the probabilities will change from one trial to the other The repeated trials are independent NO! what we obtain on one draw will change the probabilities of the next draw THIS IS THEREFORE NOT A BINOMIAL EXPERIMENT
16

Rolling a die 15 times and observing the number of spots The experiment consists of n repeated trials, n = 0, 1,.. yes, n = 15 Each trial results in an outcome that may be classified as a success or a failure NO! One of SIX outcomes is possible The probability of a success, denoted by p, remains constant from trial to trial yes, if we define the success as any one of the faces, then p = 1/6 The repeated trials are independent Yes, whatever we obtain on one roll does not affect the probabilities of the other rolls of the die THIS IS THEREFORE NOT A BINOMIAL EXPERIMENT 17

Drawing 3 balls with replacement from a box that contains 10 balls, 6 of which are red and 4 of which are blue, and observing the colour of the balls The experiment consists of n repeated trials, n = 0, 1, yes, n = 3 Each trial results in an outcome that may be classified as a success or a failure yes, either red or blue The probability of a success, denoted by p, remains constant from trial to trial Yes, we are now sampling WITH replacement, so the probability of a blue ball is 4/10 and the probability of a red ball is 6/10 on each pick The repeated trials are independent Yes, what is obtained on one draw does not affect what happens on the other THIS IS THEREFORE A BINOMIAL EXPERIMENT
18

The formula is developed out of our attempt to put meaning to the question What does P(X = r) mean? P(X = r) P(r successes in n trials) P(r successes and n-r failures) The event of r successes and n-r failures can occur in several ways; each way is called a combination of r successes and n-r failures.

The Binomial Distribution Formula

In our example, suppose we wanted to know P(X=2) : in other words, when tossing the coin 10 times, what is the probability that we get 2 Heads? If we get 2 Heads (r successes), that means we are getting 8 Tails (n-r failures)
19

The Binomial Distribution Formula


If X is a random variable that follows a Binomial Distribution, then P(X = r) = nCr (p)r (q)n-r
n = no of trials of the experiment p = probability of a success q = probability of a failure

NOTE: Recognise the Combination Formula we previously introduced?

20

So, back to Our Example.


If you toss a coin 10 times, what is the probability that you get 2 Heads?
We have already established that this represents a Binomial Experiment. Define X as the random variable the number of Heads X therefore follows a Binomial Distribution in other words, P(X = r) = nCr (p)r (q)n-r n = 10 (we are tossing the coin 10 times) We define a success as getting Heads p = probability of a success = Q = probability of a failure (in this case, getting tails) = P(X = 2) = 10C2 (0.5)2 (0.5)10-2 =
21

P(X = r) = nCr (p)r (q)n-r

The Parameters of the Binomial Distribution

n and p are called the parameters of the Binomial Distribution Without values for n and p we cannot use the Binomial Distribution formula to compute P(X = r). We therefore say that if the random variable X follows a Binomial Distribution:

X Bin (n,p) P(X = r) = nCr (p)r (q)n-r

22

Moments of the Binomial Variable


Like any other random variable, we are interested in the Expectation and Variance of the Binomial Variable
These are also called the Moments of First and Second Order

Expectation = E(X) = np Variance 2 = Var(X) = npq Standard Deviation = ( npq)

23

Activity
Two women are having babies. What is the probability that they both have girls?
Step 1: do we have a Binomial Experiment? Step 2: Define the Random Variable and work out the parameters of the distribution Step 3: Calculate the required Probabilities

24

Step 1: Do we have a Binomial Experiment?


Two women are having babies. What is the probability that they both have girls?
The experiment (having the baby) consists of n repeated trials, n = 0, 1, 2, ...(n = 2) Each trial results in an outcome that may be classified as a success or a failure (define girl as success, boy as failure The probability of a success, denoted by p, remains constant from trial to trial (p = probability of having a girl = 1/2) The repeated trials are independent (yes) THIS IS A BINOMIAL EXPERIMENT
25

Step 2: Define the Random Variable, and the parameters of the Distribution
Two women are having babies. What is the probability that they both have girls? Define X as the random variable number of women having a girl X Bin (n,p) P(X = r) = nCr (p)r (q)n-r We already worked out that n=2, and p=0.5 If p=0.5, then q = 1-0.5 = 0.5 Therefore, X Bin (2,0.5) P(X = r) = 2Cr (0.5)r (0.5)2-r

26

Step 3: Calculate the Required Probabilities


Two women are having babies. What is the probability that they both have girls? Define X as the random variable number of women having a girl

X Bin (2,0.5)
P(X = r) = 2Cr (0.5)r (0.5)2-r We want to calculate P(X = 2) P(X = 2) = 2C2 (0.5)2 (0.5)2-2 = 2C2 (0.5)2 (0.5)0 = 1/4

27

Activity
The proportion of allergy patients who show a positive reaction to a certain skin test is 0.66. An average of five patients a day are tested at the allergy clinic. Calculate the probability that among any five patients three will give a positive reaction.
Step 1: do we have a Binomial Experiment? Step 2: Define the Random Variable and work out the parameters of the distribution Step 3: Calculate the required Probabilities
28

Step 1: Do we have a Binomial Experiment?


The proportion of allergy patients who show a positive reaction to a certain skin test is 0.66. An average of five patients a day are tested at the allergy clinic. Calculate the probability that among any five patients three will give a positive reaction.

The experiment (testing for the allergy) consists of n repeated trials, n = 0, 1, 2, ...(n = 5) Each trial results in an outcome that may be classified as a success or a failure (define positive reaction as success, negative reaction as failure) The probability of a success, denoted by p, remains constant from trial to trial (p = probability of positive reaction = 0.66) The repeated trials are independent (yes) THIS IS A BINOMIAL EXPERIMENT 29

Step 2: Define the Random Variable, and work out the parameters of the Distribution
The proportion of allergy patients who show a positive reaction to a certain skin test is 0.66. An average of five patients a day are tested at the allergy clinic. Calculate the probability that among any five patients three will give a positive reaction. Define X as the random variable number of patients having positive reaction to the skin test X Bin (n,p) P(X = r) = nCr (p)r (q)n-r We already worked out that n=5, and p=0.66 If p=0.66, then q = 1-0.66 = 0.34 Therefore, X Bin (5,0.66) P(X = r) = 5Cr (0.66)r (0.34)5-r

30

Step 3: Calculate the Required Probabilities


The proportion of allergy patients who show a positive reaction to a certain skin test is 0.66. An average of five patients a day are tested at the allergy clinic. Calculate the probability that among any five patients three will give a positive reaction. Define X as the random variable number of patients having positive reaction to the skin test X Bin (5,0.66) P(X = r) = 5Cr (0.66)r (0.34)5-r
We want to calculate P(X = 3)

P(X = 3) = 5C3 (0.66)3 (0.34)5-3 = 5C3 (0.66)3 (0.34)2 = 0.33

31

Please Note:
The best way to understand distributions such as these is to PRACTICE
The PS Mann Chapter 5 contains many, many questions on these probability distributions You are strongly advised to work questions from this Chapter
32

The Poisson Distribution


This is another important probability distribution of a discrete random variable that has a large number of applications

It is applied to experiments with random and independent occurrences. The occurrences are always considered with respect to an interval
The interval may be a time interval, a space interval, or a volume interval
33

Conditions to Apply the Poisson Distribution


The following three conditions must be satisfied to apply the Poisson probability distribution: X is a discrete random variable A particular occurrence is recorded in a particular interval The occurrences are random The occurrences are independent The Poisson Process fits events that are randomly scattered over time and/or space (i.e. you cannot predict when or where an event will occur). 34

Examples
The number of phone calls received by a household during a given day The receiving of the call is the occurrence, the interval is one day, the occurrences are random The number of accidents that occur on a given highway during a one week period An accident is an occurrence, the interval is 1 week, the occurrences are random The number of defective items in the next 100 items manufactured on a machine A defective item is an occurrence, the interval is every 100 items, the occurences are random
35

In Contrast.
The arrival of patients at a doctors office: these are non-random if the patients have to make appointments to see the doctor

The arrival of commercial planes at an airport: these are non-random since planes are scheduled to arrive at certain times

36

The Poisson Distribution Formula


In the terminology of the Poisson Distribution, the average number of occurrences in a given interval is denoted by (greek letter lambda)
The actual number of occurrences in that interval is denoted by r Then, using the Poisson probability distribution, we find the probability of r occurrences during an interval, given that the mean number of occurrences during that interval is
37

If the random variable X follows a Poisson Distribution, this means that X () The probability of r occurrences in an interval is: P( X = r) = e r r = 0, 1, 2, r! where e is approximately the value 2.718 (look for it on your calculator) and is the mean number of
occurrences in that interval

The Poisson Distribution Formula

By this formula, once we know the value of we can compute any probability under the Poisson Distribution is therefore the parameter of the Distribution 38

Moments of the Poisson Distribution


If the random variable X follows a Poisson Distribution: X () P( X = r) = e r r = 0, 1, 2, r! What are the moments of first and second order?
If X Pr(), then: E(X) = Var(X) = SD(X) =
39

Activity
On average, 2 new accounts are opened per day at the UWI branch of Republic Bank Ltd. Find the probability that, on a given day, exactly 6 new accounts will be opened at this branch. Let X represent the number of accounts opened per day the mean number of accounts opened on a given day are 2, therefore = 2 X follows a Poisson Distribution with parameter 3, that is, X (2) P( X = r) = e 2 2 r r = 0, 1, 2, r! Therefore, P(X =6) = e 2 2 6 = 0.120 40 6!

Activity
Suppose that the number of accidents occurring at the Barataria Roundabout in a month averages 3. Find the probability that there will be 5 accidents in November. Let X represent the number of accidents per month the mean number of occurrences in a given time interval, here in a given month, = 3 X follows a Poisson Distribution with parameter 3, that is, X (3) P( X = r) = e 3 3 r r = 0, 1, 2, r! Therefore, P(X = 5) = e 3 3 5 = 0.101 5!

41

Activity
Suppose that the number of accidents occurring at the Barataria Roundabout in a month averages 3. Find the probability that there will at most 3 accidents in November. X is discrete, so it takes countable values 0, 1, 2 At most means, everything up to and including 3 P(X 3) = P( X = 0 OR 1 OR 2 OR 3) = P(X = 0) + P(X = 1) + P(X = 2) + P(X = 3) = e 3 3 0 + e 3 3 1 + e 3 3 2 + e 3 3 3 0! 1! 2! 3! = .0498 + .1494 + .2241 + .2241 = .6474

42

Activity
Suppose that the number of accidents occurring at the Barataria Roundabout in a month averages 3. Find the probability that there will at least 4 accidents in November. At Least means 4 OR 5 OR 6 Or 7 How do we calculate this? We know that X is a discrete random variable with a discrete (Poisson) probability distribution All probabilities must therefore add to 1 Can we not then use the result we previously calculated? P(X 4) = 1 P(X 3) = 1- 0.6474 = 0.3526
43

The Approximation Of The Binomial Distribution By The Poisson Distribution. When q is approximately equal to 1, we can be reasonably accurate in using the Poisson Distribution as an approximation to the Binomial Distribution. The Poisson Distribution yields a good approximation to the Binomial Distribution when n is large and p is relatively small (i.e. p close to zero). To execute the approximation we simply set the parameter = np and substitute into the Poisson Distribution Formula.
44

Comparative Probabilities of P(X = 50) when p = 0.02 for three values of n viz. 50, 100 and 200
n 50 100 200
Binomial

Poisson

Error

% Error

0.0027 0.0353 0.1579

0.0031 0.0361 0.1563

.0004 .0008 .0016

15 2 1

Clearly, as n gets larger, the two yield approximately the same values This approximation of the Poisson to the Binomial was of great practical importance before the advent of the electronic computer. Now it is less important but it is still intellectually interesting We will soon consider the much more appealing approximation of the Binomial distribution by the Normal 45 Distribution

End of Lecture
We have reviewed two Discrete Distributions: the Binomial Distribution and the Poisson Distribution The best way to understand distributions such as these is to PRACTICE The PS Mann Chapter 5 contains many, many questions on these two probability distributions: you are STRONGLY advised to work questions from this Chapter In the next lecture we will move on to Continuous Probability Distributions
46

Vous aimerez peut-être aussi