Presentation is loading. Please wait.

Presentation is loading. Please wait.

7-1 Random Variables and Discrete probability Distributions Chapter 7.

Similar presentations


Presentation on theme: "7-1 Random Variables and Discrete probability Distributions Chapter 7."— Presentation transcript:

1 7-1 Random Variables and Discrete probability Distributions Chapter 7

2 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-2 Random Variables A random variable (隨機變數) is a function or rule that assigns a number to each outcome of an experiment. Alternatively, the value of a random variable is a numerical event. A random variable reflects the aspect of a random experiment that is of interest for us. Instead of talking about the coin flipping event as {heads, tails} think of it as “ the number of heads when flipping a coin ” {1, 0} (numerical events)

3 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-3 Two Types of Random Variables There are two types of random variables: Discrete random variable Continuous random variable. Discrete Random Variable (間斷、離散型隨機變數) – one that takes on a countable number of values – E.g. values on the roll of dice: 2, 3, 4, …, 12 Continuous Random Variable (連續型隨機變數) – one whose values are not discrete, not countable – E.g. time (30.1 minutes? 30.10000001 minutes?) Analogy: Integers are Discrete, while Real Numbers are Continuous

4 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-4 A random variable is discrete if it can assume a countable (可數) number of values. A random variable is continuous if it can assume an uncountable (不可數) number of values. 0 1 1/2 1/4 1/16 Continuous random variable After the first value is defined the second value, and any value thereafter are known. Therefore, the number of values is countable After the first value is defined, any number can be the next one Discrete random variable Therefore, the number of values is uncountable 0123... Two Types of Random Variables

5 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-5 Probability Distributions A probability distribution (機率分配) is a table, formula, or graph that describes the values of a random variable and the probability associated with these values. Since we ’ re describing a random variable (which can be discrete or continuous) we have two types of probability distributions: – Discrete Probability Distribution, (this chapter) and – Continuous Probability Distribution (Chapter 8)

6 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-6 Probability Notation An upper-case letter will represent the name of the random variable, usually X. Its lower-case counterpart will represent the value of the random variable. The probability that the random variable X will equal x is: P( X = x ) or more simply P( x )

7 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-7 A table, formula, or graph that lists all possible values a discrete random variable can assume, together with associated probabilities, is called a discrete probability distribution. To calculate the probability that the random variable X assumes the value x, P( X = x), add the probabilities of all the simple events for which X is equal to x, or use probability calculation tools (tree diagram), apply probability definitions Discrete Probability Distributions

8 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-8 Requirements for a Discrete Distribution The probabilities of the values of a discrete random variable may be derived by means of probability tools such as tree diagrams or by applying one of the definitions of probability, so long as these two conditions apply:

9 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-9 In practice, probability distributions can be estimated from relative frequencies. Example 7.1 A survey reveals the following frequencies (1,000s) for the number of color TVs per household. 1,218 ÷ 101,501 = 0.012 e.g. P( X =4) = P(4) = 7,714÷101,501 = 0.076 = 7.6% Discrete Probability Distributions

10 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-10 Example 7.1 The probability distribution can be used to calculate the probability of different events Calculate the probability of the following events: P(The number of color TVs is 3) = P(X=3) =.191 P(The number of color TVs is two or more)= P(X  2) = P(X=2)+P(X=3)+P(X=4)+P(X=5) =.374 +.191 +.076 +.028 =.669

