Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-1 Lesson 4: Discrete Probability Distributions.

Similar presentations


Presentation on theme: "Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-1 Lesson 4: Discrete Probability Distributions."— Presentation transcript:

1 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-1 Lesson 4: Discrete Probability Distributions

2 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-2 Outline Random variables and probability distribution Features of univariate probability distribution Features of bivariate probability distribution Marginal distribution and Conditional distribution Expectation and conditional expectation Variance, Covariance and Correlation Coefficient Binomial Probability Distribution Hypergeometric Probability Distribution Poisson Probability Distribution

3 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-3 Random Variables and probability distribution A random variable is a numerical value determined by the outcome of an experiment. A random variable is often denoted by a capital letter, e.g., X or Y. A probability distribution is the listing of all possible outcomes of an experiment and the corresponding probability.

4 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-4 Types of Probability Distributions A discrete probability distribution can assume only certain outcomes (need not be finite) – for random variables that take discrete values. The number of students in a class. The number of children in a family. A continuous probability distribution can assume an infinite number of values within a given range – for random variables that take continuous values. The distance students travel to class. The time it takes an executive to drive to work. The amount of money spent on your last haircut.

5 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-5 Types of Probability Distributions Number of random variablesJoint distribution 1Univariate probability distribution 2Bivariate probability distribution 3Trivariate probability distribution …… nMultivariate probability distribution Probability distribution may be classified according to the number of random variables it describes.

6 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-6 Features of a Univariate Discrete Distribution Let x 1,…,x N be the list of all possible outcomes (N of them). The main features of a discrete probability distribution are: The probability of a particular outcome, P(x i ), is between 0 and 1.00. The sum of the probabilities of the various outcomes is 1.00. That is, P(x 1 ) + … + P(x N ) = 1 The outcomes are mutually exclusive. That is, P(x 1 and x 2 ) = 0 and P(x 1 or x 2 ) = P(x 1 )+ P(x 2 ) Generally, for all i not equal to k. P(x i and x k ) = 0. P(x i or x k ) = P(x i )+ P(x k ) OutcomeProb. x1x1 P(x 1 ) x2x2 P(x 2 ) …… xNxN P(x N )

7 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-7 Features of a Univariate Discrete Distribution xProb. 10.2 20.3 30.1 10.4 Can the following be a probability distribution of a random variable? xProb. 10.6 20.3 30.1 eventProb. 1 or 20.6 2 or 30.3 3 or 10.1

8 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-8 EXAMPLE: Univariate probability distribution Consider a random experiment in which a coin is tossed three times. Let x be the number of heads. Let H represent the outcome of a head and T the outcome of a tail. The possible outcomes for such an experiment will be: TTT, TTH, THT, THH, HTT, HTH, HHT, HHH. Thus the possible values of x (number of heads) are From the definition of a random variable, x as defined in this experiment, is a random variable. P(x=0) =1/8 P(x=1) =3/8 P(x=2) =3/8 P(x=3) =1/8 If the coin is fair x=0: TTT x=1: TTH, THT, HTT x=2: THH, HTH, HHT x=3: HHH

9 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-9 Features of a Bivariate Discrete Distribution If X and Y are discrete random variables, we may define their joint probability function as P XY (x i,y i ) Let (x 1,…,x R ) and (y 1,…,y S ) be the list of all possible outcomes for X and Y respectively. The main features of a bivariate discrete probability distribution are: The probability of a particular outcome, P XY (x i,y i ) is between 0 and 1. The sum of the probabilities of the various outcomes is 1.00. That is, P XY (x 1,y 1 ) + P XY (x 2,y 1 ) +…+ P XY (x R,y 1 ) + + … + P XY (x R,y S ) = 1 The outcomes are mutually exclusive. That is, if x i not equal to x k, or y i not equal to y k P XY ((x i,y i ) and (x k,y k )) = 0 and P XY ((x i,y i ) or (x k,y k )) = P XY (x i,y i ) + P XY (x k,y k )

