The correlation coefficient is a measure of how well two things are related. The correlation coefficient, abbreviated as r, indicates how well data in a scatter diagram follow a straight line. The closer the actual r value is to one, the better a linear equation can represent the data. There is next to no straight-line association in data sets with r values close to zero. The data collection is aligned if r = 1 or r = –1.
The following are the three different types of correlation coefficients:
The following formula can be used to represent the sample correlation coefficient:
r=∑[(xi−x)(yi−y)]√Σ(xi−x)2 ∗ Σ(yi−y)2
(xi, yi)=a pair of data
x̅ =mean of xi
s(y) =deviation of the y coordinates’ second coordinates (i)
ȳ = mean of yi
To begin the computation, generate a checklist of the variables you’ll be using. After you’ve created the data sets, plug these figures into your equation. These values are separated using the x and y variables.
Use the following equation to determine the standardized value for each x(i) variable after you’ve selected your data sets.
(z(xi)) = (xi – x̅) / s(x)
After you’ve determined the standardized value for each x(i), use the following equation to determine the standardized value for each y(i).
(z(yi))= (yi – ȳ) / s(y)
Multiply the standardized values obtained in the previous steps. Use the formula shown below:
(z(xi)) * (z(yi))
After you’ve multiplied the numbers, add them up to get the total.
Use n to denote the total points in this information pair in the next step. Subtract n–1 from the result obtained in step 4.
The correlation coefficient is used to assess the strength of the relationship between two variables. The correlation coefficient is prefixed with the condition of the relationship between two variables. The correlation coefficient is represented as ‘r’. You can choose the highest coefficient of correlation by understanding the variables or information you are working with.