## Linear Correlation in Discrete mathematicsThe linear correlation can be described as a measurement of dependence between two random variables. There are various characteristics in the linear correlation, which are described as follows: - The range of linear correlation is between -1 and 1.
- The linear correlation is proportional to covariance.
- The interpretation of covariance and linear correlation is very similar to each other.
## Definition of Linear CorrelationSuppose there are two random variables, X and Y. The linear correlation coefficient is also known as Pearson's correlation coefficient. We can define the linear correlation coefficient between the variables X and Y in the following way:
Cov[X, Y] is used to indicate the covariance between X and Y. stdev[X] stdev[Y] are used to indicate the standard deviations of X and Y. If there is Cov[X, Y], stdev[X], and stdev[Y], only after that, we can define the linear correlation coefficient. We can often denote it as . ## Zero Standard deviationsIf stdev[X] and stdev[Y] both standard deviations are strictly greater than zero, only after that, the ratio will be well defined. If one of two standard deviations is 0, only after that, we can often assume that Corr[X, Y] = 0. When one of two standard deviations is 0, then the above assumption is also equivalent to assuming that 0/0 = 0 because of Cov[X, Y] = 0. ## InterpretationThe interpretation of linear correlation and the interpretation of covariance are very similar with each. With the help of correlation between X and Y, we can see the similarities between their derivations. The range of linear correlation between -1 to 1 is described as follows: With the help of correlation, we can easily know about the intensity of linear dependence between two random variables, which are described as follows: - The positive linear dependence between variables X and Y will be stronger if the closer correlation is 1 or it is closer to 1.
- The negative linear dependence between variables X and Y will be stronger if the closer correlation is -1 or it is closer to -1.
## TerminologyIn the case of linear correlation, there are some terminologies that are often used. These terminologies are described as follows: - The variables X and Y will be known as positively linearly correlated if Corr[X, Y] > 0. We can simply call it positively correlated.
- The variables X and Y will be known as negatively linearly correlated if Corr[X, Y] < 0. We can simply call it negatively correlated.
- The variables X and Y will be known as linearly correlated if Corr[X, Y] ≠ 0. We can call it simply correlated.
- The variables X and Y will be known as uncorrelated if Corr[X, Y] = 0. We can also notice that Cov[X, Y] = 0 ? Corr[X, Y] = 0. If there is a case where Cov[X, Y] = 0, then two random variables, X and Y will be known as uncorrelated.
Now we will also assume that the support of X is: R The joint probability mass function of X is shown below: The support of X R The probability mass function of X The expected value of X The expected value of X The variance of X Var[X = 1 - (-1/3) The standard deviation of X
The support of X R And probability mass function of X The expected value of X The expected value of X The variance of X Var[X = 1 - (1/3) The standard deviation of X The expected value of X Hence, the covariance between X Cov[X The linear correlation coefficient is described as follows: ## Correlation of Random variable with itselfIf there is a random variable X, then it will contain the following property: Corr[X, X] = 1
We can prove this in the following way: While proving this, we have used a fact that is described as follows: Cov[X, X] = Var[X] ## SymmetryThe linear correlation coefficient must be symmetric like this: Corr[X, Y] = Corr[Y, X]
We can prove this in the following way: While proving this, we have use a fact covariance is symmetric, which is described as follows: Cov[X, Y] = Cov[Y, X] ## Examples of Linear correlation coefficientThere are various examples of the linear correlation coefficient, and some of them are described as follows:
In this example, we have a 2*1 discrete random vector which is denoted by X. The components of this vector are X Now we will assume that the support of X is: Its joint probability mass function is described as follows: Here we have to calculate the coefficient of linear correlation between the components X
The support of X R Its marginal probability mass function is described as follows: The expected value of X The expected value of X The variance of X Var[X = 8/5 - (6/5) = (40-36)/25 = 4/25 The standard deviation of X
So the support of X R Its marginal probability mass function is described as follows: The expected value of X The expected value of X The variance of X Var[X = 101/5 - (21/5) = (505-441)/25 = 64/25 The standard deviation of X The expected value of X Hence, the covariance between X Cov[X = 22/5 - (6/5) * 21/5 = (110-126)/25 = -16/25 The coefficient of linear correlation between X
In this example, we have a 2*1 discrete random vector, which is denoted by X. The entries of X are X Now we will assume that the support of X is: Its joint probability mass function is described as follows: Here we have to calculate the coefficient of linear correlation between the entries X
The support of X R Its marginal probability mass function is described as follows: The mean of X The expected value of X The variance of X Var[X = 14/3 - (2) = (14-12) /3 = 2/3 The standard deviation of X
The support of X R Its probability mass function is described as follows: The mean of X The expected value of X The variance of X Var[X = 14/3 - (2) = (14-12) /3 = 2/3 The standard deviation of X The expected value of X Hence, the covariance between X Cov[X = 13/3 - 2 * 2 = (13-12) /3 = 1/3 The coefficient of linear correlation between X
In this example, we have a continuous random vector [X, Y], and we will assume that the support of this vector is: R Its joint probability density function is described as follows: Here we have to calculate the coefficient of linear correlation between X and Y.
The support of Y is described as follows: R The marginal probability density function of Y will be zero when there is a case y ? R Thus, we can get the marginal probability density function of Y in the following way: The expected value of Y is described as follows: The expected value of Y The variance of Y is described as follows: Var[Y] = E[Y = 7/3 - (3/2) = (28-27) /12 = 1/12 The standard deviation of Y is described as follows:
The support of X is described as follows: Rx = [0, ∞) The marginal probability density function of X will be zero when there is a case x ? R In this case, the integral cannot be explicitly computed for the density function but we can use the following way to write the marginal probability density function of X like this: The expected value of X is described as follows: The expected value of X The variance of X is described as follows: Var[X] = E[X = 1/4 - (1/2 In(2)) = ¼ [1 - (In(2)) = 1/12 The standard deviation of X is described as follows: The expected value of XY can be calculated with the help of Transformation theorem like this, which is described as follows: Hence, the covariance between X and Y will become as follows when we put these pieces together: Cov[X, Y] = E[XY] - E[X] E[Y] = 1/2 - 1/2 In(2) * 3/2 = 1/2 - 3/4 In(2) The coefficient of linear correlation between X and Yis described as follows: |