Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 5 Discrete Random Variables Statistics for Business 1.

Similar presentations


Presentation on theme: "Chapter 5 Discrete Random Variables Statistics for Business 1."— Presentation transcript:

1 Chapter 5 Discrete Random Variables Statistics for Business 1

2 Discrete Random Variables 5.1 Two Types of Random Variables 5.2 Discrete Probability Distributions 5.3 The Binomial Distribution 5.4The Poisson Distribution

3 Two Types of Random Variables Random variable: a variable ( qualitative or quantitative attribute that characterizes a population/sample ) that assumes numerical values which are determined by the outcome of an experiment – Discrete – Continuous Discrete random variable: Possible values can be counted or listed, e.g. – The number obtained from the throw of a die – The number of children in a family – The number of students in a class

4 Random Variables Continued Continuous random variable: May assume any numerical value in one or more intervals, e.g. – The waiting time for the next bus at a bus stop – The interest rate charged on a business loan – Distance in meters a student has to walk per day

5 Discrete Probability Distributions The probability distribution of a discrete random variable is a table, graph or formula that gives the probability associated with each possible value that the variable can assume Notation: Denote the values of the random variable by x and the value’s associated probability by p(x)

6 Discrete Probability Distribution Properties 1.For any value x of the random variable, p(x)  0 2.The probabilities of all the events in the sample space must sum to 1, that is…

7 You are going to flip a coin three times. Let X be the number of heads appear in these 3 times. Let H represent the outcome of a head and T the outcome of a tail. The possible outcomes for such an experiment: TTT, TTH, THT, THH, HTT, HTH, HHT, HHH Thus the possible values of X (number of heads) are 0,1,2,3. Discrete random variable: an example X is a discrete random variable.

8 The probability distribution of X xProbability P(X=x) 01/8 13/8 2 31/8 This is an example of Binomial Distribution as explained later. What is the chance of having 3 heads? What is the chance of having 3 heads? 1/8 What is the chance of having 1 heads? What is the chance of having 1 heads? 3/8 For a fair coin:

9 Example: Number of TV Sold in a Day Let x be the random variable of the number of TV sold per day in an appliance store – x has values x = 0, 1, 2, 3, 4, 5, 6 Given: Frequency distribution of sales history over past 100 days – Let f be the number of days (of the past 100) during which x number of TV were sold # TV sold, x FrequencyRelative Frequency 0f(0) =33/100 = 0.03 1f(1) =2020/100 = 0.20 2f(2) =500.50 3f(3) =200.20 4f(4) =50.05 5f(5) = 20.02 1001.00

10 Example Continued Interpret the relative frequencies as probabilities – So for any value x, f(x)/n = p(x) – Assuming that sales remain stable over time Number of TV Sold in a store per day TV sold, x Probability, p(x) 0p(0) = 0.03 1p(1) = 0.20 2p(2) = 0.50 3p(3) = 0.20 4p(4) = 0.05 5p(5) = 0.02 1.00

11 Example Continued What is the chance that fewer than 2 TV will be sold per day? – p(x < 2)= p(x = 0 or x = 1) = p(x = 0) + p(x = 1) = 0.03 + 0.20 = 0.23 What is the chance that three or more TV will be sold per day? – p(x ≥ 3)= p(x = 3, 4, or 5) = p(x = 3) + p(x = 4) + p(x = 5) = 0.20 + 0.05 + 0.02 = 0.27 Using the addition rule for the mutually exclusive values of the random variable.

12 Expected Value of a Discrete Random Variable The mean or expected value of a discrete random variable X is:  is the value expected (or expectation value) to occur in the long run and on average

13 Example: Number of TV Sold per day How many TV should be expected to be sold in a day? – Calculate the expected value of the number of TV sold, µ X On average, expect to sell 2.1 TVs per day # of TV, x Probability, p(x) x p(x) 0p(0) = 0.030  0.03 = 0.00 1p(1) = 0.201  0.20 = 0.20 2p(2) = 0.502  0.50 = 1.00 3p(3) = 0.203  0.20 = 0.60 4p(4) = 0.054  0.05 = 0.20 5p(5) = 0.025  0.02 = 0.10 1.00 2.10

14 Variance The variance is the average of the squared deviations of the different values of the random variable from the expected value The variance of a discrete random variable is:

15 Standard Deviation The standard deviation is the square root of the variance The variance and standard deviation measure the spread of the values of the random variable from their expected value

16 Radios, xProbability, p(x) (x -  X ) 2 p(x) 0p(0) = 0.03(0 – 2.1) 2 (0.03) = 0.1323 1p(1) = 0.20(1 – 2.1) 2 (0.20) = 0.2420 2p(2) = 0.50(2 – 2.1) 2 (0.50) = 0.0050 3p(3) = 0.20(3 – 2.1) 2 (0.20) = 0.1620 4p(4) = 0.05(4 – 2.1) 2 (0.05) = 0.1805 5p(5) = 0.02(5 – 2.1) 2 (0.02) = 0.1682 1.00 0.8900 Example: Number of TV Sold per day

