cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Sign-in to the JMP Community will be unavailable intermittently Dec. 6-7 due to a system update. Thank you for your understanding!
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.
  • JMP 19 is here! Learn more about the new features.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
profjmb
Level II

Not sure how to use "Weight" in "Analyze"

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?

10 REPLIES 10
hogi
Level XIII

Re: Not sure how to use "Weight" in "Analyze"

same example as above, with Graph Builder:

dt = New Table( "test",	Add Rows( 2 ),
	New Column( "variable", Set Values( [4, 8] ) ),
	New Column( "N", Set Values( [2000, 3000] ) ),
	New Column( "ratio", Formula( :N / Col Sum( :N )*1000 ))
);
Graph Builder(Variables( Y( :variable ), Frequency( :ratio ) ),	Elements( Bar( Y ) ));

... and the result is 6.4.
hogi_0-1728718200283.png

 

so, Graph Builder follows the same lines as the other platforms?

hogi_1-1728718512053.png

 

no -- GraphBuilder automatically switches to weight:

hogi_2-1728718545430.png

... with the previously mentioned impact on other statistics like Median 

 

 


@hogi wrote:

All this definitely makes sense
but nevertheless: surprising when you see it the first time.
and: dangerous - if you don't see it ;) 



And the counts (previous post), why is the graph misleading?
Freq doesn't have an impact on Counts - neither in Graph Builder nor in Summary Statistics.
[-> I added a comment to the post on summary statistics]

Recommended Articles