jtfns 1 2 2 4 6  NB. correct
1 1.5 2 5 6
   five 1 2 2 4 6  NB. doesn't work if repetitions in data
1 1 2 5 6


On Tue, May 6, 2014 at 2:54 AM, Joe Bogner <[email protected]> wrote:

> From http://webdocs.cs.ualberta.ca/~smillie/Jpage/jsp601.ijs
>
> require 'stats'
> Q2=: median
> Q1=: [: Q2 ] #~ Q2 > ]
> Q3=: [: Q2 ] #~ Q2 < ]
> NB. Summaries
>
> five=: <./,Q1,Q2,Q3,>./
>
>    five 1 3 4 6 9
> 1 2 4 7.5 9
> On May 6, 2014 12:51 AM, "Kip Murray" <[email protected]> wrote:
>
> > The list 6 9 3 1 has left and right sublists 6 9 and 3 1, the list 6 9 3
> 1
> > 4 has left and right sublists 6 9 and 1 4 .  The middle number, if there
> is
> > one, is not included in the left and right sublists.
> >
> > You know the median of 6 9 3 1 is the median of 1 3 6 9 which is 4.5, and
> > the median of 6 9 3 1 4 is the median of 1 3 4 6 9 which is 4.
> >
> > The "fourths" f1 and f4 of a list y are respectively the medians of the
> > left sublist and right sublist of /:~ y .
> >
> > Write a verb to find John Tukey's "five number summary" minimum , f1 ,
> > median, f3 , maximum of a list y.
> >
> > --Kip Murray
> >
> >
> > --
> > Sent from Gmail Mobile
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to