Explore Courses
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Birla Institute of Management Technology Birla Institute of Management Technology Post Graduate Diploma in Management (BIMTECH)
  • 24 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Popular
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science & AI (Executive)
  • 12 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
University of MarylandIIIT BangalorePost Graduate Certificate in Data Science & AI (Executive)
  • 8-8.5 Months
upGradupGradData Science Bootcamp with AI
  • 6 months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
OP Jindal Global UniversityOP Jindal Global UniversityMaster of Design in User Experience Design
  • 12 Months
Popular
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Rushford, GenevaRushford Business SchoolDBA Doctorate in Technology (Computer Science)
  • 36 Months
IIIT BangaloreIIIT BangaloreCloud Computing and DevOps Program (Executive)
  • 8 Months
New
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Popular
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
Golden Gate University Golden Gate University Doctor of Business Administration in Digital Leadership
  • 36 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
Popular
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
Bestseller
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
IIIT BangaloreIIIT BangalorePost Graduate Certificate in Machine Learning & Deep Learning (Executive)
  • 8 Months
Bestseller
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in AI and Emerging Technologies (Blended Learning Program)
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
ESGCI, ParisESGCI, ParisDoctorate of Business Administration (DBA) from ESGCI, Paris
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration From Golden Gate University, San Francisco
  • 36 Months
Rushford Business SchoolRushford Business SchoolDoctor of Business Administration from Rushford Business School, Switzerland)
  • 36 Months
Edgewood CollegeEdgewood CollegeDoctorate of Business Administration from Edgewood College
  • 24 Months
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with Concentration in Generative AI
  • 36 Months
Golden Gate University Golden Gate University DBA in Digital Leadership from Golden Gate University, San Francisco
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Deakin Business School and Institute of Management Technology, GhaziabadDeakin Business School and IMT, GhaziabadMBA (Master of Business Administration)
  • 12 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science (Executive)
  • 12 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityO.P.Jindal Global University
  • 12 Months
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (AI/ML)
  • 36 Months
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDBA Specialisation in AI & ML
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
New
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGrad KnowledgeHutupGrad KnowledgeHutAzure Administrator Certification (AZ-104)
  • 24 Hours
KnowledgeHut upGradKnowledgeHut upGradAWS Cloud Practioner Essentials Certification
  • 1 Week
KnowledgeHut upGradKnowledgeHut upGradAzure Data Engineering Training (DP-203)
  • 1 Week
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
Loyola Institute of Business Administration (LIBA)Loyola Institute of Business Administration (LIBA)Executive PG Programme in Human Resource Management
  • 11 Months
Popular
Goa Institute of ManagementGoa Institute of ManagementExecutive PG Program in Healthcare Management
  • 11 Months
IMT GhaziabadIMT GhaziabadAdvanced General Management Program
  • 11 Months
Golden Gate UniversityGolden Gate UniversityProfessional Certificate in Global Business Management
  • 6-8 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
IU, GermanyIU, GermanyMaster of Business Administration (90 ECTS)
  • 18 Months
Bestseller
IU, GermanyIU, GermanyMaster in International Management (120 ECTS)
  • 24 Months
Popular
IU, GermanyIU, GermanyB.Sc. Computer Science (180 ECTS)
  • 36 Months
Clark UniversityClark UniversityMaster of Business Administration
  • 23 Months
New
Golden Gate UniversityGolden Gate UniversityMaster of Business Administration
  • 20 Months
Clark University, USClark University, USMS in Project Management
  • 20 Months
New
Edgewood CollegeEdgewood CollegeMaster of Business Administration
  • 23 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
KnowledgeHut upGradKnowledgeHut upGradBackend Development Bootcamp
  • Self-Paced
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 5 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
upGradupGradDigital Marketing Accelerator Program
  • 05 Months

What is Correlation in Statistics? Definition, Examples

Updated on 22 August, 2023

2.09K+ views
8 min read

What Is Correlation in Statistics?

Correlation can be described as a statistical measure that quantifies the relationship between two entities. It enables us to understand the extent to which changes in one variable are related to the changes in the other variable. A small example to help you understand what is Correlation positively might include the height and weight of a person. Taller people tend to be much heavier than shorter people. 