17 Variance equals 0.8900 Standard deviation is the square root of the variance Standard deviation equals 0.9434 Example: Number of TV Sold per day

18 Flipping a coin three times E(X) = 0 x 1/8 + 1 x 3/8 + 2 x 3/8 + 3 x 1/8 = 12/8 = 1.5 xProbability P(X=x) 01/8 13/8 2 31/8 What is the & of X? What is the variance & standard deviation of X? Number of heads appeared

19 Permutation By the PERMUTATIONS of the letters abc we mean all of their possible arrangements: abc, acb, bac, bca, cab, cba; where ab means that a was chosen first and b second; ba means that b was chosen first and a second; and so on. There are 6, or 3! = 3*2*1, possible arrangements. In general, n P k means "the number of permutations of n different things taken k at a time." n P k = n(n − 1)(n − 2)· · · to k factors = n! (n − k)!

20 Combination In permutations, the order is important -- we count abc as different from bca. But in combinations we are concerned only that a, b, and c have been selected. abc and bca are the same combination. n C k = n P k / k! Example: How many combinations are there of 5 things taken 4 at a time? Solution. 5 C 4 = 5· 4· 3· 2 /(1· 2· 3· 4) = 5

21 The Binomial Distribution A binomial experiment is 1.Experiment consists of n identical trials 2.Each trial results in 2 possible outcomes: “success” or “failure” 3.Probability of success, p, is constant from trial to trial –The probability of failure, q, is 1 – p 4.Trials are independent If X is the total number of successes in n trials of a binomial experiment, then X is a binomial random variable. Notice that X can have any value from 0 to n.