10 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-10 Example: Bivariate Discrete Distribution y1y1 y2y2 y3y3 y4y4 x1x1 P(x 1,y 1 )P(x 1,y 2 )P(x 1,y 3 )P(x 1,y 4 ) x2x2 P(x 2,y 1 )P(x 2,y 2 )P(x 2,y 3 )P(x 2,y 4 ) x3x3 P(x 3,y 1 )P(x 3,y 2 )P(x 3,y 3 )P(x 3,y 4 ) X takes 3 possible values and Y takes 4 possible values.

11 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-11 EXAMPLE: Bivariate distribution RainyNot RainyTotals HSI falls0.150.40.55 HSI rises0.20.250.45 Totals0.350.651.0 The joint distribution of the movement of Hang Seng Index (HSI) and weather is shown in the following table.

12 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-12 EXAMPLE: Bivariate distribution RainyNot RainyTotals HSI falls0a HSI rises0b Totals0 The joint distribution of the movement of Hang Seng Index (HSI) and weather is shown in the following table. P X|Y (x | y) = P(X = x | Y = y)=P(x,y)/P(y) if P(Y = y) > 0 P X|Y (x | y) =0 if P(Y = y) = 0 P(HSI falls|Rainy) = P(HSI falls, Rainy) / P(Rainy)= 0/0 Suppose ….. Forcing P(HSI falls|Rainy) in the definition eliminates the difficulty in interpreting 0/0.

13 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-13 Marginal Distributions The marginal probability function of X. P X (x) =  y P XY (x, y) = P XY (x, y 1 ) +P XY (x, y 2 ) +…+ P XY (x, y n ) P(HSI falls)= P(HSI falls and rainy) + P(HSI falls and not rainy) P(HSI rises)= P(HSI rises and rainy) + P(HSI rises and not rainy) The double sum  x  y P XY (x, y) = P(HSI falls and rainy) + P(HSI falls and not rainy)+ P(HSI rises and rainy) + P(HSI rises and not rainy) = P(HSI falls)+P(HSI rises)= 1 Y RainyNot RainyTotals XHSI falls0.150.40.55 HSI rises0.20.250.45 Totals0.350.651.0

14 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-14 Marginal Distributions The marginal probability function of X.  y P XY (x, y) = P X (x). The marginal probability function of Y.  x P XY (x, y) = P Y (y). The double sum  y  x P XY (x, y) = 1 Y RainyNot RainyTotals XHSI falls0.150.40.55 HSI rises0.20.250.45 Totals0.350.651.0

15 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-15 Conditional Distributions The conditional probability function of X given Y: P X|Y (x | y) = P(X = x | Y = y) = P XY (x,y)/P Y (y) if P(Y = y) > 0 P X|Y (x | y) =0 if P(Y = y) = 0 Y RainyNot RainyTotals XHSI falls0.150.40.55 HSI rises0.20.250.45 Totals0.350.651.0 Note that P X|Y (x | y) when P(Y = y) = 0 is undefined using the top formula.

16 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-16 Conditional Distributions For each fixed y this is a probability function for X, i.e. the conditional probability function is non-negative and  X P X|Y (x | y) = P X|Y (x 1 | y)+ P X|Y (x 2 | y) = P X,Y (x 1, y)/ P Y (y) + P X,Y (x 2, y)/ P Y (y) =[P X,Y (x 1, y) + P X,Y (x 2, y)]/ P Y (y) =1. Y RainyNot RainyTotals XHSI falls0.150.40.55 HSI rises0.20.250.45 Totals0.350.651.0

17 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-17 Conditional Distributions The conditional probability function of X given Y: P X|Y (x | y) = P(X = x | Y = y) if P(Y = y) > 0 P X|Y (x | y) =0 if P(Y = y) = 0 For each fixed y this is a probability function for X, i.e. the conditional probability function is non-negative and  X P X|Y (x | y) = 1. By the definition of conditional probability, P X|Y (x | y) = P X,Y (x, y)/ P Y (y). E.g., P(HSI rises| Rainy) = 0.2/0.35. When X and Y are independent, P X|Y (x | y) is equal to P X (x). Y RainyNot RainyTotals XHSI falls0.150.40.55 HSI rises0.20.250.45 Totals0.350.651.0

