Hi: sorry, I don’t know your name. Also. I apologize for not replying sooner: I on a brief vacation in the Adirondacks. I have no WiFi and only intermittent cellphone service.
You are of course right about x^0. The quantities you get in this way are really averages rather than higher moments, which I think can be seen on dimensional grounds. Take i i=4. The the derivative of the function is _4*+/(y-t)^3, which vanishes for some t expressed in the units of y. On the other hand, the uncentered third moment of y is the average of y^3, and the centered moment the average of (y-mu)^3, where mu is the mean of y. Both of these are in units of y^3. The forms I have given are minima of the L_i norms of y-t, and are really averages of one sort or another, thought of as minimizing some measure of dispersion. The fact that the mean minimizes the squared distance is used all the time in statistics. Thanks for your interest, and hope this helps. Best wishes, John Sent from my iPhone > On Jul 26, 2020, at 8:17 AM, ethiejiesa via Programming > <[email protected]> wrote: > > John, > >> You can encapsulate mode, median and mean in a single formula. Suppose y is >> a data vector and t is a scalar. The a value of t which minimizes >> +/ (|y-t)^i [with special meaning for x^0: see below] is >> - A mode of y if i=0. >> -A median of y if i=1. >> -The mean of y if i=2. > > Neat! With a little calculus we can show that such a t satisfies > ( (t>y) =&(+/@(#&(|y-t) ^ i-1:)) t<y ). So t is a "higher-order average" of > sorts. This feels connected to distribution moments, but I don't immediately > see the precise relationship. > > Thanks for sharing. > >> Here x^0 meas 1 if x=0 and 0 if x is nonzero. > > Hrm, I believe we want this the other way around. > ---------------------------------------------------------------------- > For information about J forums see > https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.jsoftware.com%2Fforums.htm&data=02%7C01%7Crandall%40newark.rutgers.edu%7C5db4278823694a4a196008d8315de172%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C637313626585441257&sdata=V%2BeQd9D%2FqNrJP5ALR7D6gfcNYCkgW5ZxEcgfQSRfX3w%3D&reserved=0 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
