To be more specific about weighted means and means consider the following to definitions.
mean =: +/ % # wmean =: * %&(+/)[ NB. weighted mean 1 1 1 (m...@],wmean) 3 5 8 5.33333 5.33333 1 1 2 (m...@],wmean) 3 5 8 5.33333 6 On Wed, Feb 4, 2009 at 6:52 PM, Fraser Jackson <[email protected]> wrote: > This thread seems to have concentrated on forks using the primitives. That > may have been part of John's specification, but one of the joys of J is its > ability to express alternative approaches to a problem simply. I think most > of the cases of real interest arise with defined functions. > > If mean is a dyadic function with weights on the left and values on the > right, and sd is also dyadic with similar arguments, and both functions are > ambivalent with the monadic case weights of 1 > -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