11 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-11 Example 7.1 E.g. what is the probability there is at least one television but no more than three in any given household? P(The number of color TVs is at least one but no more than three ) = P(  X  = P(X=1)+P(X=2)+P(X=3) =.319 +.374 +.191 =.884

12 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-12 Developing a Probability Distribution Probability calculation techniques can be used to develop probability distributions. Example Find the probability distribution of the random variable describing the number of heads that face-up when a coin is flipped twice. Sample space x Probability HH 2 1/4 HT 1 1/4 TH 1 1/4 TT 0 1/4 x p(x) 0 1/4 1 1/2 2 1/4

13 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-13 Example 7.2 A mutual fund sales person knows that there is 20% chance of closing a sale on each call she makes. What is the probability distribution of the number of sales if she plans to call three customers? Let S denote success, i.e. closing a sale P(S)=.20 Thus S C is not closing a sale, and P(S C )=.80 Let X denote the number of sales, X=0,1,2,3.

14 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-14 Solution Use probability rules and trees Define event S = {A sale is made}. P(S)=.2 P(S C )=.8 P(S)=.2 P(S C )=.8 S S S S S S C S S C S S S C S C S C S S S C S S C S C S C S S C S C S C P(S)=.2 P(S C )=.8 P(S)=.2 XP(x) 3.2 3 =.008 23(.032)=.096 13(.128)=.384 0.8 3 =.512 (.2)(.2)(.8)=.032 Example 7.2 Sales Call 1 Sales Call 2 Sales Call 3

15 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-15 Additional Example The number of cars a dealer is selling daily were recorded in the last 100 days. This data was summarized in the table below. Estimate the probability distribution, and determine the probability of selling more than 2 cars a day. Daily sales Frequency 05 115 235 325 420 100 Developing Probability Distribution and Finding the Probability of an Event

16 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-16 0 1 2 3 4 Solution From the table of frequencies we can calculate the relative frequencies, which becomes our estimated probability distribution Daily sales Relative Frequency 05/100=.05 115/100=.15 235/100=.35 325/100=.25 420/100=.20 1.00.05.15.35.25.20 X P(X>2) = P(X=3) + P(X=4) =.25 +.20 =.45 Developing Probability Distribution and Finding the Probability of an Event

17 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-17 Population/Probability Distribution The discrete probability distribution represents a population (母體) Example 7.1 the population of number of TVs per household Example 7.2 the population of sales call outcomes Since we have populations, we can describe them by computing various parameters (參數). E.g. the population mean and population variance.

18 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-18 Population Mean (Expected Value) The population mean (母體平均數) is the weighted average (加權平均) of all of its values. The weights are the probabilities. This parameter is also called the expected value (期 望值) of X and is represented by E(X) or µ. Recall:

19 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-19 Population Variance The population variance (母體變異數) is calculated similarly. It is the weighted average of the squared deviations from the mean. Recall: The standard deviation (標準差) is the same as before:

20 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-20 Example 7.3 Find the mean, variance, and standard deviation for the population of the number of color televisions per household (from Example 7.1) = 2.084

21 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-21 Example 7.3 Find the mean, variance, and standard deviation for the population of the number of color televisions per household (from Example 7.1) = 1.107

22 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-22 Example 7.3 Find the mean, variance, and standard deviation for the population of the number of color televisions per household (from Example 7.1)

23 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-23 Laws of Expected Value  E(c) = c  E(X + c) = E(X) + c  E(cX) = cE(X) Laws of Variance  V(c) = 0  V(X + c) = V(X)  V(cX) = c 2 V(X) Laws of Expected Value and Variance where  X is a random variable  c is a constant

24 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-24 Laws of Expected Value 1. E(c) = c The expected value of a constant (c) is just the value of the constant. 2. E(X + c) = E(X) + c 3. E(cX) = cE(X) We can “ pull ” a constant out of the expected value expression (either as part of a sum with a random variable X or as a coefficient of random variable X).

25 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-25 Example 7.4 The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the mean monthly profit. Describe the problem statement in algebraic terms: sales have a mean of $25,000  E(Sales) = 25,000 profits are calculated by  Profit =.30(Sales) – 6,000

26 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-26 Example 7.4 The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the mean monthly profit. E(Profit) =E[.30(Sales) – 6,000] =E[.30(Sales)] – 6,000[by rule #2. E(X+c)=E(X)+c] =.30E(Sales) – 6,000[by rule #3. E(cX)=cE(X)] =.30(25,000) – 6,000 = 1,500 Thus, the mean monthly profit is $1,500

27 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-27 Laws of Variance 1. V(c) = 0 The variance of a constant (c) is zero. 2. V(X + c) = V(X) The variance of a random variable and a constant is just the variance of the random variable. 3. V(cX) = c 2 V(X) The variance of a random variable and a constant coefficient is the coefficient squared times the variance of the random variable.

28 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-28 Example 7.4 The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the standard deviation of monthly profit. Describe the problem statement in algebraic terms: sales have a standard deviation of $4,000  V(Sales) = 4,000 2 = 16,000,000 (remember the relationship between standard deviation and variance ) profits are calculated by …  Profit =.30(Sales) – 6,000

29 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-29 Example 7.4 The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the standard deviation of monthly profit. The variance of profit = V(Profit) =V[.30(Sales) – 6,000] =V[.30(Sales)][by rule #2. V(X+c)=V(X)] =(.30) 2 V(Sales) [by rule #3. V(cX)=c 2 V(X)] =(.30) 2 (16,000,000) = 1,440,000 Again, standard deviation is the square root of variance, so standard deviation of Profit = (1,440,000) 1/2 = $1,200

30 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-30 Example 7.4 (summary) The monthly sales at a computer store have a mean of $25,000 and a standard deviation of $4,000. Profits are 30% of the sales less fixed costs of $6,000. Find the mean and standard deviation of monthly profits. The mean monthly profit is $1,500 The standard deviation of monthly profit is $1,200

31 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-31 V(X + c) = V(X) V(cX) = c 2 V(X) E(c X ) = cE( X ) E(X + c) = E(X) + c Laws of Expected Value and Variance Solution V(Profit) = V(.30(Sales) – 6,000] = V[(.30)(Sales)] = (.30) 2 V(Sales) = 1,440,000 Profit =.30(Sales) – 6,000 E(Profit) = E[.30(Sales) – 6,000] = E[.30(Sales)] – 6,000 =.30E(Sales) – 6,000 =.(30)(25,000) – 6,000 = 1,500  = [1,440,000] 1/2 = 1,200

32 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-32 Additional Example The total number of cars to be sold next week is described by the following probability distribution Determine the expected value and standard deviation of X, the number of cars sold. x 0 1 2 3 4 p(x).05.15.35.25.20 Laws of Expected Value and Variance

33 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-33 x 0 1 2 3 4 p(x).05.15.35.25.20 Laws of Expected Value and Variance Solution

34 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-34 Additional example - continued With the probability distribution of cars sold per week, assume a salesman earns a fixed weekly wages of $150 plus $200 commission for each car sold. What is his expected wages and the variance of the wages for the week? Solution The weekly wages is Y = 200X + 150 E(Y) = E(200X+150) = 200E(X)+150= 200(2.4)+150=630$. V(Y) = V(200X+150) = 200 2 V(X) = 200 2 (1.24) = 49,600$ 2 Laws of Expected Value and Variance

35 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-35 Up to now, we have looked at univariate distributions, i.e. probability distributions in one variable. As you might guess, bivariate distributions (二元分配) are probabilities of combinations of two variables. The bivariate (or joint) distribution is used when the relationship between two random variables is studied. A joint probability distribution of X and Y is a table or formula that lists the joint probabilities for all pairs of values x and y, and is denoted P(x,y). The probability that X assumes the value x, and Y assumes the value y is denoted 7.2 Bivariate Distributions

36 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-36 Discrete Bivariate Distribution As you might expect, the requirements for a bivariate distribution are similar to a univariate distribution, with only minor changes to the notation:

37 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-37 Example 7.5 Xavier and Yvette are real estate agents; let ’ s use X and Y to denote the number of houses each sells in a month. The following joint probabilities are based on past sales performance: We interpret these joint probabilities as before. E.g the probability that Xavier sells 0 houses and Yvette sells 1 house in the month is P(0, 1) =.21

38 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-38 p(x,y) Bivariate Distributions X Y X=0X=2X=1 y=1 y=2 y=0 0.42 0.12 0.21 0.07 0.06 0.02 0.06 0.03 0.01 Example 7.5 – continued

39 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-39 Marginal Probabilities Example 7.5 – continued Sum across rows and down columns X Y 0 1 2p(y) 0.12.42.06.60 1.21.06.03.30 2.07.02.01.10 p(x).40.50.101.00 p(0,0) p(0,1) p(0,2) The marginal probability P(X=0) P(Y=1), The marginal probability.

40 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-40 Marginal Probabilities As before, we can calculate the marginal probabilities by summing across rows and down columns to determine the probabilities of X and Y individually: E.g the probability that Xavier sells 1 house = P(X=1) =0.40

41 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-41 Describing the Bivariate Distribution The joint distribution can be described by the mean, variance, and standard deviation of each variable. This is done using the marginal distributions. same formulae as for univariate distributions

42 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-42 Describing the Bivariate Distribution To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance (共變數) Coefficient of Correlation (相關係數) To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance (共變數) Coefficient of Correlation (相關係數)

43 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-43 Example 7.6 Compute the covariance and the coefficient of correlation between the numbers of houses sold by Xavier and Yvette. There is a weak, negative relationship between the two variables.

44 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-44 Example 7.5 - continued The sum is equal to 1.0 Conditional Probability (Optional)

45 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-45 Two random variables are said to be independent (獨立) when Example 7.5 - continued Since P(X=0|Y=1)=.7  P(X=0)=.4, The variables X and Y are not independent. Conditions for Independence (optional)

46 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-46 Sum of Two Variables The bivariate distribution allows us to develop the probability distribution of any combination of the two variables, of particular interest is the sum of two variables. to answer questions like “ what is the probability that two houses are sold ” ? P(X+Y=2) = P(0,2) + P(1,1) + P(2,0) =.07 +.06 +.06 =.19 If we consider our example of Xavier and Yvette selling houses, we can create a probability distribution.

47 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-47 P(X+Y=0) = P(X=0  Y=0) =.12P(X+Y=1) = P(X=0  Y=1)+ P(X=1  Y=0) =.21 +.42 =.63 P(X+Y=2) = P(X=0  Y=2)+ P(X=1  Y=1)+ P(X=2  Y=0) =.07 +.06 +.06 =.19 The probabilities P(X+Y)=3 and P(X+Y) =4 are calculated the same way. The distribution follows X Y 0 1 2p(y) 0.12.42.06.60 1.21.06.03.30 2.07.02.01.10 p(x).40.50.101.00 The Probability Distribution of X+Y

48 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-48 Sum of Two Variables The distribution of X+Y Likewise, we can compute the expected value, variance, and standard deviation of X+Y in the usual way. E(X + Y) = 0(.12) + 1(.63) + 2(.19) + 3(.05) + 4(.01) = 1.2 V(X + Y) = (0 – 1.2) 2 (.12) + … + (4 – 1.2) 2 (.01) =.56 x + y 0 1 2 3 4 p(x+y).12.63.19.05.01

49 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-49 The Expected Value and Variance of X+Y We can derive laws of expected value and variance for the sum of two variables as follows: E(X + Y) = E(X) + E(Y) V(X + Y) = V(X) + V(Y) + 2COV(X, Y) If X and Y are independent, COV(X, Y) = 0 and thus V(X + Y) = V(X) + V(Y) Generally, for constant a and b, E(aX + bY) = aE(X) + bE(Y) V(aX + bY) = a 2 V(X) + b 2 V(Y) + 2abCOV(X, Y)

50 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-50 7.4 Binomial Distribution  The binomial distribution (二項分配) is the probability distribution that results from doing a “ binomial experiment (二項實驗) ”. Binomial experiments have the following properties:  Fixed number of trials, represented as n.  Each trial has two possible outcomes, a “ success ” and a “ failure ”.  P(success)=p (and thus: P(failure)=1 – p), for all trials.  The trials are independent, which means that the outcome of one trial does not affect the outcomes of any other trials.

51 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-51 Success and Failure … are just labels for a binomial experiment, there is no value judgment implied. For example a coin flip will result in either heads or tails. If we define “ heads ” as success then necessarily “ tails ” is considered a failure (inasmuch as we attempting to have the coin lands heads up). Other binomial experiment notions: A coin flipped results in heads or tails An election candidate wins or loses An employee is male or female A car uses 87octane gasoline, or another gasoline.

52 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-52 Binomial Random Variable The random variable of a binomial experiment is defined as the number of successes in the n trials, and is called the binomial random variable (二項隨機變數). E.g. flip a fair coin 10 times. 1) Fixed number of trials n=10 2) Each trial has two possible outcomes {heads (success), tails (failure)} 3) P(success)= 0.50 ; P(failure)=1 – 0.50 = 0.50 4) The trials are independent (i.e. the outcome of heads on the first flip will have no impact on subsequent coin flips). Hence flipping a coin ten times is a binomial experiment since all conditions were met.

