or define bias=: (#%~[:<:#) NB. Ratio of N to N-1
and varB=: bias*var stddevB=: ([:%:bias)* stddev covB=:([:bias])*cov On 1/14/08, Devon McCormick <[EMAIL PROTECTED]> wrote: > > Would it be possible to include biased (population) versions of the common > statistical functions in "statfns.ijs"? > > One reason I'm asking is that I often work with Excel and it has biased > (eg VARP) versus unbiased (eg VAR) versions of many functions. > > I've just spent some time figuring out that the reason the J "cov" verb > does not agree with Excel's "COVAR" is because Excel (inconsistently?) uses > the biased measure by default and J defaults to the unbiased one. > > So, would it be helpful to have something like the following included in > the standard distribution of statfns in the future or can someone tell me > why Excel is being silly? > > varB=: (ssdev % #) NB. biased variance > stddevB=: %: @ varB NB. biased standard deviation > covB=: (spdev % # @ ]) NB. biased covariance=Excel > > -- > Devon McCormick, CFA > ^me^ at acm. > org is my > preferred e-mail > -- Devon McCormick, CFA ^me^ at acm. org is my preferred e-mail ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
