comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Weighted standard deviation in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Weighted standard deviation in IDL [message #93436 is a reply to message #93435] Thu, 14 July 2016 13:03 Go to previous message
Heinz Stege is currently offline  Heinz Stege
Messages: 189
Registered: January 2003
Senior Member
On Thu, 14 Jul 2016 09:06:42 -0700 (PDT), cb16 wrote:

> Hi!
>
> What is the best way to calculate a weighted standard deviation in IDL? Is there some function that does this?

Here is an excerpt from a function of mine:

wsum=total(weight,double=double)
xmean=total(xvals*weight,double=double)/wsum
xvar=total((xvals-xmean)^2*weight,double=double)/wsum
xmean_error=(xvar/(count-1))^.5
xstdev=xmean_error*count^.5
xmin=min(xvals,max=xmax)
xrms=(xvar+xmean^2)^.5

Cheers, Heinz
[Message index]
 
Read Message
Read Message
Previous Topic: Determining number of good data points over certain dimensions of an array
Next Topic: How to obtain the name of the current routine?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:42:45 PDT 2025

Total time taken to generate the page: 0.00344 seconds