{"id":28513,"date":"2022-08-31T14:44:50","date_gmt":"2022-08-31T14:44:50","guid":{"rendered":"https:\/\/analystprep.com\/study-notes\/?p=28513"},"modified":"2024-11-20T12:36:04","modified_gmt":"2024-11-20T12:36:04","slug":"calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only","status":"publish","type":"post","link":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/","title":{"rendered":"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only"},"content":{"rendered":"<p>Let \\(\\text{X}\\) and \\(\\text{Y}\\) be two discrete random variables, with a joint probability mass function, \\(\\text{f}(\\text{x}, \\text{y})\\). Then, the random variables \\(\\text{X}\\) and \\(\\text{Y}\\) are said to be independent if and only if,<br \/>\n$$<br \/>\n\\text{f}(\\text{x}, \\text{y})=\\text{f}(\\text{x}) * \\text{f}(\\text{y}), \\quad \\text { for all } \\text{x}, \\text{y}<br \/>\n$$<br \/>\nHowever, if the above condition does not hold, then the two random variables \\(\\text{X}\\) and \\(\\text{Y}\\) are dependent.<\/p>\n<p>In this reading, we will base our discussion on the relationship between two or more discrete random variables. If we have two dependent discrete random variables, \\(X\\) and \\(Y\\), we would wish to establish how one varies with respect to the other. If \\(\\text{X}\\) increases, for example, does \\(\\text{Y}\\) also tend to increase or decrease? And if so, how strong is the dependence between the two? Two measures that can help us answer these questions are covariance and correlation coefficient.<\/p>\n<h2>Covariance<\/h2>\n<p>Let \\(\\text{X}\\) and \\(\\text{Y}\\) be two discrete non-independent random variables. The covariance of \\(\\text{X}\\) and \\(\\text{Y}\\) denoted, \\(\\operatorname{Cov}[\\text{X}, \\text{Y}]\\), is defined by:<br \/>\n$$<br \/>\n\\operatorname{Cov}[\\text{X}, \\text{Y}]=\\text{E}[(\\text{X}-\\text{E}[\\text{X}])(\\text{Y}-\\text{E}[\\text{Y}])]<br \/>\n$$<br \/>\nThis simplifies to:<br \/>\n$$<br \/>\n\\operatorname{Cov}[\\text{X}, \\text{Y}]=\\text{E}[\\text{XY}]-\\text{E}[\\text{X}] * \\text{E}[\\text{Y}]<br \/>\n$$<br \/>\nRecall that in the univariate case, we defined the variance of a discrete random variable, \\(\\text{X}\\), as:<\/p>\n<p>$$<br \/>\n\\operatorname{Var}(\\text{X})=\\text{E}\\left(\\text{X}^{2}\\right)-[\\text{E}(\\text{X})]^{2}<br \/>\n$$<br \/>\nWhich can be expressed as:<br \/>\n$$<br \/>\n\\operatorname{Var}(\\text{X})=\\text{E}\\left(\\text{X}^{2}\\right)-[\\text{E}(\\text{X})]^{2}=\\text{E}[\\text{X} * \\text{X}]-\\text{E}[\\text{X}] * \\text{E}[\\text{X}]<br \/>\n$$<\/p>\n<p>Thus, we can conclude that,<br \/>\n$$<br \/>\n\\operatorname{Var}(\\text{X})=\\operatorname{Cov}[\\text{X}, \\text{X}]<br \/>\n$$<\/p>\n<p>Note:<\/p>\n<p>The units of \\(\\operatorname{Cov}(\\text{X}, \\text{Y})\\) are the product of those of \\(\\text{X}\\) and \\(\\text{Y}\\). So, for example, if \\(X\\) is time in hours, and \\(\\mathrm{Y}\\) is a sum of money in \\(\\$\\), then Cov is in \\(\\$\\) hours.<\/p>\n<p>\\(\\text{E}[\\text{XY}]\\) can be computed directly from the joint probability function, \\(\\text{f}(\\text{x}, \\text{y})\\) while \\(\\text{E}[\\text{X}]\\) and \\(\\text{E}[\\text{Y}]\\) can be computed using their respective marginal probability functions, i.e.,<br \/>\n$$<br \/>\n\\begin{align}<br \/>\n\\text{E(X Y)} &amp;=\\sum_{\\text {all } \\text {x }\\text { all y}} \\sum_{\\text{y}} * \\text{f(x, y)} \\\\<br \/>\n\\text{E[X]} &amp;=\\sum_{\\text{x}} \\text{x} *\\text{ f(x)} ; \\text { and } \\\\<br \/>\n\\text{E[Y]} &amp;=\\sum_{\\text{y}} \\text{y} * \\text{f(y)}<br \/>\n\\end{align}<br \/>\n$$<\/p>\n<h3>Properties of Covariance<\/h3>\n<p>Let \\(\\text{X}, \\text{Y}\\), and \\(\\text{Z}\\) be random variables and let \\(\\text{a}, \\text{b}\\), and \\(\\text{c}\\) be non-zero constants.<\/p>\n<p>Then, the following properties hold:<\/p>\n<p>i. \\(\\operatorname{Cov}(\\text{X}, \\text{Y})=\\operatorname{Cov}(\\text{Y}, \\text{X})\\)<\/p>\n<p>ii. \\(\\operatorname{Cov}(\\text{X}, \\text{X})=\\operatorname{Var}(\\text{X})\\)<\/p>\n<p>iii. \\(\\operatorname{Cov}(a X, b Y)=\\operatorname{abCov}(X, Y)\\)<\/p>\n<p>iv. \\(\\operatorname{Cov}[a X+b, c Y+d]=a c \\cdot \\operatorname{Cov}[X, Y]\\)<\/p>\n<p>v. \\(\\operatorname{Cov}[\\text{X}, \\text{Y}+\\text{Z}]=\\operatorname{Cov}[\\text{X}, \\text{Y}]+\\operatorname{Cov}[\\text{X}, \\text{Z}]\\)<\/p>\n<p>vi. If \\(X\\) and \\(Y\\) are independent, \\(\\operatorname{Cov}[X, Y]=0\\)<\/p>\n<p>vii. \\(\\operatorname{Cov}(\\text{X}, \\text{c})=\\text{E}[(\\text{X}-\\text{E}(\\text{X}))(\\text{c}-\\text{c})]=\\text{E}(0)=0\\)<\/p>\n<h4>Example: Properties of Covariance<\/h4>\n<p>A motor insurance company covers \\(100 \\%\\) of losses that occur due to accident and only \\(90 \\%\\) of losses that occur due to theft. Let \\(X\\) be the number of accident claims, and let \\(Y\\) be the number of theft claims. You are also provided with the following information:<\/p>\n<p>\\(\\text{E}(\\text{X})=100 ; \\text{SD}(\\text{X})=25 ; \\text{E}(\\text{Y})=30 ; \\text{SD}(\\mathrm{Y})=20\\) and \\(\\operatorname{Cov}(\\text{X}, \\text{Y})=1000\\)<\/p>\n<p>Find the covariance between the accident claims and the insurance coverage.<\/p>\n<p>Solution<\/p>\n<p>Let \\(\\text{Z}\\) be the insurance coverage so that,<\/p>\n<p>$$<br \/>\n\\text{Z}=\\text{X}+0.90 \\text{Y}<br \/>\n$$<br \/>\nWe wish to find \\(\\operatorname{Cov}(\\text{X}, \\text{Z})=\\operatorname{Cov}(\\text{X}, \\text{X}+0.90 \\text{Y})\\). At this point, we can apply the properties of covariance, i.e.,<\/p>\n<p>$$<br \/>\n\\begin{align}<br \/>\n\\operatorname{Cov}(\\text{X}, \\text{X}+0.90 \\text{Y}) &amp;=\\operatorname{Cov}(\\text{X}, \\text{X})+\\operatorname{Cov}(\\text{X}, 0.90 \\text{Y}) \\\\<br \/>\n&amp;=\\operatorname{Var}(\\text{X})+0.90 \\operatorname{Cov}(\\text{X}, \\text{Y})=25^{2}+0.90 \\times 1,000 \\\\<br \/>\n&amp;=1,525\\end{align}<br \/>\n$$<br \/>\nThe covariance between \\(\\text{X}\\) and \\(\\text{Y}\\) is a measure of the strength of the &#8220;linear association&#8221; or &#8220;linear relationship&#8221; between the variables.<\/p>\n<p>The covariance can have a positive or a negative sign depending on the relationship between the variables \\(\\text{X}\\) and \\(\\text{Y}\\). When the covariance is positive, it means we have a positive association between the random variables \\(X\\) and \\(Y\\), while a negative covariance implies a negative association exists between the variables \\(X\\) and \\(Y\\). However, one of the major drawbacks of variance as a measure of linear relationships is that its value depends on the variables&#8217; units of measurement. This can be corrected by computing a measure known as correlation coefficient, a dimensionless(unitless) quantity.<\/p>\n<h2>Correlation Coefficient<\/h2>\n<p>The correlation coefficient \\((\\text{X}, \\text{Y})\\), usually written as \\(\\text{Corr}(\\text{X}, \\text{Y})\\) or \\(\\rho(\\text{X}, \\text{Y})\\) of two discrete random variables \\(X\\) and \\(Y\\), is defined by:<br \/>\n$$<br \/>\n\\rho(\\text{X}, \\text{Y})=\\frac{\\operatorname{Cov}(\\text{X}, \\text{Y})}{\\sqrt{\\operatorname{Var}(\\text{X}) * \\operatorname{Var}(\\text{Y})}}=\\frac{\\operatorname{Cov}(\\text{X}, \\text{Y})}{\\sigma_{\\text{X}} * \\sigma_{\\text{Y}}}<br \/>\n$$<br \/>\n\\(\\operatorname{Var}(\\text{X})\\) and \\(\\operatorname{Var}(\\text{Y})\\) can be computed from their respective marginal distribution functions.<br \/>\n$$<br \/>\n\\text{V}(\\text{X})=\\text{E}\\left(\\text{X}^{2}\\right)-[\\text{E}(\\text{X})]^{2}<br \/>\n$$<br \/>\nand,<br \/>\n$$<br \/>\n\\text{V(Y)}=\\text{E}\\left(\\text{Y}^{2}\\right)-[\\text{E(Y)}]^{2}<br \/>\n$$<\/p>\n<h3>Properties of Correlation Coefficient<\/h3>\n<p>i. The correlation coefficient between any two random variables \\(\\text{X}\\) and \\(\\text{Y}\\) satisfies,<br \/>\n$$<br \/>\n-1 \\leq \\rho(\\text{X}, \\text{Y}) \\leq 1<br \/>\n$$<br \/>\nii. Let \\(\\text{Y}=\\text{mX}+\\text{c} ; \\text{m} \\neq 0\\), then,<br \/>\n$$<br \/>\n\\rho(\\text{X, Y})=\\left\\{\\begin{array}{rc}<br \/>\n1, &amp; \\text { if } m&gt;0 \\\\<br \/>\n-1, &amp; \\text { if } m&lt;0<br \/>\n\\end{array}\\right.<br \/>\n$$<\/p>\n<h4>Note:<\/h4>\n<p>The correlation coefficient is a measure of the degree of linearity between two random variables, \\(\\text{X}\\) and \\(\\text{Y}\\). A value of \\(\\rho\\) near \\(+1\\) or \\(-1\\) indicates a high degree of linearity between \\(\\text{X}\\) and \\(\\text{Y}\\), whereas a value near 0 indicates that such linearity is absent. A positive value of \\(\\rho\\) indicates that \\(\\text{Y}\\) tends to increase when \\(\\text{X}\\) does, whereas a negative value indicates that \\(\\text{Y}\\) tends to decrease when \\(\\text{X}\\) increases. If \\(\\rho=\\mathbf{0}\\), then \\(\\text{X}\\) and \\(\\text{Y}\\) are said to be uncorrelated.<\/p>\n<h4>Example 1: Covariance and Correlation Coefficient<\/h4>\n<p>An actuary wishes to determine the number of accidents in two neighboring towns, \\(M\\) and \\(N\\). Let \\(X\\) be the number of accidents in town \\(M\\), and let \\(Y\\) be the number of accidents in town \\(N\\). The actuary has established that \\(X\\) and \\(Y\\) are jointly distributed as in the table below:<\/p>\n<p>$$\\begin{array}{c|c|c|c}<br \/>\n\\mathrm{X} &amp; 0 &amp; 1 &amp; 2 \\\\<br \/>\n\\hline 1 &amp; 0.1 &amp; 0.1&amp; 0 \\\\<br \/>\n\\hline 2 &amp; 0.1&amp; 0.1 &amp; 0.2 \\\\<br \/>\n\\hline 3 &amp; 0.2 &amp; 0.1&amp; 0.1\\\\<br \/>\n\\end{array}$$<br \/>\nCalculate \\(\\operatorname{Cov}(\\text{X, Y)}\\)<\/p>\n<h4>Solution<\/h4>\n<p>We will use the formula<\/p>\n<p>$$<br \/>\n\\operatorname{Cov(X, Y)}=\\text{E[X Y]}-\\text{E[X]E[Y]}<br \/>\n$$<br \/>\nUsing data from the table,<\/p>\n<p>$$<br \/>\n\\begin{align}<br \/>\n\\text{E}(\\text{XY}) &amp;=\\sum_{\\text {all } \\text{x}} \\sum_{\\text{all y}} \\text{xy} * \\text{f}(\\text{x}, \\text{y}) \\\\<br \/>\n&amp;=[0 \\times 1] \\times 0.1+[1 \\times 1] \\times 0.1+\\cdots+[2 \\times 3] \\times 0.1=2<br \/>\n\\end{align}<br \/>\n$$<br \/>\nThe (marginal) probability mass function of \\(\\text{X}\\) is:<\/p>\n<p>$$\\begin{array}{c|c|c|c}\\text{X}&amp; 0 &amp; 1 &amp; 2 \\\\<br \/>\n\\hline \\text{P}(\\text{X}=\\text{X}) &amp; 0.4 &amp; 0.3 &amp; 0.3 \\\\<br \/>\n\\end{array}$$<br \/>\nThus,<\/p>\n<p>$$<br \/>\n\\text{E}(\\text{X})=0 \\times 0.4+1 \\times 0.3+2 \\times 0.3=0.9<br \/>\n$$<br \/>\nThe (marginal) probability mass function of \\(\\text{Y}\\) is:<\/p>\n<p>Thus,<\/p>\n<p>$$\\begin{array}{c|c|c|c}\\mathrm{Y}&amp; 1 &amp; 2 &amp; 3 \\\\<br \/>\n\\hline \\mathbf{P}(\\mathrm{Y}=\\mathrm{y})&amp; 0.2&amp; 0.4 &amp; 0.4 \\\\<br \/>\n\\end{array}$$<br \/>\n$$<br \/>\n\\text{E(Y)}=1 \\times 0.2+2 \\times 0.4+3 \\times 0.4=2.2<br \/>\n$$<br \/>\nHence,<br \/>\n$$<br \/>\n\\operatorname{Cov}(\\text{X, Y})=2-0.9 \\times 2.2=0.02<br \/>\n$$<\/p>\n<h4>Example 2: Covariance and Correlation Coefficient<\/h4>\n<p>Using the results in Example 1 above, find the correlation coefficient between \\(\\text{X}\\) and \\(\\text{Y}\\).<\/p>\n<h4>Solution<\/h4>\n<p>We know that,<\/p>\n<p>$$<br \/>\n\\operatorname{Corr}(\\text{X}, \\text{Y})=\\frac{\\operatorname{Cov}(\\text{X}, \\text{Y})}{\\sqrt{\\operatorname{Var}(\\text{X}) * \\operatorname{Var}(\\text{Y})}}<br \/>\n$$<br \/>\nUsing the respective marginal distributions, we can calculate \\(\\operatorname{Var}(\\text{X})\\) and \\(\\operatorname{Var}(\\text{Y})\\). i.e.,<br \/>\n$$<br \/>\n\\begin{align}<br \/>\n\\operatorname{Var}(\\text{X}) &amp;=\\text{E}\\left(\\text{X}^{2}\\right)-[\\text{E}(\\text{X})]^{2} \\\\<br \/>\n&amp;=\\left[0^{2} \\times 0.4+1^{2} \\times 0.3+2^{2} \\times 0.3\\right]-0.9^{2}=0.69\\end{align}<br \/>\n$$<br \/>\nSimilarly,<br \/>\n$$<br \/>\n\\begin{align}<br \/>\n\\operatorname{Var}(\\text{Y}) &amp;=\\text{E}\\left(\\text{Y}^{2}\\right)-[\\text{E}(\\text{Y})]^{2} \\\\<br \/>\n&amp;=\\left[1^{2} \\times 0.2+2^{2} \\times 0.4+3^{2} \\times 0.4\\right]-2.2^{2}=0.56\\end{align}<br \/>\n$$<br \/>\nTherefore,<\/p>\n<p>$$<br \/>\n\\operatorname{Corr}(X, Y)=\\frac{0.02}{\\sqrt{0.69 \\times 0.56}} \\approx 0.03<br \/>\n$$<\/p>\n<h4>Example 3: Covariance and Correlation Coefficient<\/h4>\n<p>An actuary wishes to determine the relationship between the yearly number of days of hurricanes on two neighboring coasts, \\(A\\) and \\(B\\). Let \\(X\\) be the yearly number of days of hurricanes on coast \\(A\\), and let \\(Y\\) be the yearly number of days of hurricanes on coast \\(B\\). \\(X\\) and \\(Y\\) are jointly distributed as:<br \/>\n$$<br \/>\n\\text{f(x, y)}=\\frac{1}{33}(x+2 y) \\quad x=1,2 \\quad y=1,2,3<br \/>\n$$<br \/>\nCompute \\(\\operatorname{Corr}(\\text{X}, \\text{Y})\\)<\/p>\n<h4>Solution<\/h4>\n<p>First, we need,<br \/>\n$$<br \/>\n\\begin{align}<br \/>\n\\text{E}(\\text{XY})=&amp; \\sum_{\\text {all } \\text{x}} \\sum_{\\text{all} \\text{y}} \\text{xy} \\text{f}(\\text{x}, \\text{y})=\\sum_{\\text{x}=1}^{2} \\sum_{\\text{y}=1}^{3} \\text{xy} \\frac{\\text{x}+2 \\text{y}}{33} \\\\<br \/>\n=&amp;(1)(1) \\frac{(1)+2(1)}{33}+(1)(2) \\frac{(1)+2(2)}{33}+(1)(3) \\frac{(1)+2(3)}{33}+(2)(1) \\frac{(2)+2(1)}{33} \\\\<br \/>\n&amp;+(2)(2) \\frac{(2)+2(2)}{33}+(2)(3) \\frac{(2)+2(3)}{33} \\\\<br \/>\n=&amp;(1) \\frac{3}{33}+(2) \\frac{5}{33}+(3) \\frac{7}{33}+(2) \\frac{4}{33}+(4) \\frac{6}{33}+(6) \\frac{8}{33}=\\frac{38}{11}<br \/>\n\\end{align}<br \/>\n$$<br \/>\nWe also need \\(\\operatorname{Var}(\\text{X})\\) and \\(\\operatorname{Var}(\\text{Y})\\). As such, we need to find the marginal probability mass functions for \\(\\text{X}\\) and \\(\\text{Y}\\) first.<\/p>\n<p>The marginal probability mass function of \\(\\text{X}\\) is given by:<\/p>\n<p>$$<br \/>\n\\text{f(x)}=\\sum_{\\text{y=1}}^{3} \\frac{1}{33}(\\text{x}+2 \\text{y})=\\frac{\\text{x}+2(1)}{33}+\\frac{\\text{x}+2(2)}{33}+\\frac{\\text{x}+2(3)}{33}=\\frac{3\\text{x}+12}{33}, \\quad \\text{ for x=1,2}<br \/>\n$$<br \/>\nNow,<br \/>\n$$<br \/>\n\\text{E(X)}=\\sum_{\\text {all x}} \\text{x} * \\text{f}_{\\text{X}}(\\text{x})=\\sum_{\\text{x}=1}^{2} \\text{x} * \\frac{3\\text{x}+12}{33}=(1) \\frac{3(1)+12}{33}+(2) \\frac{3(2)+12}{33}=\\frac{51}{33}=\\frac{17}{11}<br \/>\n$$<br \/>\nand,<br \/>\n$$<br \/>\n\\text{E}\\left(\\text{X}^{2}\\right)=\\sum_{\\text {all x}} \\text{x}^{2} * \\text{f}_{\\text{X}}(\\text{x})=\\sum_{\\text{x}=1}^{2} \\text{x}^{2} \\frac{3 \\text{x}+12}{33}=(1)^{2} \\frac{3(1)+12}{33}+(2)^{2} \\frac{3(2)+12}{33}=\\frac{87}{33}=\\frac{29}{11}<br \/>\n$$<br \/>\nThus,<\/p>\n<p>$$<br \/>\n\\operatorname{Var}(\\text{X})=\\text{E}\\left(\\text{X}^{2}\\right)-[\\text{E}(\\text{X})]^{2}=\\frac{29}{11}-\\left(\\frac{17}{11}\\right)^{2}=\\frac{30}{121}<br \/>\n$$<br \/>\nSimilarly, the marginal probability mass function for \\(\\text{Y}\\) is given by:<br \/>\n$$<br \/>\n\\text{f}_{\\text{Y}}(\\text{y})=\\sum_{\\text{x=1}}^{2} \\frac{1}{33}(\\text{x}+2 y)=\\frac{(1)+2 y}{33}+\\frac{(2)+2\\text{y}}{33}=\\frac{4\\text{y}+3}{33}, \\text{for y=1,2,3}<br \/>\n$$<br \/>\nThe mean and the variance of \\(Y\\) can be calculated as follows:<\/p>\n<p>$$<br \/>\n\\text{E(Y)}=\\sum_{\\text{y=1}}^{3} \\text{y} \\frac{\\text{4y}+3}{33}=(1) \\frac{4(1)+3}{33}+(2) \\frac{4(2)+3}{33}+(3) \\frac{4(3)+3}{33}=\\frac{74}{33}<br \/>\n$$<br \/>\nand,<\/p>\n<p>$$<br \/>\n\\text{E}\\left(\\text{Y}^{2}\\right)=\\sum_{\\text{y}=1}^{3} \\text{y}^{2} \\frac{4 \\text{y}+3}{33}=(1)^{2} \\frac{4(1)+3}{33}+(2)^{2} \\frac{4(2)+3}{33}+(3)^{2} \\frac{4(3)+3}{33}=\\frac{62}{11}<br \/>\n$$<br \/>\nThus,<br \/>\n$$<br \/>\n\\operatorname{Var}(\\text{Y})=\\text{E}\\left(\\text{Y}^{2}\\right)-[\\text{E}(\\text{Y})]^{2}=\\frac{62}{11}-\\left(\\frac{74}{33}\\right)^{2}=\\frac{662}{1089}<br \/>\n$$<\/p>\n<p>The covariance of \\(\\text{X}\\) and \\(\\text{Y}\\) is<\/p>\n<p>$$<br \/>\n\\operatorname{Cov}(\\text{X, Y})=\\text{E(X Y)}-\\text{E(X)}{E(Y)}=\\frac{38}{11}-\\frac{17}{11} \\times \\frac{62}{33}=-\\frac{4}{363}<br \/>\n$$<br \/>\nHence,<br \/>\n$$<br \/>\n\\rho(X, Y)=\\frac{\\operatorname{Cov}(X, Y)}{\\sqrt{\\operatorname{var}(X) \\operatorname{var}(Y)}}=\\frac{-\\frac{4}{363}}{\\sqrt{\\frac{662}{1089} * \\frac{30}{121}}}=-0.02838<br \/>\n$$<\/p>\n<h4>Example 4: Covariance and Correlation Coefficient<\/h4>\n<p>Let \\(X\\) be the number of days of sickness for patient \\(A\\) and let \\(Y\\) be the number of days of sickness for patient B. \\(X\\), and \\(Y\\) is jointly distributed as:<\/p>\n<p>$$<br \/>\n\\text{f(x, y)}=\\text{c}\\left(\\text{x}^{2}+3\\text{y}\\right) \\quad \\text{x=1,2,3,4}; \\quad \\text{y=1,2}<br \/>\n$$<br \/>\nDetermine \\(\\rho(\\text{X}, \\text{Y})\\)<\/p>\n<h4>Solution:<\/h4>\n<p>First, we need to find the value of \\(\\text{c}\\) and then proceed to determine the marginal functions.<\/p>\n<p>We know that:<br \/>\n$$<br \/>\n\\begin{aligned}&amp; \\sum_{\\text{x}} \\sum_{\\text{y}} \\text{f(x, y)}=1 \\\\&amp;<br \/>\n\\Rightarrow c\\left(1^{2}+3(1)\\right)+c\\left(1^{2}+3(2)\\right)+\\cdots+c\\left(4^{2}+3(2)\\right)\\\\<br \/>\n&amp;\\Rightarrow 4 \\mathrm{c}+7 \\mathrm{c}+7 \\mathrm{c}+10 \\mathrm{c}+12 \\mathrm{c}+15 \\mathrm{c}+19 \\mathrm{c}+22=1 \\\\<br \/>\n&amp;\\therefore \\mathrm{c}=\\frac{1}{96}<br \/>\n\\end{aligned}<br \/>\n$$<br \/>\nWe know that,<br \/>\n$$<br \/>\n\\rho(\\text{X}, \\text{Y})=\\frac{\\operatorname{Cov}(\\text{X}, \\text{Y})}{\\sqrt{\\operatorname{Var}(\\text{X}) * \\operatorname{Var}(\\text{Y})}}<br \/>\n$$<br \/>\nWe need to compute \\(\\operatorname{Cov}(\\text{X}, \\text{Y}), \\operatorname{Var}(\\text{X})\\) and \\(\\operatorname{Var}(\\text{Y})\\).<\/p>\n<p>Now,<br \/>\n$$<br \/>\n\\begin{align}<br \/>\n\\text{E(X Y)} &amp;=\\sum_{\\text{x}=1}^{4} \\sum_{\\text{y}=1}^{2} \\text{xy} \\frac{\\text{x}^{2}+3\\text{y}}{96} \\\\&amp;=(1)(1) \\frac{4}{96}+(1)(2) \\frac{7}{96}+(2)(1) \\frac{7}{96}+(2)(2) \\frac{10}{96}+(3)(1) \\frac{12}{96}+(3)(2) \\frac{15}{96} \\\\<br \/>\n&amp;+(4)(1) \\frac{19}{96}+(4)(2) \\frac{22}{96}=\\frac{75}{16}<br \/>\n\\end{align}<br \/>\n$$<br \/>\nWe also need \\(\\operatorname{Var}(\\text{X})\\) and \\(\\operatorname{Var}(\\text{Y})\\). As such, we need to find the marginal probability mass functions for \\(\\text{X}\\) and \\(\\text{Y}\\) before we proceed:<\/p>\n<p>$$<br \/>\n\\begin{gather}<br \/>\n\\text{f}_{\\text{X}}(\\text{x})=\\frac{2 \\text{x}^{2}+9}{96}, \\text { for } \\text{x}=1,2,3,4 \\text{ and } \\text{f}_{\\text{Y}}(\\text{y})=\\frac{12 \\text{y}+30}{96}, \\text { for } \\text{y}=1,2 \\\\\\\\<br \/>\n\\Rightarrow \\text{E}(\\text{X})=\\sum_{\\text{x}=1}^{4} \\text{x} * \\text{f}_{\\text{X}}(\\text{x})=\\sum_{\\text{x}=1}^{4} \\text{x} \\frac{2 \\text{x}^{2}+9}{96}=(1) \\frac{11}{96}+(2) \\frac{17}{96}+(3) \\frac{27}{96}+(4) \\frac{41}{96}=\\frac{145}{48}<br \/>\n\\end{gather}<br \/>\n$$<br \/>\nand,<\/p>\n<p>$$<br \/>\n\\begin{aligned}<br \/>\n\\operatorname{Var}(\\text{X}) &amp;=\\sum_{\\text{x}=1}^{4} \\text{x}^{2} \\text{f}_{\\text{X}}(\\text{x})-[\\text{E}(\\text{X})]^{2}=\\sum_{\\text{x}=1}^{4} \\text{x}^{2} \\frac{2 \\text{x}^{2}+9}{96}-\\left(\\frac{145}{48}\\right)^{2} \\\\<br \/>\n&amp;=(1)^{2} \\frac{11}{96}+(2)^{2} \\frac{17}{96}+(3)^{2} \\frac{27}{96}+(4)^{2} \\frac{41}{96}-\\left(\\frac{145}{48}\\right)^{2}=\\frac{163}{16}-\\left(\\frac{145}{48}\\right)^{2}=1.062<br \/>\n\\end{aligned}<br \/>\n$$<br \/>\nSimilarly,<br \/>\n$$<br \/>\n\\text{E}(\\text{Y})=\\sum_{\\text{y}=1}^{2} \\text{y} * \\text{f}_{\\text{Y}}(\\text{y})=\\sum_{\\text{y}=1}^{2} \\text{y} \\frac{12 \\text{y}+30}{96}=(1) \\frac{42}{96}+(2) \\frac{54}{96}=\\frac{25}{16}<br \/>\n$$<br \/>\nand,<br \/>\n$$<br \/>\n\\operatorname{Var}(\\text{Y})=\\sum_{\\text{y}=1}^{2} \\text{y}^{2} \\frac{12 \\text{y}+30}{96}-\\left(\\frac{25}{16}\\right)^{2}=(1)^{2} \\frac{42}{96}+(2)^{2} \\frac{54}{96}-\\left(\\frac{25}{16}\\right)^{2}=\\frac{63}{256}<br \/>\n$$<br \/>\nTherefore,<br \/>\n$$<br \/>\n\\operatorname{Cov}(\\text{X, Y})=\\text{E(X Y)}-\\text{E(X)E(Y)}=\\frac{75}{16}-\\left(\\frac{145}{48}\\right)\\left(\\frac{25}{16}\\right)=-\\frac{25}{768}<br \/>\n$$<br \/>\nAnd lastly,<br \/>\n$$<br \/>\n\\rho(\\text{X, Y})=-\\frac{\\frac{25}{768}}{\\sqrt{1.062 \\times\\left(\\frac{63}{256}\\right)}}=-0.0637<br \/>\n$$<\/p>\n<p>\n<strong><em>Learning Outcome<\/em><\/strong><\/p>\n<p><strong><em>Topic 3. e: Multivariate Random Variables &#8211; Calculate joint moments, such as the covariance and the correlation coefficient.<\/em><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Let \\(\\text{X}\\) and \\(\\text{Y}\\) be two discrete random variables, with a joint probability mass function, \\(\\text{f}(\\text{x}, \\text{y})\\). Then, the random variables \\(\\text{X}\\) and \\(\\text{Y}\\) are said to be independent if and only if, $$ \\text{f}(\\text{x}, \\text{y})=\\text{f}(\\text{x}) * \\text{f}(\\text{y}), \\quad \\text&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[577,92],"tags":[],"class_list":["post-28513","post","type-post","status-publish","format-standard","hentry","category-actuarial-exam-p","category-soa","blog-post","no-post-thumbnail","animate"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only - CFA, FRM, and Actuarial Exams Study Notes<\/title>\n<meta name=\"description\" content=\"If we have two dependent discrete random variables, (X) and (Y), we would wish to establish how one varies with respect to the other.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only - CFA, FRM, and Actuarial Exams Study Notes\" \/>\n<meta property=\"og:description\" content=\"If we have two dependent discrete random variables, (X) and (Y), we would wish to establish how one varies with respect to the other.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/\" \/>\n<meta property=\"og:site_name\" content=\"CFA, FRM, and Actuarial Exams Study Notes\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-31T14:44:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-20T12:36:04+00:00\" \/>\n<meta name=\"author\" content=\"AnalystPrep Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"AnalystPrep Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/\"},\"author\":{\"name\":\"AnalystPrep Team\",\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/#\\\/schema\\\/person\\\/ed0c939f3f12a02c5a193708b713d89e\"},\"headline\":\"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only\",\"datePublished\":\"2022-08-31T14:44:50+00:00\",\"dateModified\":\"2024-11-20T12:36:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/\"},\"wordCount\":2446,\"articleSection\":[\"Actuarial Exam P\",\"SOA\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/\",\"url\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/\",\"name\":\"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only - CFA, FRM, and Actuarial Exams Study Notes\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/#website\"},\"datePublished\":\"2022-08-31T14:44:50+00:00\",\"dateModified\":\"2024-11-20T12:36:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/#\\\/schema\\\/person\\\/ed0c939f3f12a02c5a193708b713d89e\"},\"description\":\"If we have two dependent discrete random variables, \\\\(X\\\\) and \\\\(Y\\\\), we would wish to establish how one varies with respect to the other.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/actuarial-exams\\\/soa\\\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/#website\",\"url\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/\",\"name\":\"CFA, FRM, and Actuarial Exams Study Notes\",\"description\":\"Question Bank and Study Notes for the CFA, FRM, and Actuarial exams\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/#\\\/schema\\\/person\\\/ed0c939f3f12a02c5a193708b713d89e\",\"name\":\"AnalystPrep Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0828fe7fdfdcf636b2061b4c563e20cc9b7453f7cd1641b4c43edbfba896727a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0828fe7fdfdcf636b2061b4c563e20cc9b7453f7cd1641b4c43edbfba896727a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0828fe7fdfdcf636b2061b4c563e20cc9b7453f7cd1641b4c43edbfba896727a?s=96&d=mm&r=g\",\"caption\":\"AnalystPrep Team\"},\"url\":\"https:\\\/\\\/analystprep.com\\\/study-notes\\\/author\\\/analystprep-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only - CFA, FRM, and Actuarial Exams Study Notes","description":"If we have two dependent discrete random variables, (X) and (Y), we would wish to establish how one varies with respect to the other.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/","og_locale":"en_US","og_type":"article","og_title":"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only - CFA, FRM, and Actuarial Exams Study Notes","og_description":"If we have two dependent discrete random variables, (X) and (Y), we would wish to establish how one varies with respect to the other.","og_url":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/","og_site_name":"CFA, FRM, and Actuarial Exams Study Notes","article_published_time":"2022-08-31T14:44:50+00:00","article_modified_time":"2024-11-20T12:36:04+00:00","author":"AnalystPrep Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"AnalystPrep Team","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/#article","isPartOf":{"@id":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/"},"author":{"name":"AnalystPrep Team","@id":"https:\/\/analystprep.com\/study-notes\/#\/schema\/person\/ed0c939f3f12a02c5a193708b713d89e"},"headline":"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only","datePublished":"2022-08-31T14:44:50+00:00","dateModified":"2024-11-20T12:36:04+00:00","mainEntityOfPage":{"@id":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/"},"wordCount":2446,"articleSection":["Actuarial Exam P","SOA"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/","url":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/","name":"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only - CFA, FRM, and Actuarial Exams Study Notes","isPartOf":{"@id":"https:\/\/analystprep.com\/study-notes\/#website"},"datePublished":"2022-08-31T14:44:50+00:00","dateModified":"2024-11-20T12:36:04+00:00","author":{"@id":"https:\/\/analystprep.com\/study-notes\/#\/schema\/person\/ed0c939f3f12a02c5a193708b713d89e"},"description":"If we have two dependent discrete random variables, \\(X\\) and \\(Y\\), we would wish to establish how one varies with respect to the other.","breadcrumb":{"@id":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/analystprep.com\/study-notes\/actuarial-exams\/soa\/calculate-joint-moments-such-as-the-covariance-and-the-correlation-coefficient-for-discrete-random-variables-only\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/analystprep.com\/study-notes\/"},{"@type":"ListItem","position":2,"name":"Calculate joint moments, such as the covariance and the correlation coefficient for discrete random variables only"}]},{"@type":"WebSite","@id":"https:\/\/analystprep.com\/study-notes\/#website","url":"https:\/\/analystprep.com\/study-notes\/","name":"CFA, FRM, and Actuarial Exams Study Notes","description":"Question Bank and Study Notes for the CFA, FRM, and Actuarial exams","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/analystprep.com\/study-notes\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/analystprep.com\/study-notes\/#\/schema\/person\/ed0c939f3f12a02c5a193708b713d89e","name":"AnalystPrep Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0828fe7fdfdcf636b2061b4c563e20cc9b7453f7cd1641b4c43edbfba896727a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0828fe7fdfdcf636b2061b4c563e20cc9b7453f7cd1641b4c43edbfba896727a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0828fe7fdfdcf636b2061b4c563e20cc9b7453f7cd1641b4c43edbfba896727a?s=96&d=mm&r=g","caption":"AnalystPrep Team"},"url":"https:\/\/analystprep.com\/study-notes\/author\/analystprep-team\/"}]}},"_links":{"self":[{"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/posts\/28513","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/comments?post=28513"}],"version-history":[{"count":3,"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/posts\/28513\/revisions"}],"predecessor-version":[{"id":28515,"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/posts\/28513\/revisions\/28515"}],"wp:attachment":[{"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/media?parent=28513"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/categories?post=28513"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/analystprep.com\/study-notes\/wp-json\/wp\/v2\/tags?post=28513"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}