These are my favorite one-liners. deduce =: %~`*`:3"2@(,:(%:@*-.))@(+/@[%~1,,:)
predict =: (deduce~-@>:)~ induce =: (,:0:)+[predict(-+/)~ Examples. First line of result: mean values. Second line of result: standard deviations. 50 30 20 deduce 9 NB. from the population, deduce the sample 4.5 2.7 1.8 1.43812 1.31806 1.15049 50 30 20 predict 9 NB. from the sample, predict the unknown 4.45631 2.70874 1.83495 1.55655 1.42798 1.25428 50 30 20 induce 109 NB. from the sample, induce the population 54.4563 32.7087 21.835 1.55655 1.42798 1.25428 Thanks! Bo. Den lørdag den 14. marts 2020 18.08.00 CET skrev Skip Cave <[email protected]>: mean or average (+/%#) smallest and largest (<./,>./) multiplication table (and addition, subtraction, division) */~i.10 Skip Cave Cave Consulting LLC On Sat, Mar 14, 2020 at 11:16 AM 'PMA' via Chat <[email protected]> wrote: > Hi, J gurus -- > > I hazarded to regale a non-programmer friend > with J's (+/i.1000000). She loved this, so > I've followed with a link to NuVoc, and now > she loves that! > > So I want to ask, could y'all suggest a list > of maybe a dozen favorite J one-liners, that > I could send too? > > (Somewhere, I've still got one for APL from > eons ago.) > > I know you're busy. Thanks in advance. > > Pete > ---------------------------------------------------------------------- > 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
