Lecture 8 Joint Distributions Joint Probability Distributions • In many case, we are not only interested in one outcome/random variable but in multiple ones. • For instance, we may be interested in the Hardness π», and Toughness π of material released from a certain experiment. • The sample space is two-dimensional, with elements being pairs (β, π‘). • In the discrete case, the joint probability distribution is defined as: π β, π‘ = π(π» = β, π = π‘) 2 Discrete Joint Distribution • The function π(π₯, π¦) is a joint probability distribution or probability mass function of the discrete random variables πand πif • π(π₯, π¦) ≥ 0, for all (π₯, π¦). • σπ₯ σπ¦ π(π₯, π¦) = 1. • π π = π₯, π = π¦ = π(π₯, π¦). • For a region π΄ in the π₯π¦ plane, π π₯, π¦ ∈ π΄ = σ σπ΄ π(π₯, π¦) . 3 Example • • • • • A box contains 3 blue pens, 2 red pens, and 3 green pens. 2 pens are selected at random. π is the number of blue pens selected. π is the number of red pens selected. Find: 1. The joint probability function π(π₯, π¦). 2. π[(π₯, π¦) ∈ π΄], where A is the region (π₯, π¦) (π₯ + π¦) ≤ 1 . • The possible values for the pairs are: (0,0), (0,1), (1,0), (1,1), (0,2), and (2,0) 4 Solution 1. The number of possible ways of choosing any 2 pins is: 8 = 28 2 The number of ways of selecting 1 red from 2 red pens and 1 2 3 green from 3 green pens is = 6. Hence, f(0,1) = 6/28=3 /14. 1 1 Similar calculations yield the probabilities for the other cases, which are presented in Table. Note that the probabilities sum to 1. The number of cases of choosing x blue and y red is: 3 π₯ 2 π¦ 3 2−π₯−π¦ Hence, we can write: Note that: π₯ = 0,1,2; π¦ = 0,1,2; and 0 ≤ (π₯ + π¦) ≤ 2. 5 None 2. The probability that (π₯, π¦) falls in region π΄ is: π π₯, π¦ ∈ π΄ = π π₯ + π¦ ≤ 1 = π 0,0 + π 0,1 + π(1,0) 3 3 9 9 = + + = 28 14 28 14 • The probability distribution π(π₯, π¦) can be tabulated: 6 Continuous Joint Distribution • The function π(π₯, π¦) is a joint probability density function of the continuous random variables πand πif • π(π₯, π¦) ≥ 0, for all (π₯, π¦). ∞ ∞ • β«Χ¬β¬−∞ β«Χ¬β¬−∞ π π₯, π¦ ππ₯ ππ¦ = 1. • π π₯, π¦ ∈ π΄ = β«π₯ π π΄Χ¬ Χ¬β¬, π¦ ππ₯ ππ¦. • for any region π΄ in the π₯π¦ plane. 7 Example • A privately owned business operates both a drive-in facility and a walk-in facility. • On a randomly selected day, let X and Y , respectively, be the times that the drive-in and the walk-in facilities are in use, and suppose that the joint density function is: A. Verify the conditions of the joint density function. 1 1 1 2 4 2 B. Find π π₯, π¦ ∈ π΄ , where π΄ = (π₯, π¦) 0 < π₯ < , < π¦ < 8 Solution A. It is easy to show that π(π₯, π¦) ≥ 0 is satisfied. The second condition is: ∞ ΰΆ± ∞ 1 1 ΰΆ± π π₯, π¦ ππ₯ ππ¦ = ΰΆ± ΰΆ± −∞ −∞ 0 1 =ΰΆ± 0 0 2 (2π₯ + 3π¦) ππ₯ ππ¦ 5 2 6π¦ + ππ¦ 5 5 9 The Mean/Expected Value • Let πbe a random variable with probability distribution π(π₯). The mean, or expected value, of πis: ππ₯ = πΈ π = ΰ· π₯π(π₯) π₯ • if π is discrete. And: +∞ ππ₯ = πΈ π = ΰΆ± π₯π π₯ ππ₯ −∞ • if π is continuous. 11 The Mean of a Random Variable • If a fair coin is tossed twice, the sample space is: π = {π»π», π»π, ππ», ππ} • These probabilities are the relative frequencies in the long run. Hence, This result means that a person who tosses 2 coins over and over again will, on the average, get 1 head per toss. 12 Example • Introduction • Consider tossing two coins 16 times and X is the number of heads that occur per toss • The possible outcomes for every toss are: 0, 1, and 2. • If they occur exactly: 4, 7, and 5 times, respectively. • The mean (or mathematical expectation) is: • Or: • Hence, by knowing the outcomes and their relative frequencies, we can calculate the average. 13 Example • A certain box contains 7 components; of which 3 are defective. • A sample of 3 is chosen by the inspector. • What is the expected value for the number of good items in the sample (π)? Solution: • The probability distribution for X is: 14 • Hence: π(0) = 1/35, π(1) = 12/35, π(2) = 18/35, π(3) = 4/35 • The expected value in the long run is: 1 12 18 4 ππ₯ = πΈ π = 0 × +1× +2× +3× = 1.7 35 35 35 35 • Hence, the average over the long run is 1.7. Thus, if a sample of size 3 is selected at random over and over again from a lot of 4 good components and 3 defective components, it will contain, on average, 1.7 good components. 15 Example • π denotes the life in hours of a certain electronic device. • The PDF is: • Find the expected life of this type of device. Solution: • The expected life is: +∞ πΈ π =ΰΆ± 100 +∞ 20,000 20,000 −20,000 π₯ ππ₯ = ΰΆ± ππ₯ = α€ 3 2 π₯ π₯ π₯ 100 20000 100 Note: +∞ = 100 = 200 16 Functions of Random Variables • Let πbe a random variable with probability distribution π(π₯). The expected value of the random variable π(π)is ππ π = πΈ π(π) = ΰ· π π₯ π(π₯) π₯ • if π is discrete, and +∞ ππ π = πΈ π(π) = ΰΆ± π π₯ π π₯ ππ₯ −∞ • if π is continuous. 17 Example • Suppose that the number of cars πthat pass through a car wash between 4: 00ππand 5: 00 ππ on any sunny Friday has the following probability distribution. • Let π(π₯) = (2π₯ − 1) represent the amount of money in pounds paid to the attendant by the manager. • Find the attendant’s expected earnings during this 1 hour period. 18 Solution • Let the probability distribution of π be denoted by π(π₯). • The attendant can expect: = 12.67 Pounds Example • Let π be a random variable with density function • Find the expected value of π(π) = (4π + 3). • Solution: =8 20