What is the use of the Five Number Summary? If there are only a few numbers, just list them. If there are plenty of numbers then the minimum number and maximum number give little information. The better way of summarizing a lot of numbers is to provide the mean value and the standard deviation, I think. M=.+/%# NB. Mean value R=.M&.:*: NB. Root mean square D=.-M NB. Deviation from mean S=.R@D NB. Standard deviation A=.M,.S NB. Arithmetic mean and standard deviation G=.A&.:^. NB. Geometric mean and standard deviation Thanks. Bo.
Den 8:18 onsdag den 7. maj 2014 skrev Linda Alvord <[email protected]>: Hopefully this will be more readable. I tried to write something that high >school students could understand: > >A=:6 9 3 1 > B=:6 9 3 1 4 > l=: 13 :'(i.<.-:#y){/:~y' > r=: 13 :'(i.<.-:#y){|./:~y' > > me=: 13 :'-:+/((<.,>.)-:<:#y){/:~y' > > (<./;([:me l);me;([: me r);>./)A >--T-T---T---T-┐ >│1│2│4.5│7.5│9│ >L-+-+---+---+-- > > (<./;([:me l);me;([: me r);>./)B >--T-T-T---T-┐ >│1│2│4│7.5│9│ >L-+-+-+---+-- > >Now I'll look at your other answers and see if I can simplify it even more. > >Linda > >-----Original Message----- >From: [email protected] >[mailto:[email protected]] On Behalf Of Linda Alvord >Sent: Tuesday, May 06, 2014 5:39 PM >To: [email protected] >Subject: Re: [Jprogramming] Five Number Summary > >Kip, I get the same result as Raul. No need to load 'stats'. My new mean >does not include @ . > > > >l=: 13 :'(i.<.-:#y){y' >r=: 13 :'|.(i.<.-:#y){|.y' > >me=: 13 :'-:+/((<.,>.)-:<:#y){/:~y' >(<./;([:me l);me;([: me r);>./)1 2 2 4 6 >--T---T-T-T-┐ >│1│1.5│2│5│6│ >L-+---+-+-+-- > >I'm happy because the definition is all forks. > >5!:4 <'me' >-- [: >+- -: >│ -- [: >│ +- / --- + >--+ │ -- [: >│ │ │ -- <. >│ │ +----+- , >L----+ │ L- >. >│ ------+ >│ │ │ -- [: >│ │ │ +- -: >│ │ L----+ -- [: >L-----+ L----+- <: >│ L- # >+- { >L- ~ --- /: > > >It looks better in J ! > >Linda > >-----Original Message----- >From: [email protected] >[mailto:[email protected]] On Behalf Of Kip Murray >Sent: Tuesday, May 06, 2014 5:15 PM >To: [email protected] >Subject: Re: [Jprogramming] Five Number Summary > >Tukey used the name "fourths" because they are a little different from >quartiles. > >On Tuesday, May 6, 2014, Joe Bogner <[email protected]> wrote: > >> On Tue, May 6, 2014 at 4:33 PM, Kip Murray ><[email protected]<javascript:;>> >> wrote: >> >> > 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 4:33 PM, Kip Murray ><[email protected]<javascript:;>> >> wrote: >> >> > five 1 2 2 4 6 NB. doesn't work if repetitions in data >> > 1 1 2 5 6 >> > >> > >> It's interesting that R gives even a different result ( >> http://en.wikipedia.org/wiki/Five-number_summary#Example_in_R) >> >> > z <- c(1,2,2,4,6) >> > fivenum(z) >> [1] 1 2 2 4 6 >> > summary(z) >> Min. 1st Qu. Median Mean 3rd Qu. Max. >> 1 2 2 3 4 6 >> >> >> For the 1st quartile, Excel gives 2 with QUARTILE.INC and 1.5 >> with QUARTILE.EXC >> For the 3rd, Excel gives 4 and 5 respectively >> >> So R is following the "INC" method >> >> http://stats.stackexchange.com/questions/28123/quartiles-in-excel is an >> interesting read >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > > >-- >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 > > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
