Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Random Variables and Discrete probability Distributions Chapter 7.

Similar presentations


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

1 1 Random Variables and Discrete probability Distributions Chapter 7

2 2 7.2 Random Variables and Probability Distributions A random variable is a function or rule that assigns a numerical value to each simple event in a sample space. A random variable reflects the aspect of a random experiment that is of interest for us. There are two types of random variables: Discrete random variable Continuous random variable.

3 3 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... Discrete and Continuous Random Variables

4 4 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 Distribution

5 5 If a random variable can assume values x i, then the following must be true: Requirements for a Discrete Distribution

6 6 Distribution and Relative Frequencies In practice, often probability distributions are estimated from relative frequencies. Example 7.1 A survey reveals the following frequencies (1,000s) for the number of color TVs per household. Number of TVsNumber of Householdsxp(x) 0 1,2180 1218/Total =.012 132,3791.319 2 37,961 2.374 319,3873.191 4 7,7144.076 5 2,8425.028 Total101,5011.000

7 7 Determining Probability of Events The probability distribution can be used to calculate the probability of different events Example 7.1 – continued 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

8 8 Probability calculation techniques can be used to develop probability distributions 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? Developing a Probability Distribution

9 9 Solution Use probability rules and trees Define event S = {A sale is made}. Developing a Probability Distribution 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 Probability Distribution Finding Probability/ Probability Distribution

10 10 7.3 Describing the Population/ Probability Distribution The probability distribution represents a population We’re interested in describing the population by computing various parameters. Specifically, we calculate the population mean and population variance.

11 11 Population Mean (Expected Value) Given a discrete random variable X with values x i, that occur with probabilities p(x i ), the population mean of X is.

12 12 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 Population Variance

13 13 The Mean and the Variance Example 7.3 Find the mean the variance and the standard deviation for the population of the number of color television per household in example 7.1 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

14 14 Solution – continued The variance can also be calculated as follows: The Mean and the Variance

15 15 Laws of Expected Value  E(c) = c  E(X + c) = E(X) + c  E(c X ) = 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

16 16 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 and standard deviation of the monthly profit. Laws of Expected Value Variance

17 17 V(X + c) = V(X) V(cX) = c 2 V(X) V(Profit) = V(.30(Sales) – 6,000] = V[(.30)(Sales)] = (.30) 2 V(Sales) = 1,440,000 E(c X ) = cE( X ) E(X + c) = E(X) + c 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 Laws of Expected Value and Variance  = [1,440,000] 1/2 = 1,200 Solution Laws of Expected Value and Variance

18 18 The bivariate (or joint) distribution is used when the relationship between two random variables is studied. The probability that X assumes the value x, and Y assumes the value y is denoted p(x,y) = P(X=x and Y = y) 7.4 Bivariate Distributions

19 19 Bivariate Distributions

20 20 Example 7.5 Xavier and Yvette are two real estate agents. Let X and Y denote the number of houses that Xavier and Yvette will sell next week, respectively. The bivariate probability distribution is presented next. Bivariate Distributions

21 21 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 X Y 0 1 2 0.12.42.06 1.21.06.03 2.07.02.01

22 22 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.

23 23 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. x p(x) y p(y) 0.4 0.6 1.5 1.3 2.1 E(X) =.7 E(Y) =.5 V(X) =.41 V(Y) =.45

24 24  = Describing the Bivariate Distribution To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance: COV(X,Y) =  (X –  x )(Y-  y )p(x,y) Coefficient of Correlation COV(X,Y)  x  y To describe the relationship between the two variables we compute the covariance and the coefficient of correlation Covariance: COV(X,Y) =  (X –  x )(Y-  y )p(x,y) Coefficient of Correlation COV(X,Y)  x  y

25 25 Example 7.6 Calculate the covariance and coefficient of correlation between the number of houses sold by the two agents in Example 7.5 Solution COV(X,Y) =  (x-  x )(y-  y )p(x,y) = (0-.7)(0-.5)p(0,0)+…(2-.7)(2-.5)p(2,2) = -.15  =COV(X,Y)/  x  y = -.15/(.64)(.67) = -.35 Describing the Bivariate Distribution

26 26 Example 7.5 - continued The sum is equal to 1.0 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 Conditional Probability (Optional)

