In the previous article "A Magical JMP Function Table, Realizing the Comparison of All Groups of Data", we introduced the more commonly used methods between groups and the basic features of JMP operations. At the beginning of this article, we will separately compare several common The method of comparison between groups and its operation process are introduced one by one. Today's article will start with a comparison between groups of continuous variables.

For the comparison of continuous variables between groups, if you want to choose a reasonable analysis method, there are several preconditions that must be considered first, namely normality and homogeneity of variance (Homogeneity of variance).
What is normality and homogeneity of variance?
Common data distribution patterns include normal distribution, Poisson distribution, exponential distribution, etc. The normality test refers to the test for judging whether the population conforms to the normal distribution. The test for homogeneity of variance is a test for whether the variance between samples in each group is the same.
In the practical application of comparison between continuous variable groups, a common mistake many people make is that they do not consider whether the data conform to the normal state or the variance, but directly use t-test or analysis of variance (ANOVA) to perform statistical analysis on the data, and it is correct The analysis process is to look at what your data distribution looks like before choosing a method.
The content of this article is to introduce two important conditions that need to be considered before choosing a statistical method: how to judge whether the data meets the normal distribution, and how to judge whether the variance between groups is equal. Only when these two conditions are determined can a reasonable analysis method be selected.
exist JMP Normal check
Next, let's take a look at how to use the "distribution" platform in JMP to achieve normality verification. Take the data in (Figure 1) as an example to explore whether there is a difference between the BMI values of smoking and non-smokers. First, we need to normalize the BMI value. Test, and then judge whether to use t test or rank sum test based on the data distribution.

Figure 1-Data used in this article
It should be noted that when comparing between groups, it is necessary to divide into groups to perform a normal state test, that is, to test the distribution of BMI between the two groups of smoking and non-smokers, rather than the distribution of BMI values for all people. Next, I will explain how to perform specific operations. First, select "Analysis" → "Distribution" (Figure 2).

Figure 2-The first step of normal verification operation
Because we want to explore the distribution of BMI between smokers and non-smokers, BMI is the result and smoking is the group. So put BMI into "Y, row" in the dialog box; put smoking into "basis" (Figure 3). The output result is shown in Figure 4.

Figure 3-Schematic diagram of normal verification operation step 2

Figure 4-Output result
"Basis" is often seen in JMP, which means "separately" or "stratified". For example, dragging smoking into the basis means performing operations on smokers and non-smokers separately. This is different from "grouping", which means comparison between groups, such as comparing the differences between smokers and non-smokers. In subsequent articles, we will explain this concept.
If you are not accustomed to this vertical bar graph and want to turn the bar graph horizontally, you can click the triangle button in the upper left corner of the result interface, and select "Stack" in the drop-down menu (Figure 5).

Figure 5-Schematic diagram of stacking operation
The output result is shown in Figure 6. Here are various statistics of the BMI of the two groups of smokers and non-smokers, including the mean, standard deviation, median, first & third quartiles, etc.

Figure 6-Output result
Click the red triangle button on the left of "BMI", and click "Continuous Fit" → "Fit Normal" in the drop-down menu (Figure 7).

Figure 7-The third step of normal verification operation
The result of normal fitting is shown in Figure 8.

Figure 8 Output result
Click the red triangle button on the left, and click "Goodness of Fit" in the drop-down menu (Figure 9), and the normal test results will be displayed.

Figure 9-Schematic diagram of normal verification operation step 4
The result of the normality test is shown in (Figure 10). The p-value is equal to 0.9128 and greater than 0.05. It cannot be considered that the normal distribution is not satisfied, that is, it cannot be concluded that the data does not obey the normal distribution. Therefore, the data can be treated as a normal distribution. analyze.

Figure 10-Normal Verification Results
The normal test method of BMI for non-smokers is the same as above, and the results are shown in (Figure 11), which is an abnormal distribution.

Figure 11-Normal verification results
According to the results of the normal test above, we should use the rank sum test for comparison between groups, because in the two sets of data, as long as any set of data is abnormally distributed, the "rank sum test" must be used for comparison between groups.
exist JMP Achieve the homogeneity test of variance in
If, when comparing between groups, it is found that the two sets of data are normally distributed, it does not mean that the t test can be directly performed, and the homogeneity test of the variance is also required to determine whether the t test should be used next or the adjusted t test (T' test).
What is the homogeneity test of variance?
The test for homogeneity of variance is a test for whether the variances between groups are the same. Why do we need to test the homogeneity of variance? Because when comparing between groups, if the variance between groups is too large, the difference in the mean will be masked, leading to wrong conclusions.
Commonly used methods for testing the homogeneity of variance are:
F Bilateral test, Brown-Forsythe test, Levene test, Bartlett check sum and O'Brien test. Among them, the F-bilateral test is used to test the homogeneity of the variance of two sets of data; the others are used to test the homogeneity of the variance of multiple sets of data. In practice, the Levene method and the Bartlett method are more commonly used, but the Bartlett method can only be used for normal data. The Levene method can also be used for abnormal data and has a wider range of applications.
Take the data in (Figure 1) as an example. If you analyze whether there are differences in physical health scores between people with different degrees of breathing difficulties, first perform a normality test. If the test results find that the two groups of data are in a normal distribution, then perform the homogeneity of the variance Verification.
Variance homogeneity test is an important step for comparison between groups, and its operation is implemented in the JMP function table "fit X with Y" module. In the previous article, we have briefly introduced the operation of comparison between groups.
Choose "Analyze" → "Fit Y with X". In this case, the physical health score is the result, and the degree of dyspnea is the group. So put the physical health score into "Y, response" in the dialog box, and put the degree of breathlessness into "X, factor", see (Figure 12) for the operation.

Figure 12-Difference verification operation
Click the red triangle button next to the single factor analysis of "Dyspnea-Physical Health Score", and select "Unequal Variance" from the drop-down menu (Figure 13).

Figure 13 The operation of the homogeneity test of variance
The output result is shown in Figure 14. If the p-value of the variance homogeneity test is greater than 0.05, it can be considered that the variance is homogeneous.

Figure 14-Results of the homogeneity test of variance
This case is a test for the homogeneity of the variance of the two groups. Either test result can be selected (because the two groups are special cases of multiple groups), and each test result shows P<0.05, then the corrected t test (t' test) ).
Note: If it is a test of homogeneity of variance of multiple sets of data, the result of F bilateral test will not appear in the result.
The above are some methods and precautions for the homogeneity test based on the normality check of the total and variance of the JMP shared today. In the next article, we will introduce how to perform t test in JMP. Stay tuned! Download JMP and start your data analysis journey.
original: How to implement normality test and homogeneity of variance test in JMP?
[Recommended reading] #10 must-learn skills for data analysis