53 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-53 Binomial Random Variable The binomial random variable counts the number of successes in n trials of the binomial experiment. It can take on values from 0, 1, 2, …, n. Thus, its a discrete random variable.

54 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-54 S1S1 S2S2 S2S2 F2F2 F1F1 F2F2 S3S3 S3S3 S3S3 S3S3 F3F3 F3F3 F3F3 F3F3 P(SSS)=p 3 P(SSF)=p 2 (1-p) P(SFS)=p(1-p)p P(SFF)=p(1-p) 2 P(FSS)=(1-p)p 2 P(FSF)=(1-p)p(1-p) P(FFS)=(1-p) 2 p P(FFF)=(1-p) 3 P(S 1 )=p P(S 2 |S 1 ) P(F 1 )=1-p P(F 2 |S 1 ) P(S 2 |F 1 ) P(F 2 |F 1 ) P(S 2 )=p P(F 2 )=1-p P(S 2 )=p P(F 2 )=1-p P(S 3 |S 2,S 1 ) P(F 3 |S 2,S 1 ) P(S 3 |F 2,S 1 ) P(F 3 |F 2,S 1 ) P(S 3 |S 2,F 1 ) P(S 3 |F 2,F 1 ) P(F 3 |F 2,F 1 ) P(F 3 |S 2,F 1 ) P(S 3 )=p P(F 3 )=1-p Since the outcome of each trial is independent of the previous outcomes, we can replace the conditional probabilities with the marginal probabilities. Since the outcome of each trial is independent of the previous outcomes, we can replace the conditional probabilities with the marginal probabilities. P(S 2 |S 1 ) Developing the Binomial Probability Distribution (n = 3)

