By using the By variable in the Col Mean function, you can calculate the average value for each level of the By variable.
For example, if you want to find the average value of the column "Height (inches)" in the JMP sample data "Big Class.jmp" for each of the levels F and M in the column "Gender," create the following formula:
Col Mean関数Col Mean function
To create the above formula in "Big Class.jmp", follow these steps:
- Open the JMP sample data "Big Class.jmp" and select "Columns" -> "New Column" from the menu.
- When the "Create New Column" window appears, specify a column name and go to "Column Properties" -> "Formula".
- The formula editor will appear, so click ``Statistics'' → ``Col Mean'' on the left side of the window.
- Click the column "Height (inches)" from the list of column names in the center of the Formula Editor.
- Enter a comma (,) on your keyboard.
- Click the column "Gender" from the list of column names in the center of the formula editor (the column specified here will be the By variable).
- Click Apply in the bottom right of the Formula Editor window, then click OK.
- You will be returned to the "Create New Column" window, so click "OK".
* If you want to copy and paste the formula equivalent to the above into the formula editor, you can use the following.
Col Mean(:”身長(インチ)”n, :性別)
*The By variable can be used not only with Col Mean, but also with many other functions that begin with Col, such as Col Sum and Col Stddev, so the content introduced in this FAQ can also be applied to other functions.
For details about each function, please refer to the description of each function in the online help below.