Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #16110
| From | "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: Another little puzzle |
| Date | 2022-12-21 22:54 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <tnvvb3$ot1$1@gioia.aioe.org> (permalink) |
| References | (1 earlier) <algorithm-20221221130021@ram.dialup.fu-berlin.de> <tnv0ia$uein$3@dont-email.me> <874jtovgao.fsf@bsb.me.uk> <tnvhb2$1vkb$1@gioia.aioe.org> <tnvocb$1i1c$1@gioia.aioe.org> |
On 2022-12-21 20:55, Mike Terry wrote:
> The OP was probably deliberately rather vague on this point! The
> easiest definition for "average" literally doesn't make sense in a
> modulo context: we can ADD the modular values, but in general dividing
> in such a mathematical setting doesn't make much sense, so
>
> Average ([i=1,2,..n] x_i) =[def]= Sum ([i=1,2,..n] x_i) /n
>
> would be inappropriate due to the /n operation.
Unless you calculate everything as reals or integers and then take the
remainder of 24. Which is kind of most natural definition, at least to me.
> HOWEVER, there's another characterisation for the average of a set,
> which looks more promising in a modular (or other more general)
> setting: the average is the value of V which MINIMISES THE "ERROR"
> calculated by
>
> error = Sum ([i=1,2,..n] (V - x_i)^2)
>
> that is, minimises the sum of squares of differences from V.
This has exactly same problem as above, because subtraction and
multiplication (power of two) have different semantics in modular
arithmetic.
> [Incidentally, if we minimise the sum of absolute differeces from V,
> that characterises the mode (aka "midpoint") of the sample, but I think
> the median is more what is wanted here...]
Actually it is the same beast. Median is the least C-norm defined as |x-y|.
Mean is the least Euclidean norm (squares), the thing you proposed.
Mean and average are same for real numbers.
You are right that median (and C-norm) can be unambiguously defined in
modular numbers. But nobody would ever qualify this as a puzzle! (:-))
[...]
> Now, as to how to CALCULATE the V above???
As I said, in real numbers V is the mean, i.e.
V = Sum (Xi) =def= mean({Xi | i=1..n})
i=1..n
Any numeric method is in the end mapping Xi to some normal number,
calculating a classic mean, mapping back. The problem is with the
forward mapping being ambiguous. One method to disambiguate is staying
within the same day. Another could be taking a median and considering 12
hours before and 12 hours after it. And there are many more.
P.S. There are differences between the average and mean. OP referred the
average, which may mean something completely counterintuitive (no pun
intended (:-))
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-21 13:09 +0000
Re: Another little puzzle Ben Bacarisse <ben.usenet@bsb.me.uk> - 2022-12-21 17:05 +0000
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-21 17:21 +0000
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-21 18:55 +0100
Re: Another little puzzle Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2022-12-21 19:55 +0000
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-21 22:54 +0100
Re: Another little puzzle Mike Terry <news.dead.person.stones@darjeeling.plus.com> - 2022-12-22 00:01 +0000
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-21 16:05 -0800
Re: Another little puzzle David Brown <david.brown@hesbynett.no> - 2022-12-22 16:50 +0100
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-22 08:30 -0800
Re: Another little puzzle David Brown <david.brown@hesbynett.no> - 2022-12-22 22:06 +0100
Re: Another little puzzle Richard Heathfield <rjh@cpax.org.uk> - 2022-12-22 21:30 +0000
Re: Another little puzzle David Brown <david.brown@hesbynett.no> - 2022-12-23 13:46 +0100
Re: Another little puzzle Y A <angel0000000001000000000000@mail.ee> - 2023-01-09 21:26 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-22 14:15 -0800
Re: Another little puzzle David Brown <david.brown@hesbynett.no> - 2022-12-23 13:47 +0100
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-23 08:33 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-25 15:52 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-26 06:32 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-26 06:34 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-23 08:35 -0800
Re: Another little puzzle "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2022-12-22 09:10 +0100
Re: Another little puzzle Ǝ <angel00000100000@mail.ee> - 2022-12-30 18:18 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-21 14:47 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-23 08:35 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-25 15:52 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-26 06:32 -0800
Re: Another little puzzle Julio Di Egidio <julio@diegidio.name> - 2022-12-26 06:33 -0800
Re: Another little puzzle Y A <angel0000000001000000000000@mail.ee> - 2023-01-09 21:26 -0800
csiph-web