55 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-55 P(SSS)=p 3 P(SSF)=p 2 (1-p) P(SFS)=p(1-p)p P(SFF)=p(1-p) 2 P(FSS)=(1-p)p 2 P(FSF)=(1-p)p(1-p) P(FFS)=(1-p) 2 p P(FFF)=(1-p) 3 Let X be the number of successes in three trials. Then, X = 3 X =2 X = 1 X = 0 P(X = 3) = p 3 P(X = 2) = 3p 2 (1-p) P(X = 1) = 3p(1-p) 2 P(X = 0) = (1- p) 3 This multiplier is calculated in the following formula SSS SS S SS Developing the Binomial Probability Distribution (n = 3)

56 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-56 Calculating the Binomial Probability In general, The binomial probability is calculated by:

57 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-57 Example 7.9 & 7.10 Pat Statsdud is registered in a statistics course and intends to rely on luck to pass the next quiz. The quiz consists on 10 multiple choice questions with 5 possible choices for each question, only one of which is the correct answer. Pat will guess the answer to each question Find the following probabilities Pat gets no answer correct Pat gets two answer correct Pat fails the quiz Calculating the Binomial Probability

58 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-58 Pat Statsdud Pat Statsdud is a student taking a statistics course. Pat ’ s exam strategy is to rely on luck for the next quiz. The quiz consists of 10 multiple-choice questions. Each question has five possible answers, only one of which is correct. Pat plans to guess the answer to each question. Is this a binomial experiment? Check the conditions: There is a fixed finite number of trials ( n=10 ). An answer can be either correct or incorrect (two possible outcomes). The probability of a correct answer (P(success)=.20) does not change from question to question. Each answer is independent of the others.