Correlation has been one of the most commonly used tools for describing relationships without making any statement about cause and effect. There are primarily three main types of Correlation. They are,

  • Positive Correlation- When two variables move in the same direction, it indicates a positive correlation. This means that if one variable increases, the other will also increase.
  • Negative Correlation – Contrary to positive Correlation, negative Correlation is when two variables move in opposite directions. This means that if one variable increases, the other will decrease. 
  • No Correlation – This occurs when there is no linear relationship between two variables, and they tend to behave differently.

What is the Correlation Coefficient in R?

In R programing language, the correlation coefficient is denoted by the symbol ‘r’ and is calculated using the ‘cor()’ function. The syntax for the same is as follows,

cor(x, y, method = …)

Here, ‘x’ and ‘y’ refer to the numeric data frames that represent the two variables for which we want to calculate the Correlation.

‘method’ signifies an optional argument that specifies the type of method used to calculate the Correlation. 

The correlation coefficient ranges from -1 to +1 

  • When it is closer to +1, it signifies that there is a positive relationship between the two variables.
  • When it is closer to -1, it indicates a negative relationship between the two variables.
  • A correlation coefficient of 0 means that there is no form of linear relationship between the two variables.

Check out our free courses to get an edge over the competition.

Types of Correlation Coefficient

In statistics, we primarily deploy two main types of correlation coefficients to measure the strength of the relationship between two variables. They are, namely,

Pearson’s Product Moment Correlation

Pearson’s Product Moment correlation, also known as the Bivariate Correlation, is a descriptive statistic that measures the strength and direction of the linear relationship between two continuous variables. It is denoted by the symbol, ‘r’ and is often used in situations where,

  • Both variables are quantitative
  • The variables normally distributed
  • There are no outliers in the data 
  • There is a linear relationship

If the relationship is not linear, then other correlation coefficients, such as Spearman’s rank correlation and Kendall’s rank correlation, are deployed. 

Spearman’s Rank Correlation

Spearman’s rank correlation, also known as Spearman’s rho, is a non-parametric measure of the strength and direction of the relationship between two variables. Contrary to Pearson’s correlation coefficient, the former is used when the data is ordinal or when the relationship between two variables is not linear. It is particularly beneficial when dealing with data that may not meet the assumptions of normality or when dealing with ranked data. This is primarily because Spearman’s rank correlation utilises the rank of the values. The data is ranked from the smallest to largest initially, and then the correlation coefficient is calculated based on the designated ranks.

upGrad’s Python Programming Bootcamp can be an excellent way to decode these concepts as it takes your journey to the next level! Get trained by industry experts and unlock exciting opportunities in the world of technology!

Learn data science courses online from the World’s top Universities. Earn Executive PG Programs, Advanced Certificate Programs, or Masters Programs to fast-track your career.

Calculate Correlation Using Excel

Mentioned below is a step-by-step guide to how you can calculate correlation coefficients using Excel.

 Determine your data sets

The first and foremost step before beginning with the calculation is to decide on the variables. In this example, we have taken two variables, namely x and y, with values,

x: (1,2,3,4) and y (2,3,4,5) 

Calculate the mean of the x and y variables

We then use the Average function to calculate the mean of the x and y variables. The function operates by adding the values of each variable together and then dividing them by the total number of values in the dataset. For example, to calculate the mean of the X variable, we add the value 1,2,3,4 and divide it by four since x has four possible values. Similarly, we perform the same operation for y with its respective values.

Subtract the mean

In a new column, we now subtract the mean from each x-variable as well as the y-variable separately. The result generated will be called a and b, respectively. 

Multiply and find the sum

Following this, we multiply each a-value with its matching b-value, and the total result that is generated will act as the numerator of the correlation formula.

Take the square root

In this step, we use the SQRT function to determine the square root of the number that is obtained in the above-mentioned step. This will act as the denominator of the formula.

Divide

Finally, we divide the denominator by the numerator, and the end result will be the correlation coefficient between the two data sets.

