Jointly Discrete Random Variables • Automobile engines and transmissions are produced on assembly lines, and are inspected for defects after they come off their assembly lines. Those with defects are repaired. • Let X represent the number of engines, and Y represent the number of transmissions that require repairs in a one-hour time interval. Total number of repairs is X+Y. • The possible values of X are 0, 1, 2, 3, and the possible values of Y are 0, 1, 2, 3. So, both X and Y are discrete and together determine the total number of repairs needed in a given one-hour time interval. • We say that X and Y are jointly discrete. Dr. Sumon Section 2.6 Jointly Distributed Random Variables 1 Joint probability mass function • There are 16 possible values for the ordered pair: (0,0), (0,1), (0,2), (0,3), (1,0), (1,1), (1,2), (1,3), (2,0), (2,1), (2,2), (2,3), (3,0), (3,1), (3,2), (3,3). • The probability of each of the ordered pair occurring is given by the joint probability mass function: ππ(π₯π₯, π¦π¦) = ππ ππ = π₯π₯ ππππππ ππ = π¦π¦ y 0 1 2 3 0 0.13 0.10 0.07 0.03 1 0.12 0.16 0.08 0.04 2 0.02 0.06 0.08 0.04 3 0.01 0.02 0.02 0.02 x • For example ππ 0, 0 = 0.13, ππ 3, 3 = 0.02 Dr. Sumon Section 2.6 Jointly Distributed Random Variables 2 Joint probability mass function • Let X be the number of engines and Y be the number of transmissions that require repairs in a one-hour time interval. • The possible values of both X are Y are 0, 1, 2, 3. Therefore, there are 16 possible values for the ordered pair: (0,0), (0,1), (0,2), (0,3), (1,0), (1,1), (1,2), (1,3), (2,0), (2,1), (2,2), (2,3), (3,0), (3,1), (3,2), (3,3). • The joint probability mass function ππ π₯π₯, π¦π¦ = ππ (ππ = π₯π₯ ππππππ ππ = π¦π¦) y Dr. Sumon x 0 1 2 3 0 0.13 0.10 0.07 0.03 1 0.12 0.16 0.08 0.04 2 0.02 0.06 0.08 0.04 3 0.01 0.02 0.02 0.02 Section 2.6 Jointly Distributed Random Variables 3 Marginal probability mass function • The marginal probability mass function of X ππππ π₯π₯ = ππ ππ = π₯π₯ = οΏ½ ππ(π₯π₯, π¦π¦) π¦π¦ y ππππ π₯π₯ ππππ π₯π₯ x 0 1 2 3 0 0.13 0.10 0.07 0.03 0.33 0 0.33 1 0.12 0.16 0.08 0.04 0.40 1 0.40 2 0.02 0.06 0.08 0.04 0.20 2 0.20 3 0.01 0.02 0.02 0.02 0.07 4 0.07 x ππππ 0 = ππ ππ = 0 = οΏ½ ππ 0, π¦π¦ = ππ 0,0 + ππ 0,1 + ππ 0,2 + ππ(0,3) π¦π¦ Dr. Sumon Section 2.6 Jointly Distributed Random Variables 4 Marginal probability mass function • The marginal probability mass function of Y ππππ π¦π¦ = ππ ππ = π¦π¦ = οΏ½ ππ(π₯π₯, π¦π¦) y π₯π₯ x 0 1 2 3 0 0.13 0.10 0.07 0.03 1 0.12 0.16 0.08 0.04 2 0.02 0.06 0.08 0.04 3 0.01 0.02 0.02 0.02 ππππ π¦π¦ ππ. ππππ 0.34 0.25 0.13 y ππππ π¦π¦ Dr. Sumon 0 1 2 3 0.28 0.34 0.25 0.13 Section 2.6 Jointly Distributed Random Variables 5 Joint probability mass function • The joint pmf satisfy the following conditions: y x 0 1 2 3 0 1 0.13 0.12 0.10 0.16 0.07 0.08 0.03 0.04 2 0.02 0.06 0.08 0.04 3 0.01 0.02 0.02 0.02 οΏ½ οΏ½ ππ π₯π₯, π¦π¦ = 1 π₯π₯ π¦π¦ οΏ½ οΏ½ ππ π₯π₯, π¦π¦ = οΏ½ ππ π₯π₯, 0 + ππ π₯π₯, 1 + ππ π₯π₯, 2 + ππ π₯π₯, 3 π₯π₯ π¦π¦ π₯π₯ οΏ½ ππ π₯π₯, 0 = ππ 0,0 + ππ 1,0 + ππ 2,0) + ππ(3,0 = 0.28 π₯π₯ οΏ½ ππ π₯π₯, 1 = ππ 0,1 + ππ 1,1 + ππ 2,1) + ππ(3,1 = 0.34, ππππππ. π₯π₯ Dr. Sumon Section 2.6 Jointly Distributed Random Variables 6 Joint probability mass function • If X and Y are jointly discrete • The joint pmf of X and Y is the following function: ππ π₯π₯, π¦π¦ = ππ (ππ = π₯π₯ ππππππ ππ = π¦π¦) • The marginal pmf of X and Y can be obtained from the joint pmf as follows: ππππ π₯π₯ = ππ ππ = π₯π₯ = οΏ½ ππ π₯π₯, π¦π¦ π¦π¦ ππππ π¦π¦ = ππ ππ = π¦π¦ = οΏ½ ππ π₯π₯, π¦π¦ • The joint pmf must satisfy the condition that π₯π₯ οΏ½ οΏ½ ππ π₯π₯, π¦π¦ = 1 π₯π₯ Dr. Sumon π¦π¦ Section 2.6 Jointly Distributed Random Variables 7 Jointly continuous random variables • The height H and radius R of a randomly selected cylindrical can be treated as jointly continuous random variables. R H ππ = πππ π 2 π»π» • The lifetimes, in months, of two components in a system, denoted by X and Y. Then, X and Y can be treated as jointly continuous. Dr. Sumon Section 2.6 Jointly Distributed Random Variables 8 Joint probability density function • If X and Y are jointly continuous random variables, their joint probability density function, f(x,y), has three properties. • ππ π₯π₯, π¦π¦ ≥ 0 for all x and y f( x, y) y (x,y) x Dr. Sumon Section 2.6 Jointly Distributed Random Variables 9 Joint probability density function • If X and Y are jointly continuous random variables, with joint probability density function, f(x,y), and a < b, c < d, then, the probability that ππ ≤ ππ ≤ ππ ππππππ ππ ≤ ππ ≤ ππ is ππ ππ ππ ππ ≤ ππ ≤ ππ ππππππ ππ ≤ ππ ≤ ππ = οΏ½ οΏ½ ππ π₯π₯, π¦π¦ ππππππππ ππ d y ππ c a x b • The joint pdf satisfy the following condition: Dr. Sumon οΏ½ ∞ ∞ οΏ½ ππ π₯π₯, π¦π¦ ππππππππ = 1 −∞ −∞ Section 2.6 Jointly Distributed Random Variables 10 Marginal probability density function • If X and Y are jointly continuous random variables, with joint probability density function, f(x,y), then the marginal probability density function of X and Y are given, respectively, by ππππ π₯π₯ = οΏ½ π¦π¦=∞ ππ π₯π₯, π¦π¦ ππππ π¦π¦=−∞ ππππ π¦π¦ = οΏ½ π₯π₯=∞ ππ π₯π₯, π¦π¦ ππππ π₯π₯=−∞ Dr. Sumon Section 2.6 Jointly Distributed Random Variables 11 Example 2.54 and 2.55 • Assume that for certain type of washer, both the thickness and the hole diameter vary from item to item. Let X denote the thickness in millimeters and let Y denote the hole diameter in millimeters, for a randomly chosen washer. Assume that the joint density function 1 ππ π₯π₯, π¦π¦ = οΏ½6 π₯π₯ + π¦π¦ ππππ 1 ≤ π₯π₯ ≤ 2 ππππππ 4 ≤ π¦π¦ ≤ 5 0 πππππππππππππππππ Dr. Sumon Section 2.6 Jointly Distributed Random Variables 12 Example 2.54 • Find the probability that a randomly chosen washer has a thickness between 1.0 and 1.5 mm, and a hole diameter between 4.5 and 5 mm. Dr. Sumon Section 2.6 Jointly Distributed Random Variables 13 SOLUTION • Find ππ 1 ≤ ππ ≤ 1.5 ππππππ 4.5 ≤ ππ ≤ 5 Recall ππ ππ ≤ ππ ≤ ππ ππππππ ππ ≤ ππ ≤ ππ ππ = οΏ½ οΏ½ ππ π₯π₯, π¦π¦ ππππππππ ππ ππ 1 ≤ ππ ≤ 1.5 ππππππ 4.5 ≤ ππ ≤ 5 = οΏ½ Given, ππ π₯π₯, π¦π¦ = 5 1 οΏ½6 0 Dr. Sumon ππ 5 οΏ½ ππ(π₯π₯, π¦π¦)ππππππππ 4.5 π₯π₯ + π¦π¦ ππππ 1 ≤ π₯π₯ ≤ 2 ππππππ 4 ≤ π¦π¦ ≤ 5 πππππππππππππππππ ππ 1 ≤ ππ ≤ 1.5 ππππππ 4.5 ≤ ππ ≤ 5 4 1.5 x 1.5 1 y 4.5 1 ππ 2 =οΏ½ 1.5 1 5 1 οΏ½ π₯π₯ + π¦π¦ ππππππππ 6 4.5 Section 2.6 Jointly Distributed Random Variables 14 SOLUTION ππ 1 ≤ ππ ≤ 1.5 ππππππ 4.5 ≤ ππ ≤ 5 5 =οΏ½ 1.5 1 y 4.5 4 1 1.5 x 2 =οΏ½ 1.5 1 =οΏ½ 1.5 1 5 1 οΏ½ π₯π₯ + π¦π¦ ππππππππ 6 4.5 π₯π₯π₯π₯ π¦π¦ 2 + 6 12 π¦π¦=4.5 π₯π₯ 19 + ππππ 12 48 π₯π₯ 2 19π₯π₯ + = 24 48 Dr. Sumon π¦π¦=5 π₯π₯=1.5 π₯π₯=1 ππππ 1 = 4 Section 2.6 Jointly Distributed Random Variables 15 Example 2.55 • Find the marginal probability density function of the thickness X of a washer and the marginal probability density function of the hole diameter Y of a washer. Dr. Sumon Section 2.6 Jointly Distributed Random Variables 16 SOLUTION • Find ππππ π₯π₯ Given, ππ π₯π₯, π¦π¦ = ππππ π₯π₯ = οΏ½ π¦π¦=∞ π¦π¦=−∞ =οΏ½ π¦π¦=5 π¦π¦=4 0 π₯π₯ + π¦π¦ ππππ 1 ≤ π₯π₯ ≤ 2 ππππππ 4 ≤ π¦π¦ ≤ 5 ππ π₯π₯, π¦π¦ πππ¦π¦ 1 π₯π₯ + π¦π¦ πππ¦π¦ ππππππ 1 ≤ π₯π₯ ≤ 2 6 1 π¦π¦ 2 = π₯π₯π₯π₯ + 2 6 Dr. Sumon 1 οΏ½6 5 y 4.5 4 π¦π¦=5 π¦π¦=4 1 9 ππππππ 1 ≤ π₯π₯ ≤ 2 = π₯π₯ + 6 2 πππππππππππππππππ Section 2.6 Jointly Distributed Random Variables 1 1.5 x 2 17 SOLUTION • Find ππππ π¦π¦ Given, ππ π₯π₯, π¦π¦ = ππππ π¦π¦ = οΏ½ π₯π₯=∞ π₯π₯=−∞ =οΏ½ π₯π₯=2 π₯π₯=1 0 π₯π₯ + π¦π¦ ππππ 1 ≤ π₯π₯ ≤ 2 ππππππ 4 ≤ π¦π¦ ≤ 5 ππ π₯π₯, π¦π¦ πππ₯π₯ 1 π₯π₯ + π¦π¦ πππ₯π₯ ππππππ 4 ≤ π¦π¦ ≤ 5 6 1 π₯π₯ 2 = + π₯π₯π₯π₯ 6 2 Dr. Sumon 1 οΏ½6 5 y 4.5 4 π₯π₯=2 π₯π₯=1 1 3 ππππππ 4 ≤ π¦π¦ ≤ 5 = π¦π¦ + 6 2 πππππππππππππππππ Section 2.6 Jointly Distributed Random Variables 1 1.5 x 2 18 Conditional distributions • Let X be the number of engines and Y be the number of transmissions that require repairs in a one-hour time interval. • The joint probability mass function ππ π₯π₯, π¦π¦ = ππ (ππ = π₯π₯, ππ = π¦π¦) and the marginal probability mass functions of X and Y, are given below. y ππππ π₯π₯ x 0 1 2 3 x 0 0.13 0.10 0.07 0.03 0 0.33 1 0.12 0.16 0.08 0.04 1 0.40 2 0.02 0.06 0.08 0.04 2 0.20 3 0.01 0.02 0.02 0.02 3 0.07 y 0 1 2 3 ππππ π¦π¦ 0.28 0.34 0.25 0.13 Dr. Sumon Section 2.6 Jointly Distributed Random Variables 19 Conditional distributions • If we are interested in the probability ππ ππ = 1 for a given one-hour time interval, we can use the marginal pmf of X to determine this probability. ππ ππ = 1 = ππππ 1 = 0.40 • Now if we learn Y = 2 in that time interval. This knowledge changes the probability ππ ππ = 1 . We need to compute the conditional probability, ππ ππ = 1|ππ = 2 . y Dr. Sumon x 0 1 2 3 0 0.13 0.10 0.07 0.03 1 0.12 0.16 0.08 0.04 2 0.02 0.06 0.08 0.04 3 0.01 0.02 0.02 0.02 Section 2.6 Jointly Distributed Random Variables 20 Conditional distributions • Recall that for two events A and B, ππ π΄π΄ ∩ π΅π΅ ππ π΄π΄|π΅π΅ = ππ π΅π΅ ππ ππ = 1, ππ = 2 • Similarly, ππ ππ = 1|ππ = 2 = ππ ππ = 2 y ππ(1,2) = 0 1 2 3 x ππππ (2) 0 0.07 1 0.08 2 0.08 3 0.02 y ππππ π¦π¦ Dr. Sumon 0 1 2 3 0.08 = 0.32 = 0.25 0.25 Section 2.6 Jointly Distributed Random Variables 21 Conditional distributions (discrete) • Let X and Y be jointly discrete random variables, with joint probability mass function ππ(π₯π₯, π¦π¦). • The conditional probability mass function of Y given ππ = π₯π₯: ππππ|ππ ππ π₯π₯, π¦π¦ π¦π¦ π₯π₯ = ππ ππ = π¦π¦ ππ = π₯π₯ = , ππππ π₯π₯ ππππππππππππππππ π‘π‘π‘π‘π‘ ππππππππππππππππ ππππππ ππππ (π₯π₯) > 0 • The conditional probability mass function of X given ππ = π¦π¦: ππ(π₯π₯, π¦π¦) , ππππ|ππ π₯π₯ π¦π¦ = ππ ππ = π₯π₯ ππ = π¦π¦ = ππππ (π¦π¦) ππππππππππππππππ π‘π‘π‘π‘π‘ ππππππππππππππππ ππππππ ππππ (π¦π¦)>0 • We use conditional pmf to calculate conditional probability (and conditional mean, etc.). Dr. Sumon Section 2.6 Jointly Distributed Random Variables 22 Conditional distributions (continuous) • Let X and Y be jointly continuous random variables, with joint probability density function ππ(π₯π₯, π¦π¦). The conditional probability density function of Y given ππ = π₯π₯: ππ(π₯π₯, π¦π¦) ππππ|ππ (π¦π¦|π₯π₯) = , provided the marginal pdf ππππ π₯π₯ > 0. ππππ (π₯π₯) • The conditional probability density function of X given ππ = π¦π¦: ππ(π₯π₯, π¦π¦) ππππ|ππ (π₯π₯|π¦π¦) = , provided the marginal pdf ππππ π¦π¦ > 0. ππππ (π¦π¦) • We have ππ ππ ππ ≤ ππ ≤ ππ | ππ = π¦π¦ = οΏ½ ππππ|ππ (π₯π₯|π¦π¦) ππππ ππ ππ Dr. Sumon ππ ππ ≤ ππ ≤ ππ | ππ = π₯π₯ = οΏ½ ππππ|ππ (π¦π¦|π₯π₯) πππ¦π¦ ππ Section 2.6 Jointly Distributed Random Variables 23 Means of functions of single random variables • Let X be a random variable, and β ππ be a function of X, e.g., β ππ = 20ππ, β ππ = ππ 2 − 5, ππππππ. • If X is discrete with probability mass function ππ π₯π₯ , the mean of β ππ is given by πΈπΈ β ππ = ππβ(ππ) = οΏ½ β π₯π₯ ππ(π₯π₯) π₯π₯ The summation is over all possible values of X. • If X is continuous with probability density function ππ(π₯π₯), the mean of β ππ is given by ππβ(ππ) = οΏ½ ∞ −∞ Dr. Sumon β π₯π₯ ππ π₯π₯ ππππ Section 2.6 Jointly Distributed Random Variables 24 Means of functions of two random variables • If X and Y are jointly discrete random variables with joint probability mass function p(x,y), ππβ(ππ,ππ) = οΏ½ οΏ½ β π₯π₯, π¦π¦ ππ(π₯π₯, π¦π¦) π₯π₯ π¦π¦ where the sum is taken over all possible values of X and Y • If X and Y are jointly continuous random variables with joint probability density function f(x,y), ππβ(ππ,ππ) = οΏ½ ∞ οΏ½ ∞ −∞ −∞ Dr. Sumon β π₯π₯, π¦π¦ ππ π₯π₯, π¦π¦ ππππππππ Section 2.6 Jointly Distributed Random Variables 25 Conditional Means • If X and Y are jointly discrete random variables with joint probability mass function p(x,y), the conditional expectation of Y given X= x: πΈπΈ(ππ|ππ = π₯π₯) = οΏ½ π¦π¦ ππππ|ππ (π¦π¦|π₯π₯) π¦π¦ πΈπΈ(ππ) = οΏ½ π¦π¦ ππππ (π¦π¦) π¦π¦ • If X and Y are jointly continuous random variables with joint probability density function f(x,y), the conditional expectation of Y given X=x: πΈπΈ(ππ|ππ = π₯π₯) = οΏ½ ∞ −∞ ∞ Dr. Sumon πΈπΈ(ππ) = οΏ½ −∞ π¦π¦ ππππ|ππ π¦π¦|π₯π₯ ππππ π¦π¦ ππππ π¦π¦ ππππ Section 2.6 Jointly Distributed Random Variables 26 Independent random variables • If X and Y are jointly discrete, they are independent if the joint probability mass function is equal to the product of the marginals: ππ(π₯π₯, π¦π¦) = ππππ (π₯π₯) ππππ (π¦π¦) • If X and Y are jointly continuous, they are independent if the joint probability density function is equal to the product of the marginals: ππ(π₯π₯, π¦π¦) = ππππ (π₯π₯) ππππ (π¦π¦) Dr. Sumon Section 2.6 Jointly Distributed Random Variables 27 Covariance • The covariance is a measure of strength of linear relationship between X and Y. πΆπΆπΆπΆπΆπΆ ππ, ππ = ππ(ππ−ππππ )(ππ−ππππ ) ππ − ππππ = Deviation of X from mean of X (ππ − ππππ )(ππ − ππππ ) = Product of deviations of X and Y • Consider a simple random sample: π₯π₯ππ , π¦π¦ππ Y Both deviations positive, Product of deviations positive. Negative product Positive product Dr. Sumon π₯π₯1 , π¦π¦1 , π₯π₯2 , π¦π¦2 ,…, (ππππ , ππππ ) X Negative product Section 2.6 Jointly Distributed Random Variables 28 Covariance E[(ππ − ππππ )(ππ − ππππ )] Association of X and Y in (X,Y) Larger X tends to pair with larger Y and Tends to be positive smaller X tend to pair with smaller Y Negative product Y Positive product of deviations of X and Y (ππππ , ππππ ) Positive product Dr. Sumon X Negative product Section 2.6 Jointly Distributed Random Variables 29 Covariance Association of X and Y in (X,Y) Large X tends to pair with small Y and vice versa. Negative product E[(ππ − ππππ )(ππ − ππππ )] Tends to be negative Y Positive product (ππππ , ππππ ) Positive product Dr. Sumon X Negative product Section 2.6 Jointly Distributed Random Variables 30 Covariance Association of X and Y in (X,Y) E[(ππ − ππππ )(ππ − ππππ )] Little tendency for larger X to pair with Tends to be zero either larger Y or smaller Y Y Positive product Negative product (ππππ , ππππ ) Positive product Dr. Sumon X Negative product Section 2.6 Jointly Distributed Random Variables 31 Correlation • The population correlation or simply correlation between X and Y is denoted by ππππ,ππ and given by πΆπΆπΆπΆπΆπΆ(ππ, ππ) ππππ,ππ = ππππ ππππ • The correlation is free of the units. So we can compare correlation between two pairs of random variables. • For any two random variables X and Y −1 ≤ ππππππ ≤ 1 When there is an exact linear dependency, ππ = ππ + ππππ, then ππππππ = 1 if ππ > 0 and ππππππ = −1 if ππ < 0. Dr. Sumon Section 2.6 Jointly Distributed Random Variables 32 Formulas πΆπΆπΆπΆπΆπΆ(ππ, ππ) ππ(ππ−ππππ )(ππ−ππππ) ππππππ − ππππ ππππ ππππππ = = = ππππ ππππ ππππ ππππ ππππ ππππ • If X and Y are jointly discrete, ππππππ = οΏ½ οΏ½ π₯π₯π₯π₯ ππ(π₯π₯, π¦π¦) π₯π₯ π¦π¦ ππππ = οΏ½ π₯π₯ ππππ (π₯π₯) π₯π₯ ππππ = οΏ½ π¦π¦ ππππ (π¦π¦) π¦π¦ Dr. Sumon ππππ2 = ππππ 2 − ππππ 2 ππππ 2 = οΏ½ π₯π₯ 2 ππππ (π₯π₯) π₯π₯ ππππ2 = ππππ 2 − ππππ 2 ππππ 2 = οΏ½ π¦π¦ 2 ππππ (π¦π¦) π¦π¦ Section 2.6 Jointly Distributed Random Variables 33 Formula ππππππ ππ(ππ−ππππ )(ππ−ππππ) ππππππ − ππππ ππππ πΆπΆπΆπΆπΆπΆ(ππ, ππ) = = = ππππ ππππ ππππ ππππ ππππ ππππ • If X and Y are jointly continuous ππππππ = οΏ½ ππππ = οΏ½ ∞ −∞ −∞ ∞ −∞ ∞ ππππ = οΏ½ −∞ Dr. Sumon οΏ½ ∞ π₯π₯π₯π₯ ππ(π₯π₯, π¦π¦)ππππππππ π₯π₯ ππππ π₯π₯ πππ₯π₯ π¦π¦ ππππ π¦π¦ ππππ ππππ2 = ππππ 2 − ππππ ππππ 2 = οΏ½ ∞ π₯π₯ 2 ππππ π₯π₯ πππ₯π₯ −∞ ππππ2 = ∞ ππππ 2 = οΏ½ −∞ Section 2.6 Jointly Distributed Random Variables ππππ 2 − ππππ π¦π¦ 2 ππππ π¦π¦ πππ¦π¦ 2 2 34