59 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-59 Pat Statsdud n=10, and P(success) =.20 What is the probability that Pat gets no answers correct? I.e. # success, x, = 0; hence we want to know P(x=0) Pat has about an 11% chance of getting no answers correct using the guessing strategy.

60 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-60 Pat Statsdud n=10, and P(success) =.20 What is the probability that Pat gets two answers correct? I.e. # success, x, = 2; hence we want to know P(x=2) Pat has about a 30% chance of getting exactly two answers correct using the guessing strategy.

61 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-61 Cumulative Probability Thus far, we have been using the binomial probability distribution to find probabilities for individual values of x. To answer the question: “ Find the probability that Pat fails the quiz ” If a grade on the quiz is less than 50% (i.e. 5 questions out of 10), that ’ s considered a failed quiz. Thus, we want to know what is: P(X ≤ 4) to answer requires a cumulative probability (累積機率), that is, P(X ≤ x)

62 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-62 Pat Statsdud P(X ≤ 4) = P(0) + P(1) + P(2) + P(3) + P(4) We already know P(0) =.1074 and P(2) =.3020. Using the binomial formula to calculate the others: P(1) =.2684, P(3) =.2013, and P(4) =.0881 We have P(X ≤ 4) =.1074 +.2684 + … +.0881 =.9672 Thus, its about 97% probable that Pat will fail the test using the luck strategy and guessing at answers.

