Correlation analysis is a common statistical analysis method. The purpose is to study whether there is some kind of correlation between two or more variables. How to judge whether the correlation between variables is positive or negative? How to perform correlation analysis using JMP? In today's article, let's 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 nouns - 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 reflected, positive values indicate positive correlation, and negative values indicate negative correlation.
The correlation coefficient r refers to the Pearson correlation coefficient, and its value ranges from -1 to 1. r=0 represents no linear correlation. In fact, in addition to the linear correlation, there are also a large number of nonlinear correlations, such as logarithmic correlation, parabolic correlation and so on. Generally |r|>0.7 is considered high correlation; 0.5-0.7 is moderate correlation; 0.3-0.5 is weak correlation, but there is no mandatory classification of correlation, and different fields have their own emphasis. For example, sociological phenomena can reach 0.7 There are very few of them, and the medical laboratory index reaches more than 0.9 everywhere.
- First draw a scatter plot to determine whether it is a linear correlation
Therefore, before performing correlation analysis, it is best to draw a scatter plot to initially explore the correlation of the data. Only when the data is linearly correlated, the Pearson correlation coefficient should be considered. If the scatter plot shows a possible non-linear relationship between two variables, consider applying a variable transformation to one of the variables before calculating the correlation coefficient.
- High correlation does not imply causation
Also, it is important to note that correlation does not imply causation, for example, swimming deaths are positively correlated with sorbet sales, and we cannot infer that eating sorbet increases 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 has an impact on 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 swimming death risk, hot weather is variable C, causing both swimming deaths and sorbet sales to rise.
Pearson related, Spearman correlation and partial correlation
- When two variables are normally distributed, the Pearson correlation coefficient is usually used to measure the correlation.
- 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 effect of age.
Based on the data (Fig. 1), we explored the correlation between BMI and physical fitness score, and the partial correlation coefficient between BMI and physical fitness score after adjusting for age.

Figure 1 Example data
how to JMP middle operation Pearson related to Spearman related
Both Pearson correlation and Spearman correlation can be achieved through the JMP menu "Analyze" → "Multivariate Methods" → "Multivariate", as shown in Figure 2.

Figure 2 Correlation analysis operation - menu selection
In the Multivariate and Correlations screen, place BMI and Physical Fitness Score in the "Y, Column" (Figure 3).

Figure 3 Correlation analysis operation - 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 Correlation Analysis Operation - Scatter Plot Matrix
>> Statistics, predictive modeling, and data mining with JMP <<
Since both BMI and physical health scores do not conform to the normal distribution, the Spearman correlation coefficient needs to be output, and you can click "Nonparametric Correlation → Spearman ρ" (Figure 6).

Figure 6 Nonparametric Dependency Operations – Menu Operations
The results are shown in Figure 7, and the Spearman correlation coefficient was 0.1739.

Figure 7 Nonparametric Correlation Operation - Result Output
If you want to display other results, you can click the red triangle button to the left of "Multivariate" to output (Figure 6). If you want to output the corresponding P value, you can click the correlation probability; if you want to output the confidence interval of the correlation coefficient, you can click the correlation confidence interval.
Multivariate Partial Correlation
After knowing the correlation of BMI and physical fitness score, we also wanted to explore the partial correlation coefficient between BMI and physical fitness score after adjusting for age.
Partial correlation is also achieved through the JMP menu "Analyze" → "Multivariate Methods" → "Multivariate". At the same time, the three variables of age, BMI and physical fitness score are dragged 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 adjusting for the effect of age, the correlation between BMI and physical fitness score increased slightly, from 0.1479 to 0.1940, indicating that Age has some but limited effect on the relationship between these two variables .

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

>> Learn statistics easily <<
Recommended reading:
Normality and variance homogeneity tests in JMP
Analysis of variance (ANOVA) and the thinking context and analysis method of pairwise comparison
Understanding the Chi-Square Test: An Analytical Artifact for Comparison Between Groups of Categorical Data
Extensions of Chi-Square: Rank-Sum Test, Trend Chi-Square, and Paired Chi-Square
Introduction to Design of Experiments (DOE): Classical Screening Designs and Full Factorial Designs