I want to do something really simple. For simplicity's sake, assume I have two groups, let's say with N=2,000 in group 1 and N=3,000 in group 2. I'd like to compute an overall mean of a variable Y that is collected for each group. Y's mean in group 1 is 4 and in group 2 is 8. The overall mean here would be the unweighted mean and not the weighted mean–it should be 6. I might have thought that I should put in the following values for "Weight":
Group 1: 5,000/2,000
Group 2: 5,000/3,000
But those don't yield the expected number. Can you help me understand the "Weight" option in Analyze:JMP and tell me what weights I need to use for my problem?
Unless I'm misreading your post, one path to finding each group's mean value is to structure the data table with two columns, "Group" as a nominal variable, and "Y" as continuous variable in the second column. Then a simple Distribution platform run with the "Group" variable in the By window, and the "Y" variable in the Y, columns window and you will get two histograms and summary statistic tables, one for each value in the "Group" column. You don't need to bother with the Weight window.
First, Weight is not Freq. If you know what Freq does, then Weight does something different, or extra.
I would like to point to the following two SAS articles:
In my word, using Weight only if you want to change how individual observations impact your analysis. For example, as in the second article above, one may want to temper the influence of outliers to the analysis.
So whether you want to use weight or not, and how to use it, you may want to ask your self, how it may impact your analysis and how to interpret the impact.
In the example that you gave, and by the way that you describe, I can only imagine that you have some sort of summary data, then you want to use Weight to "correct" the contributions from summary statistics from individual groups. But I am not aware of any JMP platforms were designed to handle summary data, other than some tools under Help>Sample Index. If you data is in its original form, you don't need Weight as my colleague has said.
I think, I understand what you want, but not what for it is needed. And I agree to the answers above, that weight might not be the proper way.
If you want to do it simple, I would use the 2 step approach, first calculating the group means, and then calculating the means of the means (ignoring the frequency).
So this means you want each group weighted evenly, and the average is 6, see second screenshot.
But standard in JMP is, that each row has the same weight, as others pointed out already. And if you really need to do this in one "stacked table", you need to calculate the weights in that way, that the result is what you want, but this might get quite complicate and confusing using more groups - so I do not recommend.
Just for illustration see script below.


Names Default To Here( 1 );
// generate example table
dt = New Table( "test weight",
add rows( 5000 ),
New Column( "group", formula( If( Row() > 2000, "B", "A" ) ) ),
New Column( "value", formula( If( Row() > 2000, Random Normal( 8, 1 ), Random Normal( 4, 1 ) ) ) ),
New Column( "weight", formula( If( Row() > 2000, 5000 / 6000, 5000 / 4000 ) ) ),
New Column( "mean", formula( Col Mean( :value ) ) ),
New Column( "group mean", formula( Col Mean( :value, :group ) ) )
);
dt << add properties to table(
{new script(
"By Distribution",
Distribution( Stack( 1 ), Continuous Distribution( Column( :value ), Horizontal Layout( 1 ), Vertical( 0 ) ), By( :group ) )
), new script(
"Weighted Distribution",
Distribution( Stack( 1 ), Continuous Distribution( Column( :value ), Horizontal Layout( 1 ), Vertical( 0 ) ), weight( :weight ) )
)}
);
dt_sum = dt << summary( subgroup( :group ), Mean( value ) );
dt_sum << New Column( "all mean", Formula( Mean( :"Mean(value, A)"n, :"Mean(value, B)"n ) ) );