63 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-63 Mean and Variance of Binomial Variable As you might expect, statisticians have developed general formulas for the mean, variance, and standard deviation of a binomial random variable. They are:

64 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-64 Example 7.11 If all the students in Pat’s class intend to guess the answers to the quiz, what is the mean and the standard deviation of the quiz mark? Solution Mean and Variance of Binomial Variable

65 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-65 Binomial Table Calculating binomial probabilities by hand is tedious and error prone. There is an easier way. Refer to Table 1 in Appendix B. For the Pat Statsdud example, n=10, so the first important step is to get the correct table! Table 1

66 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-66 Binomial Table The probabilities listed in the tables are cumulative, i.e. P(X ≤ k) – k is the row index; the columns of the table are organized by P(success) = p

67 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-67 Binomial Table What is the probability that Pat fails the quiz? i.e. what is P(X ≤ 4), given P(success) =.20 and n=10 ? P(X ≤ 4) =.967

68 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-68 Binomial Table The binomial table gives cumulative probabilities for P(X ≤ k), but as we ’ ve seen in the last example, P(X = k) = P(X ≤ k) – P(X ≤ [k – 1]) Likewise, for probabilities given as P(X ≥ k), we have: P(X ≥ k) = 1 – P(X ≤ [k – 1])

69 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-69 Binomial Table What is the probability that Pat gets no answers correct? i.e. what is P(X = 0), given P(success) =.20 and n=10 ? P(X = 0) = P(X ≤ 0) =.107

70 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-70 Binomial Table What is the probability that Pat gets two answers correct? i.e. what is P(X = 2), given P(success) =.20 and n=10 ? P(X = 2) = P(X≤2) – P(X≤1) =.678 –.376 =.302 remember, the table shows cumulative probabilities.

71 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-71 =BINOMDIST() Excel Function There is a binomial distribution function in Excel that can also be used to calculate these probabilities. For example:Excel What is the probability that Pat gets two answers correct? # successes # trials P(success) cumulative (i.e. P(X≤x)?) P(X=2)=.3020

72 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-72 =BINOMDIST() Excel Function There is a binomial distribution function in Excel that can also be used to calculate these probabilities. For example: What is the probability that Pat fails the quiz? # successes # trials P(success) cumulative (i.e. P(X≤x)?) P(X≤4)=.9672

73 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-73 Binomial Distribution Additional Example Records show that 30% of the customers in a shoe store make their payments using a credit card. This morning 20 customers purchased shoes. Use Table 1 of Appendix B to answer some questions stated in the next slide. This is a binomial experiment with n=20 and p=.30. Let X be the number of customers who use a credit card.

74 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-74 p k.01………...30 0. 11 What is the probability that at least 12 customers used a credit card? (n=20 and p=.30).995 P(At least 12 used credit card) = P(X≥12)=1 - P(X≤11) = 1-.995 =.005 Binomial Distribution

75 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-75 p k.01………...30 What is the probability that at least 3 but not more than 6 customers used a credit card? (n=20 and p=.30).608 P(3 ≤ X ≤ 6) =P(X=3 or 4 or 5 or 6) =P(X ≤ 6) - P(X ≤ 2) =.608 -.035 =.573 02.602.6.035 Binomial Distribution

76 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-76 What is the expected number of customers who used a credit card? E(X) = np = 20(.30) = 6 Find the probability that exactly 14 customers did not use a credit card. Let Y be the number of customers who did not use a credit card. P(Y=14) = P(X=6) = P(X  6) - P(x  5) =.608 -.416 =.192 Find the probability that at least 9 customers did not use a credit card. P(Y  9) = P(X  11) =.995 Binomial Distribution

77 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-77 The Poisson distribution, named for Simeon Poisson, is a discrete probability distribution It refers to the number of events (a.k.a. successes) within a specific time period or a specific region of space. 7.5 Poisson Distribution

