Correlation analysis is a common statistical analysis method. The purpose is to study whether there is a certain correlation between two or more variables. How to determine whether the correlation between variables is positive or negative? How to use JMP to perform relevant analysis? In today's article, we will explore correlation analysis, including Pearson correlation, Spearman correlation and partial correlation.
What is correlation analysis (correlation analysis) ?
To understand correlation analysis, you first need to know 2 terms – correlation coefficient (r), correlation
- The size of the correlation coefficient r indicates that the larger the r, the stronger the correlation.
- The positive and negative values of r are reflections. Positive values represent positive correlation, and negative values represent negative correlation.
The correlation coefficient r refers to the Pearson correlation coefficient, and its value range is between -1 and 1. r=0 represents no linear correlation. In fact, in addition to linear correlation, there are also a large number of nonlinear correlations, such as logarithmic correlation, parabolic correlation, etc. . Generally, |r|>0.7 is considered a high correlation; 0.5-0.7 is a medium correlation; 0.3-0.5 is a weak correlation. However, there is no mandatory classification of correlation levels. Different fields have their own emphasis. For example, sociological phenomena can reach 0.7. There are very few, and there are many medical laboratory indicators reaching above 0.9.
- First draw a scatter plot to determine whether there is a linear correlation
Therefore, before conducting correlation analysis, it is best to draw a scatter plot to initially explore the correlation of the data. Only when the data shows a linear correlation, the Pearson correlation coefficient will be considered. If the scatter plot shows that there may be a non-linear relationship between two variables, you can consider variable transformation of one of the variables and then calculate the correlation coefficient.
- High correlation does not mean causation
In addition, it should be noted that correlation does not mean causation. For example, the number of swimming deaths is positively correlated with sorbet sales. We cannot infer that eating sorbet will increase the risk of swimming deaths.
Variables A and B are correlated. In addition to the causal relationship between A and B, another reason may be that another variable C affects A and B at the same time, causing A and B to show a false correlation on the surface. For example, in the example of sorbet sales and the risk of swimming deaths, hot weather is variable C, which simultaneously leads to an increase in swimming deaths and sorbet sales.
Pearson related, Spearman Correlation and partial correlation
- When two variables present a normal distribution, the correlation is usually measured by the Pearson correlation coefficient.
- If there are variables that do not conform to the normal distribution, the Spearman correlation coefficient is usually used to measure the correlation.
- If you want to know the magnitude of the correlation coefficient between two variables after controlling for other variables, you can calculate the partial correlation coefficient, such as the correlation between weight and blood pressure after controlling for the influence of age.
According to the data in (Figure 1), explore the correlation between BMI and physical health score, as well as the partial correlation coefficient between BMI and physical health score after adjusting for age.

Figure 1 Sample data
how to JMP Medium operation Pearson related to Spearman Related
Both Pearson correlation and Spearman correlation can be realized through the JMP menu "Analysis" → "Multiple Methods" → "Multiple", as shown in Figure 2.

Figure 2 Related analysis operations - menu selection
In the "Multiple and Correlation" interface, place the BMI and physical health score in the "Y, column" (Figure 3).

Figure 3 Related analysis operations—variable selection
The default results output the Pearson correlation coefficient matrix (Figure 4) and the scatter plot matrix (Figure 5). It can be seen that the Pearson correlation coefficient of the two variables is 0.1479.

Figure 4 Correlation analysis operation—correlation coefficient matrix

Figure 5 Related analysis operations—scatter plot matrix
>> Use JMP for statistics, predictive modeling, and data exploration <<
Since both BMI and physical health scores do not conform to the normal distribution, the Spearman correlation coefficient needs to be output. You can click "Non-parametric correlation → Spearman ρ" (Figure 6).

Figure 6 Non-parametric correlation operation – menu operation
The results are shown in Figure 7, and the Spearman correlation coefficient is 0.1739.

Figure 7 Non-parametric correlation operation - result output
If you want to display other results, you can click the red triangle button on the left side of "Multiple" to output (Figure 6). If you want to output the corresponding P value, you can click on the correlation probability; if you want to output the confidence interval of the correlation coefficient, you can click on the correlation. Confidence interval.
multivariate partial correlation
After understanding the correlation between BMI and physical health scores, we also wanted to explore the partial correlation coefficient between BMI and physical health scores after adjusting for age.
Partial correlation is also achieved through the JMP menu "Analysis" → "Multivariate Methods" → "Multiple". At the same time, drag the three variables of age, BMI and physical health score into the "Y, column" in Figure 2.
In the results interface, click the red triangle button to the left of "Multivariate" and click "Partial Correlation" and "Partial Correlation Probability" in the drop-down menu (Figure 8) to output the partial correlation coefficient and its P value.

Figure 8 Partial correlation operation - menu selection
The output results are shown in Figure 9. After correcting for the influence of age, the correlation between BMI and physical health score increased slightly, from 0.1479 to 0.1940, indicating that Age has some influence on the relationship between these two variables, but the influence is limited .

Figure 9 Partial correlation operation - result output
The above is an introduction to related analysis. Welcome to try JMP for free to start your first analysis.

>> Learn statistics easily <<
Recommended reading:
Perform normality test and variation number homogeneity test in JMP
Analysis of variation (ANOVA) and pairwise comparison thinking and analysis methods
Understand the chi-square test: an analytical tool for comparison between groups of categorical data
Extensions of the chi-square test: rank data rank sum test, trend chi-square and paired chi-square
Introduction to Design of Experiments (DOE): Classic Screening Design and Full Factorial Design