<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Weighted Standard Deviation in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376169#M62594</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does JMP calculate a weighted standard deviation (when a variable is&amp;nbsp; selected in the weighting tab in the Distribution Platform?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Fanie&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:28:38 GMT</pubDate>
    <dc:creator>fanienel</dc:creator>
    <dc:date>2023-06-10T23:28:38Z</dc:date>
    <item>
      <title>Weighted Standard Deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376169#M62594</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;How does JMP calculate a weighted standard deviation (when a variable is&amp;nbsp; selected in the weighting tab in the Distribution Platform?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Fanie&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:28:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376169#M62594</guid>
      <dc:creator>fanienel</dc:creator>
      <dc:date>2023-06-10T23:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376365#M62622</link>
      <description>&lt;P&gt;The calculation is described here: &lt;A href="https://en.wikipedia.org/wiki/Weighted_arithmetic_mean#Weighted_sample_variance" target="_self"&gt;weighted arithmetic mean&lt;/A&gt;. Use these formulas to understand the quantities in the results.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="weighted s.gif" style="width: 148px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32045i4B8F2DD44C184C0E/image-size/large?v=v2&amp;amp;px=999" role="button" title="weighted s.gif" alt="weighted s.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the script to illustrated the calculation steps. Open the Log before running the scripts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

// open examle
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

dt &amp;lt;&amp;lt; New Column( "Row Weight", Numeric, Continuous,
	Values(
		[0.466037725564092, 3.88878780649975, 2.4091640743427, 2.11785415420309,
		4.79403748759069, 2.30050488375127, 1.58066931064241, 3.18035316769965,
		1.57862229505554, 0.304837201256305, 3.91091752331704, 2.63118736562319,
		3.27893625595607, 3.02616479573771, 1.75871466752142, 1.95901472005062,
		1.4666282152757, 2.11275573237799, 2.02008433057927, 4.89492299617268,
		0.493469994980842, 4.89886545110494, 2.22502982476726, 4.72375275800005,
		0.830245516262948, 1.67820788919926, 3.44848407898098, 4.0259948768653,
		3.2834971731063, 4.52901363372803, 3.88477634754963, 4.72076337435283,
		4.64333190233447, 3.1073961337097, 0.579181439243257, 2.74820194579661,
		0.191317443968728, 2.94498334173113, 2.51307534286752, 1.23225981369615]
	)
);

// launch distribution analysis
biv = dt &amp;lt;&amp;lt; Distribution(
	Weight( :row weight ),
	Continuous Distribution(
		Column( :height ),
		Customize Summary Statistics(
			Sum Wgt( 1 ),
			Variance( 1 ),
			Corrected SS( 1 ),
			Set Alpha Level( 0.05 )
		)
	),
	SendToReport(
		Dispatch( {}, "height", OutlineBox, {Set Title( "weighted height" )} )
	)
);

// compute weight standard deviation and show intermediate results
y = :height &amp;lt;&amp;lt; Get As Matrix;		// data
w = :row weight &amp;lt;&amp;lt; Get As Matrix;	// weights
n = Sum( w );						// sum of weights

wYBar = (w`*y / n)[1];				// weighted average

ss = (w`*(y-wYBar)^2)[1];			// corrected weighted sum of squares
var = ss / (N Row( y )-1);			// weighted variance, unbiased

s = Sqrt( var );					// weighted standard deviation

Show(  wYbar, s, ss, var );			// view all results in Log&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 16:50:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376365#M62622</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-04-13T16:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376384#M62628</link>
      <description>&lt;P&gt;HI Mark,&lt;/P&gt;&lt;P&gt;Thank you,&amp;nbsp; I do appreciate your&amp;nbsp; input.&lt;/P&gt;&lt;P&gt;So, I assume then the&amp;nbsp; standard deviation printed in the distribution platform&amp;nbsp; when a weight column&amp;nbsp; property&amp;nbsp; has&amp;nbsp; been set should not be used?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 17:17:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376384#M62628</guid>
      <dc:creator>fanienel</dc:creator>
      <dc:date>2021-04-13T17:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376388#M62629</link>
      <description>&lt;P&gt;Why do you assume that you should not use it?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 17:20:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376388#M62629</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-04-13T17:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376401#M62631</link>
      <description>&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;I am drowning in my own ignorance...&lt;/P&gt;&lt;P&gt;I&amp;nbsp; calculated&amp;nbsp; the weighted mean of a dataset in Excel and compared it to JMP. The results did not match.&lt;/P&gt;&lt;P&gt;The formula I used in is:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fanienel_0-1618336423371.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/32048i7362CB441DE2A44D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fanienel_0-1618336423371.png" alt="fanienel_0-1618336423371.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This agrees with the code except:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;var = ss / (N Row( y )-1);			// weighted variance, unbiased&lt;/CODE&gt;&amp;nbsp;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;should be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;var = ss / ((N Row( y )-1/N Row(y))*n;			// weighted variance, unbiased&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Clearly I do not understand&amp;nbsp; this.&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Fanie&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 18:12:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376401#M62631</guid>
      <dc:creator>fanienel</dc:creator>
      <dc:date>2021-04-13T18:12:44Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376435#M62634</link>
      <description>&lt;P&gt;It is not a matter of ignorance. There are at least four definitions of the weight standard deviation or variance. The definitions differ only in the denominator that is used. That is to say that the weighted mean and weight sum of squares are the same in all the definitions. JMP only implements one of the four definitions. Other software might implement this definition or one of the others.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Apr 2021 19:53:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Weighted-Standard-Deviation/m-p/376435#M62634</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2021-04-13T19:53:56Z</dc:date>
    </item>
  </channel>
</rss>