18 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-18 Example: Conditional Distributions Y RainyNot RainyTotalsP(X|Rainy)P(X| Not Rainy) XHSI falls0.150.40.550.15/0.350.4/0.65 HSI rises0.20.250.450.2/0.350.25/0.65 Totals0.350.651.0 P(Y|HSI falls)0.15/0.550.4/0.551.0 P(Y|HSI rises)0.2/0.450.25/0.451.0 P X|Y (x | y) = P X,Y (x, y)/ P Y (y). P Y|X (y | x) = P X,Y (x, y)/ P X (x).

19 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-19 Transformation of Random variables A transformation of random variable(s) results in a new random variable. For example, if X and Y are random variables, the following are also random variables: Z=2X Z=3+2X Z=X 2 Z=log(X) Z=X+Y Z=X 2 +Y 2

20 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-20 The Expectation (mean) of a Discrete Probability Distribution The expectation (mean): reports the central location of the data. is the long-run average value of the random variable. That is, the average of the outcomes of many experiments. is also referred to as its expected value, E(X), in a probability distribution. Is also known as first moment of a random variable. is a weighted average.

21 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-21 Moments of a random variable E(X)First moment E(X 2 )Second moment The n-th moment is defined as the expectation of the n-th power of a random variable: E(X n ) E(X-  ) 2 Second centralized moment E(X-  ) 3 Third centralized moment The n-th centralized moment is defined as: E[X-E(X)] n

22 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-22 The Expectation (Mean) of Discrete Probability Distribution For univariate probability distribution, the expectation or mean E(X) is computed by the formula: For bivariate probability distribution, the the expectation or mean E(X) is computed by the formula:

23 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-23 Conditional Mean of Bivariate Discrete Probability Distribution For bivariate probability distribution, the conditional expectation or conditional mean E(X|Y) is computed by the formula: Unconditional expectation or mean of X, E(X)

24 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-24 Expectation of a linear transformed random variable If a and b are constants and X is a random variable, then E(a) = a E(bX) = bE(X) E(a+bX) = a+bE(X)

25 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-25 The Variance of a Discrete Probability Distribution The variance measures the amount of spread (variation) of a distribution. The variance of a discrete distribution is denoted by the Greek letter  2 (sigma squared). The standard deviation is the square root of  2.

26 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-26 The Variance of a Discrete Probability Distribution For univariate discrete probability distribution For bivariate discrete probability distribution

27 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-27 Variance of a linear transformed random variable If a and b are constants and X is a random variable, then V(a) = 0 V(bX) = b 2 V(X) V(a+bX) = b 2 V(X)

28 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-28 The Covariance of a Bivariate Discrete Probability Distribution Covariance measures how two random variables co-vary.

29 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-29 Covariance of linear transformed random variables If a and b are constants and X is a random variable, then C(a,b) = 0 C(a,bX) = 0 C(a+bX,Y) = bC(X,Y)

30 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-30 Variance of a sum of random variables If a and b are constants and X and Y are random variables, then V(X+Y) = V(X) + V(Y) + 2C(X,Y) V(aX+bY) =a 2 V(X) + b 2 V(Y) + 2abC(X,Y)

31 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-31 Correlation coefficient The strength of the dependence between X and Y is measured by the correlation coefficient:

32 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-32 EXAMPLE Dan Desch, owner of College Painters, studied his records for the past 20 weeks and reports the following number of houses painted per week:

33 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-33 EXAMPLE Compute the mean and variance of the number of houses painted per week and:

34 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-34 Binomial Probability Distribution The binomial distribution has the following characteristics: An outcome of an experiment is classified into one of two mutually exclusive categories, such as a success or failure. The data collected are the results of counts in a series of trials. The probability of success stays the same for each trial. The trials are independent. For example, tossing an unfair coin three times. H is labeled success and T is labeled failure. The data collected are number of H in the three tosses. The probability of H stays the same for each toss. The results of the tosses are independent.