22 Binomial Probability Distribution n n is the number of trials (experiments) x x is a variable (may be 1, 2, …n)   is the probability of success on each trial n! x!(n-x)! is the (# of) combinations of arranging x successes in n trials.

23 Binomial Distribution Continued For a binomial random variable x, the probability of x successes in n trials is given by the binomial distribution: – n! is read as “n factorial” and n! = n × (n-1) × (n-2) ×... × 1 – 0! =1 – Not defined for negative numbers or fractions – And p + q = 1

24 Examples Roll a standard die ten times and count the number of sixes. The distribution of this random number is a binomial distribution with n = 10 and p = 1/6. Flip a coin three times and count the number of heads. The distribution of this random number is a binomial distribution with n = 3 and p = 1/2.

25 Flipping a coin three times The outcome of head/tail is a The outcome of head/tail is a binomial random variable. For a fair coin, p = q = 0.5. The probility of having x heads in 3 trials is: xProbability P(X=x) 01/8 13/8 2 31/8 P(x) = 3 C x / 8

26 26

27 The Department of Labor reports that 20% of the workforce in a city is unemployed. In an interviewed with 14 workers in that city: What is the probability that exactly three are unemployed? and, at least three are unemployed? Example:

28 The probability at least one is unemployed? Example of Binomial Probability Distribution cont.

29 Example: Binomial Distribution n = 4, p = 0.1

30 Binomial Probability Table values of p (.05 to.50) Table 5.7(a) for n = 4, with x = 2 and p = 0.1 P(x = 2) = 0.0486 p = 0.1

31 Example 5.10: Incidence of Nausea after Treatment Suppose 10% of the patients will experience nausea following treatment with a cancer drug. Take a sample of 4 patients, all treated with the same cancer drug. Let X be the number of patients, who experience nausea after the treatment. Find the probability that 0 of the 4 patients treated will experience nausea Given: n = 4, p = 0.1, with X = 0 Then: q = 1 – p = 1 – 0.1 = 0.9

32 Example 5.10 Continued

33 Example 5.11: Incidence of Nausea after Treatment x = number of patients who will experience nausea following treatment with the drug out of the 4 patients tested Find the probability that at least 3 of the 4 patients treated will experience nausea Set x = 3, n = 4, p = 0.1, so q = 1 – p = 1 – 0.1 = 0.9 Then: Using the addition rule for the mutually exclusive values of the binomial random variable with a binomial table

34 Several Binomial Distributions

35 Mean and Variance of a Binomial Random Variable If x is a binomial random variable with parameters n and p (so q = 1 – p), then – Mean  = np – Variance  2 x = npq – Standard deviation  x = square root npq

36 Back to Example 5.11 Of 4 randomly selected patients, how many should be expected to experience nausea after treatment? – Given: n = 4, p = 0.1 – Then µ X = np = 4  0.1 = 0.4 – So expect 0.4 of the 4 patients to experience nausea If at least three of four patients experienced nausea, this would be many more than the 0.4 that are expected

37 What happen if… We don’t know the probability for certain outcome to occur But we know the average number for such outcome to occur in – a fixed period of time, or – an interval of any kind Example: an earthquake larger than scale 8 occurs in Japan on average once in 100 years. 37 Remember  = np;  and p are related.

38 * The experiment results in outcomes that can be classified as successes or failures. * The experiment results in outcomes that can be classified as successes or failures. * The average number of successes (μ) that occurs in a specified region (in time or space) is known. * The average number of successes (μ) that occurs in a specified region (in time or space) is known. * The probability that a success will occur is proportional to the size of the region. * The probability that a success will occur is proportional to the size of the region. * The probability that a success will occur in an extremely small region is virtually zero. * The probability that a success will occur in an extremely small region is virtually zero. * The probability of an event in one interval is independent of the probability of an event in any other non-overlapping interval. * The probability of an event in one interval is independent of the probability of an event in any other non-overlapping interval. Poisson experiment is …

39 The Poisson Distribution Consider the number of times an event occurs over an interval of time or space, and assume that 1.The probability of occurrence is the same for any intervals of equal length 2.The occurrence in any interval is independent of an occurrence in any non-overlapping interval If X = the number of occurrences in a specified interval, then X is a Poisson random variable

40 The Poisson Distribution Continued Suppose μ is the mean or expected number of occurrences during a specified interval The probability of x occurrences in the interval when μ are expected is described by the Poisson distribution – where x can take any of the values x = 0,1,2,3, … – and e = 2.71828 (e is the base of the natural log)

41 Example The average number of cars sold by the Acme Car Company is 2 cars per day. What is the probability that exactly 3 cars will be sold tomorrow? Solution: This is a Poisson experiment in which we know the following: μ = 2; since 2 cars are sold per day, on average. x = 3; since we want to find the likelihood that 3 cars will be sold tomorrow. We plug these values into the Poisson formula as follows: = 0.180

42 Suppose the average number of tigers seen on a day trip to a national forest is 5. What is the probability that tourists will see fewer than four tigers on the next 1-day trip? To solve this problem, we need to find the probability that tourists will see 0, 1, 2, or 3 tigers. Thus, we need to calculate the sum of four probabilities: P(0; 5) + P(1; 5) + P(2; 5) + P(3; 5). To compute this sum, we use the Poisson formula: P(x < 3, 5) = P(0; 5) + P(1; 5) + P(2; 5) + P(3; 5) = [ (e -5 )(5 0 ) / 0! ] + [ (e -5 )(5 1 ) / 1! ] + [ (e -5 )(5 2 ) / 2! ] + [ (e -5 )(5 3 ) / 3! ] = [ 0.0067 ] + [ 0.03369 ] + [ 0.084224 ] + [ 0.140375 ] = 0.2650 Example

43 More examples of Poisson Distribution The number of people killed by accidents each year in a country. The number of earthquakes recorded per year in the world. The number of people who travel between Zhuhai and Hong Kong each week. The number of accidents involved by a driver per 100,000 km travelled. The number of trees per square mile in a forest. The number of mutations in a given stretch of DNA after a fixed dosage of radiation.

44 Example 5.13: ATC Center Errors An air traffic control (ATC) center has been averaging 20.8 errors per year and lately has been making 3 errors per week Let x be the number of errors made by the ATC center during one week Given: µ = 20.8 errors per year Then: µ = 0.4 errors per week – There are 52 weeks per year so µ for a week is: – µ = (20.8 errors/year)/(52 weeks/year) = 0.4 errors/week

45 Example 5.13: ATC Center Errors Continued Find the probability that 3 errors (x =3) will occur in a week – Want p(x = 3) when µ = 0.4 Find the probability that no errors (x = 0) will occur in a week – Want p(x = 0) when µ = 0.4

46 Poisson Probability Table , Mean number of Occurrences  =0.4 Table 5.9

47 Poisson Probability Calculations

48 Example: Poisson Distribution  = 0.4

49 Mean and Variance of a Poisson Random Variable If x is a Poisson random variable with parameter , then – Mean  x =  – Variance  2 x =  – Standard deviation  x is square root of variance  2 x

50 Several Poisson Distributions

51 Back to Example 5.13 In the ATC center situation, 20.8 errors occurred on average per year Assume that the number x of errors during any span of time follows a Poisson distribution for that time span Per week, the parameters of the Poisson distribution are: – mean µ = 0.4 errors/week – standard deviation σ = 0.6325 errors/week

52 We can deduce the Poisson distribution from the binomial distribution by using From binomial to Poisson Distribution where is the mean & p is the the probability of success 1 as n becomes very very large

53 The sum of the probabilities P(X = r) or simply P(r) for r = 0, 1, 2, … is 1. Sum of Poisson Distribution

54 Chapter Five-Discrete Random Variables GOALS After you completed this chapter, you will be able to: ONE Define the terms random variable and probability distribution. TWO Distinguish between a discrete and continuous probability distributions. THREE Calculate the mean, variance, and standard deviation from a discrete probability distribution.

55 FOUR Compute probabilities, mean and variance of binomial probability distributed random variable. FIVE Compute probabilities, mean and variance of Poisson probability distributed random variable. Chapter Five-Discrete Random Variables


Download ppt "Chapter 5 Discrete Random Variables Statistics for Business 1."

Similar presentations


Ads by Google