If it returns a positive value, then it indicates a positive correlation; a negative value, on the other hand, signifies a negative correlation. If the value is close to zero, then it means that there is little to no correlation between the two variables.

Kendall Correlation

Kendall’s rank correlation coefficient, also referred to as Kendall’s tau, measures the strength and direction of the association between two variables. It is a non-parametric measure of Correlation that is commonly used when dealing with ordinal data or when the assumption of normality is not met. It is also considered to be one of the best alternatives to Spearman’s Correlation, especially when your sample size is small or has many tied ranks. To calculate Kendall’s tau, we use the below-mentioned formula,

Kendall’s Tau = (C – D / C + D)

Here, C refers to the number of concordant pairs, and D denotes the number of discordant pairs.

However, calculating Kendall’s tau manually can be quite time-consuming at times. Therefore, many statistical software packages such as R, Python and Excel provide built-in functions that can automatically compute Kendall’s tau efficiently. This helps to save up a lot of time and effort, especially when you are working with a large dataset.

The Data Analytics 360 Cornell Certificate Program from upGrad can help you leverage correlation statistics in the right way to further help you understand basic concepts and enhance your data analytics journey.

Limitations of Correlation

Now that you have a detailed understanding of what is correlation coefficient let’s take a look at some of its limitations. Such include,

  • Correlation does not imply causation. Just because two variables are correlated, we cannot infer that one causes the other. There could always be the chances of underlying factors or variables that can influence the relationship. 
  • Correlation can only measure the strength and direction of the association between two variables. This means that when it comes to capturing complex relationships where the direction of influence changes over time or is based on other conditions, Correlation cannot generate the desired results.
  • Correlation can accurately measure only the linear relationship between two variables. This means that if a non-linear relationship is present, then Correlation might not accurately represent the strength of the association.

Examples of Correlation 

Listed below are a few correlation examples to help you better understand what positive and negative Correlations signify.

Positive correlation

Positive Correlation, as stated previously, is when one variable increases, then the other variable will also increase. A small example of the same includes,

When there is a rise in the temperature, then the sale of ice creams also increases. 

Negative Correlation

A negative Correlation is when one variable increases, then the other variable decreases, and vice versa. For example,

People who spend long hours of time watching TV tend to score lesser marks on their exam papers.

No Correlation

No correlation is when there is no clear relationship between the two variables. This means that the changes in one variable do not correspond to the changes in the other variables. For example,

There may not be a consistent relationship between height and shoe size across a diverse group of people.

Conclusion

Despite diverse limitations, Correlation still remains one of the most valuable tools for exploring relationships between variables and gathering valuable insights into patterns and associations in data. In this article, we have explored what is correlation coefficient, its types, and some real-life correlation examples. With this, hopefully, you have been able to clear all your doubts and queries regarding this topic. 

If you wish to know more or pursue a career in this field of Data Science, then do not forget to check out upGrad’s Graduate Certificate Programme in Data Science and AI. This 6.5 month’s course is specifically designed for engineers and IT professionals who wish to learn about all the intricacies of Data Science. It also comes alongside a plethora of benefits such as 24*7 student support, industry-partnered projects, and live training sessions for acing job interviews. 

Frequently Asked Questions (FAQs)

1. How is the Pearson correlation coefficient calculated?

Pearson's correlation coefficient is a measure of the linear relationship between two variables. It assesses the strength and direction of the relationship. The Pearson correlation coefficient formula is, r = Σ((Xi - X̄) * (Yi - Ȳ)) / √(Σ(Xi - X̄)^2 * Σ(Yi - Ȳ)^2).

2. What is the significance of the correlation coefficient value?

The correlation coefficient value serves as a powerful tool in statistics to understand the relationship between two variables. It generates valuable information related to the degree and direction of the association, which in turn can be utilised to make well-informed decisions across various fields such as finance, economics and data analysis. For example, if the value is closer to +1, it indicates a positive correlation, and if the value is closer to -1, there is a negative correlation.

3. Can you explain the concept of correlation coefficient?

The correlation coefficient r is a statistical measure that helps researchers understand the association between two variables and make predictions accordingly. It takes values between -1 and +1 and is used to quantify the strength and direction of the linear relationship between two numerical variables.