35 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-35 Binomial Probability Distribution To construct a binomial distribution, let n be the number of trials x be the number of observed successes  be the probability of success on each trial The formula for the binomial probability distribution is: P(x) = n C x  x (1-  ) n-x

36 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-36 The density functions of binomial distributions with n=20 and different success rates p

37 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-37 EXAMPLE x = number of patients who will experience nausea following treatment with Phe-Mycin Find the probability that 2 of the 4 patients treated will experience nausea. n = 4, p = 0.1, q = 1 – p = 1 - 0.1 = 0.9

38 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-38 Binomial Probability Distribution The formula for the binomial probability distribution is: P(x) = n C x  x (1-  ) n-x TTT, TTH, THT, THH, HTT, HTH, HHT, HHH. X=number of heads The coin is fair, i.e., P(head) = 1/2. P(x=0) = 3 C 0 0.5 0 (1- 0.5) 3-0 =3!/(0!3!) (1) (1/8)=1/8 P(x=1) = 3 C 1 0.5 1 (1- 0.5) 3-1 =3!/(1!2!) (1) (1/8)= 3/8 P(x=2) = 3 C 2 0.5 2 (1- 0.5) 3-2 =3!/(2!1!) (1) (1/8)= 3/8 P(x=3) = 3 C 3 0.5 3 (1- 0.5) 3-3 =3!/(3!0!) (1) (1/8)= 1/8 When the coin is not fair, simple counting rule will not work.

39 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-39 Mean & Variance of the Binomial Distribution The mean is found by: The variance is found by:

40 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-40 EXAMPLE The Alabama Department of Labor reports that 20% of the workforce in Mobile is unemployed. From a sample of 14 workers, calculate the following probabilities: Exactly three are unemployed. At least three are unemployed. At least one are unemployed.

41 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-41 EXAMPLE The probability of exactly 3: The probability of at least 3 is: The probability of at least one being unemployed:

42 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-42 EXAMPLE Since  =.2 and n=14. Hence, the mean is:  = n  = 14(.2) = 2.8. The variance is:  2 = n  (1-  ) = (14)(.2)(.8) =2.24.

43 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-43 Finite Population A finite population is a population consisting of a fixed number of known individuals, objects, or measurements. Examples include: The number of students in this class. The number of cars in the parking lot.

44 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-44 Hypergeometric Distribution The hypergeometric distribution has the following characteristics: There are only 2 possible outcomes. The probability of a success is not the same on each trial. It results from a count of the number of successes in a fixed number of trials.

45 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-45 EXAMPLE R1 B1 R2 B2 R2 B2 7/12 5/12 6/11 5/11 7/11 4/11 In a bag containing 7 red chips and 5 blue chips you select 2 chips one after the other without replacement. The probability of a success (red chip) is not the same on each trial.

46 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-46 Hypergeometric Distribution The formula for finding a probability using the hypergeometric distribution is: where N is the size of the population, S is the number of successes in the population, x is the number of successes in a sample of n observations.

47 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-47 Hypergeometric Distribution Use the hypergeometric distribution to find the probability of a specified number of successes or failures if: the sample is selected from a finite population without replacement (recall that a criteria for the binomial distribution is that the probability of success remains the same from trial to trial) the size of the sample n is greater than 5% of the size of the population N.

48 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-48 The density functions of hypergeometric distributions with N=100, n=20 and different success rates p (=S/N).

49 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-49 EXAMPLE: Hypergeometric Distribution The National Air Safety Board has a list of 10 reported safety violations. Suppose only 4 of the reported violations are actual violations and the Safety Board will only be able to investigate five of the violations. What is the probability that three of five violations randomly selected to be investigated are actually violations?

50 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-50 Poisson Probability Distribution The binomial distribution becomes more skewed to the right (positive) as the probability of success become smaller. The limiting form of the binomial distribution where the probability of success  is small and n is large is called the Poisson probability distribution. The formula for the binomial probability distribution is: P(x) = n C x  x (1-  ) n-x