27 27 Two random variables are said to be independent when This leads to the following relationship for independent variables Example 7.5 - continued Since P(X=0|Y=1)=.7 but P(X=0)=.4, The variables X and Y are not independent. P(X=x|Y=y)=P(X=x) or P(Y=y|X=x)=P(Y=y). P(X=x and Y=y) = P(X=x)P(Y=y) Conditions for Independence (optional)

28 28 Sum of Two Variables The probability distribution of X + Y is determined by Determining all the possible values that X+Y can assume For every possible value C of X+Y, adding the probabilities of all the combinations of X and Y for which X+Y = C Example 7.5 - continued Find the probability distribution of the total number of houses sold per week by Xavier and Yvette. Solution X+Y is the total number of houses sold. X+Y can have the values 0, 1, 2, 3, 4.

29 29 P(X+Y=0) = P(X=0 and Y=0) =.12 P(X+Y=1) = P(X=0 and Y=1)+ P(X=1 and Y=0) =.21 +.42 =.63 P(X+Y=2) = P(X=0 and Y=2)+ P(X=1 and Y=1)+ P(X=2 and 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

30 30 The distribution of X+Y The expected value and variance of X+Y can be calculated from the distribution of X+Y. E(X+Y)=0(.12)+ 1(63)+2(.19)+3(.05)+4(.01)=1.2 V(X+Y)=(0-1.2) 2 (.12)+(1-1.2) 2(.63)+… =.56 x + y 0 1 2 3 4 p(x+y).12.63.19.05.01 The Expected Value and Variance of X+Y

31 31 The following relationship can assist in calculating E(X+Y) and V(X+Y) E(X+Y) =E(X) + E(Y); V(X+Y) = V(X) +V(Y) +2COV(X,Y) When X and Y are independent COV(X,Y) = 0, and V(X+Y) = V(X)+V(Y). The Expected Value and Variance of X+Y

32 32 7.6 The Binomial Distribution The binomial experiment can result in only one of two possible outcomes. Typical cases where the binomial experiment applies: 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.

33 33 There are n trials (n is finite and fixed). Each trial can result in a success or a failure. The probability p of success is the same for all the trials. All the trials of the experiment are independent. Binomial Random Variable The binomial random variable counts the number of successes in n trials of the binomial experiment. By definition, this is a discrete random variable. Binomial Experiment

34 34 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)

35 35 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)

36 36 Calculating the Binomial Probability In general, The binomial probability is calculated by:

37 37 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

38 38 Solution Checking the conditions An answer can be either correct or incorrect. There is a fixed finite number of trials (n=10) Each answer is independent of the others. The probability p of a correct answer (.20) does not change from question to question. Calculating the Binomial Probability

39 39 Solution – Continued Determining the binomial probabilities: Let X = the number of correct answers Calculating the Binomial Probability

40 40 = 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 the number of correct answers is less than 5, which means less than or equal to 4. Calculating the Binomial Probability This is called cumulative probability P(X  4 

41 41 E(X) =  = np V(X) =  2 = np(1-p) 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  = np = 10(.2) = 2.  = [np(1-p)] 1/2 = [10(.2)(.8)] 1/2 = 1.26. Mean and Variance of Binomial Variable Binomial Distribution- summary

42 42 The Poisson experiment typically fits cases of rare events that occur over a fixed amount of time or within a specified region Typical cases The number of errors a typist makes per page The number of customers entering a service station per hour The number of telephone calls received by a switchboard per hour. 7.7 Poisson Distribution

43 43 The number of successes (events) that occur in a certain time interval is independent of the number of successes that occur in another time interval. The probability of a success in a certain time interval is the same for all time intervals of the same size, proportional to the length of the interval. The probability that two or more successes will occur in an interval approaches zero as the interval becomes smaller. Properties of the Poisson Experiment

44 44 The Poisson Random Variable The Poisson 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

45 45 Poisson Distributions (Graphs) 0 1 2 3 4 5

46 46 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 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

47 47 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? Solution P(X=0)= e -   x x! e -1.5 1.5 0 0!.2231==

48 48 Poisson Distribution Example 7.13 For a 400 page book calculate the following probabilities T here are no typos There are five or fewer typos Solution P(X=0)= P(X  5)=<use the formula to find p(0), p(1),…,p(5), then calculate p(0)+p(1)+…+p(5) =.4457 e -   x x! e -6 6 0 0!.002479== Important! A mean of 1.5 typos per100 pages, is equivalent to 6 typos per 400 pages. Finding Poisson Probabilities


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

Similar presentations


Ads by Google