Download presentation
Presentation is loading. Please wait.
Published byNelson Ramsey Modified over 9 years ago
1
1 Random Variables and Discrete probability Distributions Chapter 7
2
2 7.1 Random Variables and Discrete Probability Distribution Many times simple events in the sample space can be assigned numerical values. A random variable can then be defined that takes on these values. The random variable reflects a certain characteristic of interest of the experimental outcome. Examples: The number of cars entering a gas station in the next five minutes. The amount of gas filled in a gas tank by a driver. The grade in a physics test. The number of new employees to be hired next month.
3
3 There are two types of random variables: Discrete random variable Continuous random variable. A random variable is discrete if it can assume only a countable number of values. A random variable is continuous if it can assume an uncountable number of values. 7.1 Random Variables and Discrete Probability Distribution
4
4 0 Continuous random variable Only certain values can be assigned to the random variable Therefore, the number of values is countable Any value within the range where the variable is defined can be selected Discrete random variable Therefore, the number of values is uncountable 0123... A short demonstration: Discrete and Continuous Random Variables
5
5 A table, formula, or graph that lists all possible values a discrete random variable can assume, together with the probabilities associated with each value, is called a discrete probability distribution. To calculate the probability that the random variable X assumes the value x, P( X = a), add the probabilities of all the simple events for which X is equal to ‘a’, or Use probability calculation tools (such as tree diagram), Discrete Probability Distribution
6
6 Simple event x Probability TT01/4 HT11/4 TH11/4 HH21/4 x p(x) 0 1/4 1 1/2 2 1/4 T T HT H H HH TH TT (½)(½)=1/4 H T Example 1 Find the probability distribution of the random variable describing the number of heads that turn-up when a coin is flipped twice. Solution Discrete Probability Distribution
7
7 If a random variable can assume values x i, then the following must be true: Requirements for a Discrete Distribution With the probability distribution we can more conveniently calculate probabilities (see example 2) next.
8
8 Distribution and Relative Frequencies Example 2 A survey reveals the following frequencies for the number of colored TV per household. Number of TVsNumber of Households xp(x) 0 1,2180 1218/Total =.012 132,3791 32379/Total =.319 2 37,961 2.374 319,3873.191 4 7,7144.076 5 2,8425.028 Total101,5011.000
9
9 Determining Probability of Events Example 2 – continued Calculate the probability of the following events: P(The number of colored TVs is 3) = P(X=3) =.191 P(The number of colored TVs is two or more) = P(X 2)=P(X=2)+P(X=3)+P(X=4)+P(X=5)=.319+.374+…=.669
10
10 Example 3 The number of cars a dealer is selling daily were recorded in the last 100 days. This data was summarized as follows: Daily sales Frequency 05 115 235 325 420 100 Estimate the probability distribution. State the probability of selling more than 2 cars a day. Determining the Probability Distribution and the Probability of Events
11
11 Example 3 - 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 0 1 2 3 4.05.15.35.25.20 X The probability of selling more than 2 cars a day is P(X>2) = P(X=3) + P(X=4) =.25 +.20 =.45 Determining the Probability Distribution and the Probability of Events
12
12 Example 4 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? Developing a Probability Distribution Solution Let us use probability rules and probability tree Define event A i = {a sale is made in the i it phone call}.
13
13 If X represents the number of sales made, then.. (click) Developing a Probability Distribution A 1 and A 2 and A 3 A 1 and A 2 and A 3 C A 1 and A 2 C and A 3 A 1 c and A 2 and A 3 A 1 and A 1 C and A 3 C A 1 C and A 2 and A 3 C A 1 C and A 2 C and A 3 A 1 C and A 2 C and A C XP(x) 3.2 3 =.008 23(.032)=.096 13(.128)=.384 0.8 3 =.512 (.2)(.2)(.8)=.032 Assuming each phone call is independent of all other phone calls, we can assign the following probabilities to each branch on the tree: (.2)(.8)(.8)=.128
14
14 Expected value and Variance Describing the Population Probability Distribution
15
15 The Expected Value (Mean) Given a discrete random variable X with values x i, that occurs with probabilities p(x i ), the population mean of X is.
16
16 Let X be a discrete random variable with possible values x i that occur with probabilities p(x i ), and let E(x i ) = The variance of X is defined by The Population Variance
17
17 The Mean and the Variance Example 5 Find the mean the variance and the standard deviation for the population of the number of colored TV per household in example 2 Solution E(X) = = x i p(x i ) = 0p(0)+1p(1)+2p(2)+…= 0(.012)+1(.319)+2(.374)+… = 2.084 V(X) = 2 = (x i - ) 2 p(x i ) = (0-2.084) 2 p(0)+(1-2.084) 2 p(1) + (2-2.084) 2 +… =1.107 = 1.107 1/2 = 1.052 Using a shortcut formula for the variance
18
18 Solution – continued The variance can also be calculated as follows: The Mean and the Variance
19
19 7.4 The Binomial Distribution The binomial experiment has the following characteristics: There are n trials (n is finite and fixed). Each trial can result in one out of two outcomes, success or a failure. The probability p of a success is the same for all the trials. All the trials of the experiment are independent.
20
20 The binomial random variable counts the number of successes in n trials of the binomial experiment. The possible values of this count are 0,1, 2, …,n, and therefore the binomial variable is discrete. Binomial Random Variable
21
21 The Binomial Probability Distribution The binomial probability distribution is described by the following closed form formula:
22
22 S1S1 F1F1 S2S2 S2S2 F2F2 F2F2 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 ) Developing the Binomial Probability Distribution (n = 3)
23
23 S1S1 F1F1 S2S2 S2S2 F2F2 F2F2 S3S3 S3S3 S3S3 S3S3 F3F3 F3F3 F3F3 F3F3 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 Developing the Binomial Probability Distribution (n = 3) 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 Since the outcome of each trial is independent of the previous outcomes, we can replace the conditional probabilities with the unconditional probabilities.
24
24 P(X = 3) = P(Three successes) = P(SSS) = p 3 P(X = 2) = P(Two successes, one Failure) = P(SSF) + P(SFS) + P(FSS) = p 2 (1-p) + p(1-p)p + (1-p)pp = p 2 (1-p) + p 2 (1-p) + p 2 (1-p) = 3 p 2 (1-p). P(X = 1) = P(One success, two failures) = P(SFF) + P(FSF) + P(FFS) = p(1-p) 2 + (1-p)p(1-p) + (1-p) 2 p = p(1-p) 2 + p(1-p) 2 + p(1-p) 2 = 3 p(1-p) 2 P(X = 0) = P(Three failures) = P(FFF) = (1-p) 3 Developing the Binomial Probability Distribution (n = 3)
25
25 Example 10 Pat Statsdud takes a course in statistics, 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 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
26
26 Solution Checking the conditions: Calculating the Binomial Probability Only one out of two outcomes can occur (An answer can be either correct or incorrect). There is a fixed finite number of trials (There are 10 questions in the test, n=10). Each answer is independent of the others. The probability p of a correct answer does not change from question to question (20% chance that an answer is correct).
27
27 Solution – Continued Determining the binomial probabilities: Let X = the number of correct answers Calculating the Binomial Probability
28
28 = p(0) + p(1) + p(2) + p(3) + p(4) =.1074 +.2684 +.3020 +.2013 +.0881 =.9672 Solution – Continued Determining the binomial probabilities: Pat fails the test if she gets less than 5 correct answers. Calculating the Binomial Probability This is called cumulative probability P(X 4
29
29 E(X) = = np V(X) = 2 = np(1-p) Mean and Variance - Binomial Variable
30
30 Example 11 If all the students in Pat’s class practice the same learning behavior like she does, what is the mean and the standard deviation of the quiz mark? Solution = np = 10(.2) = 2. = [np(1-p)] 1/2 = [10(.2)(.8)] 1/2 = 1.26. Mean and variance of binomial variable
31
31 Binomial Distribution - summary Example 12 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 the binomial table to answer some questions stated in the next few slides.
32
32 Solution First we verify that this is a binomial experiment: There are two possible outcomes of which only one will take place (paid with the credit card or not) There is a finite number of trials (20 customers are observed) Customers pay independently Each customer has the same probability to pay with a credit card (. 30). Binomial Distribution - summary
33
33 p k n = 20.995.01………...30 0. 11 Solution – continued Find the probability that at most 11 customers use a credit card. P(X 11) =.995 Binomial Distribution - summary In what follows we demonstrate the usage of the Binomial Table
34
34 To calculate P(X 11) when p = 0.3 and n = 20, type in an empty cell the following: =binomdist(11,20,0.3,1). Then click outside the cell. To calculate P(X = 11) type the following: =binomdist(11,20,0.3,0) To calculate P(X 11) type the following: = 1 - binomdist(10,20,0.3,1) Binomial Distribution - summary In what follows we demonstrate how to use Excel to determine binomial probabilities
35
35 p k.01………...30 What is the probability that at least 3 but not more than 6 customers used a credit card?.608 P(3 X 6)= P(X=3 or 4 or 5 or 6) = 02.602.6.035 Binomial Distribution - summary =.608 -.035 =.573 0 1 2 3 4 5 6.573 Not more than 6 At least 3 but not more than 6 Click 3 4 5 6 P(X 6)- P(X 2)
36
36 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, while X (as before) the number of those who did use a credit card. P(Y=14) = P(X=6) = P(X 6) - P(X 5) =.608 -.416 =.192 Using Excel to solve the last two questions: P(3 X 6) = binomdist(6,20,0.3,1) – binomdist(2,20,0.3,1) P(Y = 14) = binomdist(14,20,0.7,0) Binomial Distribution - summary
37
37 What is the expected number of customers who used a credit card? E(X) = np = 20(.30) = 6 Binomial Distribution - summary
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.