51 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-51 Poisson Probability Distribution The Poisson distribution can be described mathematically using the formula: where  is the mean number of successes in a particular interval of time, e is the constant 2.71828, and x is the number of successes.

52 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-52 Poisson Probability Distribution The mean number of successes  can be determined in binomial situations by n , where n is the number of trials and  the probability of a success. The variance of the Poisson distribution is also equal to n . X, the number of success generally has no specific upper limit. Probability distribution always skewed to the right. Becomes symmetrical when  gets large.

53 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-53 EXAMPLE: Poisson Probability Distribution The Sylvania Urgent Care facility specializes in caring for minor injuries, colds, and flu. For the evening hours of 6- 10 PM the mean number of arrivals is 4.0 per hour. What is the probability of 2 arrivals in an hour?

54 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-54 Example: Poisson Probabilities x = number of Cleveland air traffic control errors during one week  = 0.4 (expected number of errors per week) Find the probability that 3 errors will occur in a week.

55 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-55 Mean and Variance of a Poisson Random Variable If x is a Poisson random variable with parameter , then Standard Deviation Mean Variance

56 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-56 Several Poisson Distributions

57 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-57 What distributions to use? Poisson considers the number of times an event occurs over an INTERVAL of TIME or SPACE. Note that we are not considering a sample of given number of observations. Thus, if we are considering a sample of 10 observations and we are asked to compute the probability of having 6 successes, we should not use Poisson. Instead, we should consider Binomial or Hypergeometric. Hypergeometric consider the number of successes in a sample when the probability of success varies across trials due to “without replacement” sampling strategy. To compute the Hypergeometric probability, one will need to know N and S separately. Suppose we know that the probability of success is 0.3. We are considering a sample of 10 observations and we are asked to compute the probability of having 6 successes. We cannot use Hypergeometric because we do not have N and S separately. Instead, we have to use Binomial.

58 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-58 What distributions to use? Example First, we recognize that it is not Poisson because "4 of the disks are inspected" (i.e., sample size =4). Second, it is sampling without replacement because if we were to inspect four disks for defects, we will not want to sample with replacement. Third, both N (15 hard disks) and S (5 are defective) are given. Hence we will use Hypergeometric. In a shipment of 15 hard disks, 5 are defective. If 4 of the disks are inspected, what is the probability that exactly 1 is defective?

59 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-59 What distributions to use? Example First, we recognize that it is not Poisson because 8 cars are “inspected" (i.e., sample size =8). Second, it is sampling without replacement because if we were to inspect all 8 cars for defects, we will not want to sample with replacement. Third, both N (48 cars) and S (12 have defective radio) are given. Hence we will use Hypergeometric. From an inventory of 48 cars being shipped to local automobile dealers, 12 have had defective radios installed. What is the probability that one particular dealership receiving 8 cars obtains all with defective radios?

60 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-60 What distributions to use? Example First, we recognize that it is likely Poisson because “on a given day”. Second, we are asked to compute the probability of the number of claims larger than some number. There is no limit on the number of claims that can arrive in a given day. Third, “average per day” is given. Hence we will use Poisson. The number of claims for missing baggage for a well-known airline in a small city averages nine per day. What is the probability that, on a given day, there will be fewer than three claims made?

61 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-61 What distributions to use? Example First, we recognize that it is not Poisson because 20 customers place orders (i.e., sample size =20). Second, the probability of drawing a particular type of customers appears the same across trials because “the probability of customers exceeding their credit limit is 0.05”. Hence we will use Binomial. When a customer places an order with Rudy’s on-Line Office Supplies, a computerized accounting information system (AIS) automatically checks to see if the customer has exceeded his or her credit limit. Past records indicate that the probability of customers exceeding their credit limit is 0.05. Suppose that, on a given day, 20 customers place orders. What is the probability that zero customers will exceed their limits?

62 Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-62 - END - Lesson 4: Discrete Probability Distributions


Download ppt "Ka-fu Wong © 2004 ECON1003: Analysis of Economic Data Lesson4-1 Lesson 4: Discrete Probability Distributions."

Similar presentations


Ads by Google