78 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-78 The number of errors a typist makes per page. The number of flaws in a bolt of cloth. The number of telephone calls received by a switchboard in an hour. The number of customers entering a service station per day. The number of cars arriving at a service station in a week. The number of accidents in 1 day on a particular stretch of highway. (The interval is defined by both time, 1 day, and space, the particular stretch of highway.) Examples of Poisson Distribution

79 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-79 Like a binomial experiment, a Poisson experiment has four defining characteristic properties: The number of successes (events) that occur in any interval is independent of the number of successes that occur in any other interval. The probability of a success in an interval is the same for all intervals of the same size, proportional to the size of the interval. The probability that two or more successes will occur in an interval approaches 0 as the interval becomes smaller. Properties of the Poisson Experiment

80 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-80 The Poisson random variable is the number of successes that occur in a period of time or an interval of space in a Poisson experiment. E.g. On average, 96 trucks arrive at a border crossing every hour. E.g. The number of typographic errors in a new textbook edition averages 1.5 per 100 pages. Poisson Distribution successes time period successes (?!) interval

81 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-81 The Poisson Random Variable indicates the number of successes that occur during a given time interval or in a specific region in a Poisson experiment Probability Distribution of the Poisson Random Variable. The Poisson Variable and Distribution

82 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-82 As mentioned on the Poisson experiment slide: The probability of a success is proportional to the size of the interval Thus, knowing an error rate of 1.5 typos per 100 pages, we can determine a mean value for a 400 page book as:  =1.5(4) = 6 typos / 400 pages. Poisson Distribution

83 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-83 Poisson Distributions (Graphs) 0 1 2 3 4 5

84 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-84 Poisson Distributions (Graphs) Poisson probability distribution with  =2 Poisson probability distribution with  =5 Poisson probability distribution with  =7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

85 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-85 Poisson Distribution Example 7.12 The number of Typographical errors in new editions of textbooks is Poisson distributed with a mean of 1.5 per 100 pages. 100 pages of a new book are randomly selected. What is the probability that there are no typos? That is, what is P(X=0) given that  =1.5? Solution “There is about a 22% chance of finding zero errors”

86 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-86 Example 7.13 For a 400 page book, what is the probability that there are no typos? Solution “there is a very small chance there are no typos” Important! A mean of 1.5 typos per100 pages, is equivalent to 6 typos per 400 pages.

87 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-87 For a 400 page book, what is the probability that there are five or less typos? This is rather tedious to solve manually. A better alternative is to refer to Table 2 in Appendix B.Table 2 k=5, μ =6, and P(X ≤ k) =.446 Example 7.13 “there is about a 45% chance there are 5 or less typos”

88 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-88 Example 7.13 Excel is an even better alternative: Excel

89 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-89 Additional Example Cars arrive at a tollbooth at a rate of 360 cars per hour. What is the probability that only two cars will arrive during a specified one-minute period? (Use the formula) Solution The probability distribution of arriving cars for any one- minute period is Poisson with  = 360/60 = 6 cars per minute. Let X denote the number of arrivals during a one- minute period. Poisson Distribution

90 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-90 What is the probability that only two cars will arrive during a specified one-minute period? (Use Table 2, Appendix B.) P(X = 2) = P(X  2) - P(X  1) =.062 -.017 =.045 Poisson Distribution - Using a Table

91 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-91 What is the probability that at least four cars will arrive during a one-minute period? (Use table 2, Appendix B) P(X  4) = 1 - P(X  3) = 1 -.151 =.849 Poisson Distribution - Using a Table

92 2007 會計資訊系統計學 ( 一 ) 上課投影片 7-92 Example A warehouse has a policy of examining 50 sunglasses from each incoming lot, and accepting the lot only if there are no more than two defective pairs. What is the probability of a lot being accepted if, in fact, 2% of the sunglasses are defective? Solution This is a binomial experiment with n = 50, p =.02. Tables for n = 50 are not available; p<.05; thus, a Poisson approximation is appropriate [  = (50)(.02) =1] P(X poisson  2) =.920 (true binomial probability =.922) Poisson Approximation of the Binomial (Optional)


Download ppt "7-1 Random Variables and Discrete probability Distributions Chapter 7."

Similar presentations


Ads by Google