In the previous article, we introduced the basic operations of comparison between groups, and introduced in detail the implementation of the t test in JMP in the previous article. The t test is a statistical method used to test the difference between the means of two groups. This article will give you a detailed understanding of what analysis of variation (ANOVA) is, what conditions must be considered before using variation analysis, and how to use JMP to perform variation analysis ( ANOVA) and pairwise comparisons.
In this article, we take the data in Figure 1 as an example to explain.

Figure 1 Sample data
What is analysis of variation (ANOVA)?
Variation analysis decomposes the total variation of all observed values into inter-group variation and error variation, and then compares the inter-group variation with random error to determine whether the difference between the overall means is statistically significant.
Three major conditions must be met to use variation analysis
Variance analysis is a more general extension of the t test, and the t test can be regarded as a special case of variation analysis.
Therefore, the prerequisites for using variation analysis are consistent with the t test:
①Each sample is independent of each other;
②The data in each group are normally distributed;
③The number of variations between each group is equal.
This means that before conducting variation analysis, we need to perform normality test and homogeneity of variance test. Since variation analysis can only draw the conclusion of "whether there are differences between groups", which groups specifically If there are differences, further statistical analysis is still needed. In this case, the pairwise comparison method needs to be used. Common pairwise comparison methods include Bonferroni method, Tukey's HSD method and Dunnett method.
Bonferroni method
The Bonferroni method adjusts the test level when making pairwise comparisons. Usually, 0.05 is used as the test level for comparisons between groups, but when comparing pairs, there will be a 5% probability of a Type I error occurring in each comparison.
The idea behind using the Bonferroni method is to reduce the level of testing by dividing 0.05 by the number of comparisons to be made, thereby reducing false positive errors. For example, a total of 6 comparisons are required for 4 groups of pairwise comparisons, then the test level for pairwise comparisons needs to be adjusted to 0.05/6=0.0083, that is, p<0.0083 is considered to be statistically different. However, this method is not suitable for use when the number of comparisons is large, because the corrected inspection level will be too small.
Tukey'HSD method
The Tukey method is a common pairwise comparison method. This method could only be used when the number of cases in each group was equal. Later, an improved Tukey method was proposed, which can be used when the number of cases in each group is unequal. What JMP provides is the improved Tukey method, which can be used as the preferred method for pairwise comparison.
Dunnett method
Dunnett's t test is specifically used to compare the differences between a control group and multiple test groups. No comparison is made between test groups.
Analysis of variation (ANOVA) using JMP
In the data (Figure 1), if we compare the physical health scores of patients with different heart function grades, the heart function grades are divided into grades one to four. Therefore, this is a comparison between four groups and cannot be directly tested by t. Instead, multiple group comparison methods should be considered. First, click on the JMP menu "Analysis → Fit Y with X" (Figure 2) to enter the interface for comparison of differences between groups.

Figure 2 Variation analysis operation - menu selection
In this example, the physical health score is the result and the cardiac function classification is the group. Therefore, in the dialog box, put the physical health score into "Y, response" and the cardiac function classification into "X, factor" (Figure 3).

Figure 3 Variation analysis operation—variable selection
After entering the results screen, we need toCombine the results of normality test and homogeneity of variance test (Homogeneity of variance test) to select the appropriate statistical method. The analysis results are as follows:
> The normality test results show that the data in each group are normally distributed.
> The results of Homogeneity of variance test are shown in (Figure 4).
Bartlett's test and Levene's test are often used to test the homogeneity of variance in multiple sets of data. As for the use cases of the two tests are slightly different, the Bartlett test is mainly used fornormal distributioninformation, Levene test is mostly used for informationDoes not satisfy normal distributionsituation.
Read the article " Conducting Normality Tests and Variant Homogeneity Tests in JMP " to learn how to perform this test.
In this example, the data is normally distributed, so we use Bartlett's test, and the analysis result shows P=0.0224, indicating uneven variances.

Figure 4 Homogeneity of variance test results
When the data is normally distributed but does not meet the homogeneity of variance test (Homogeneity of variance test), Welch variation analysis is used. For method selection, please refer to the article <A powerful function for comparing data between all groups - fitting Y with X〉。
The results of Welch's variation analysis are shown in the last part of the Homogeneity of variance test results (Figure 5). The results showed that the difference in physical health scores between the four groups was statistically significant (F=40.2951, P<0.0001).

Figure 5 Welch variation analysis output results
If the data satisfies normality and has homogeneous variances, variation analysis can be used directly. Although from a conditional point of view, the data in this example should use Welch's test, as an example, we also introduce how to output the results of variation analysis. Click the red triangle button next to "Cardiac Function Classification-Physical Health Score" single factor analysis and select "Mean/Variation Analysis" in the drop-down menu, as shown in Figure 6.

Figure 6 Variation analysis operation - method selection
The output results are shown in (Figure 7). The results of variance analysis showed that the physical health scores of the four groups differed statistically significantly (F=16.0080, P<0.0001).

Figure 7 Variation analysis output results
It can be seen from the above analysis results that there is a certain difference between the F value of variation analysis and the Welch test result. Therefore, for comparisons between groups of continuous variables, normality and equivalence of variations must be comprehensively considered.
Pairwise comparison in JMP
If the total variation analysis result shows no statistical difference, indicating that there is no statistical difference between each group, do not make pairwise comparisons; however, if the total inter-group comparison result shows that the difference between the four groups is statistically significant, Then it is usually necessary to conduct pairwise comparisons between groups to clarify which two groups are different.
The pairwise comparison operation of normal data in JMP is completed in the "Compare Means" option. Since we want to compare the difference between any two groups, we can choose the Tukey method. The operation is shown in Figure 8.

Figure 8 Pairwise comparison operation
Click the red triangle button next to "Cardiac Function Classification-Physical Health Score" single-factor analysis, and select "Compare Means → All Pairs, Tukey HSD" in the drop-down menu.
The output results are shown in (Figure 9). The results show that except for no difference between cardiac function grades 3 and 4, there are statistical differences between other groups. The analysis results of this case show that there is a statistically significant difference in the physical health scores of people with different heart function classes (F=16.0080, P<0.0001). Except for the fact that there is no difference between heart function classes 3 and 4, there are no differences between other heart function classes. There is statistical significance.

Figure 9 Pairwise comparison output result diagram
The above is the practical sharing we bring to you in this issue. Download JMP now and try the above operations!
original:Dry information | Ideas and implementation of variance analysis and pairwise comparison
Recommended reading:
Yiwen learns three commonly used t-tests - independent sample t-test, single-sample t-test and paired t-test