2

I came up to the concept of centers in statistics. Honestly, I never heard about this before few days ago.

Given a collection of numbers $\{x_i\}$, $i \in \{1, \ldots, N\}$, the center of order $r$ is defined as the number $c$ which minimizes the following function:

$$f_r(c) = \sum_{i=1}^N \left|x_i - c\right|^r.$$

In particular, it comes out that:

  1. The center of order $0$ is the mode of the collection $\{x_i\}$.
  2. The center of order $1$ is the median of the collection $\{x_i\}$.
  3. The center of order $2$ is the mean of the collection $\{x_i\}$.

For fun, I was able to prove point 3 (very easy) since $f$ is smooth. Point 2 is somehow hard, but I think I can solve it. Instead, for point 1, I'm having some troubles.

Consider the function $f_0(c)$. If $c \neq x_i$, then $x_i - c \neq 0$ and then $$\left|x_i - c\right|^0 = 1.$$

Therefore, if I choose $c$ such that $c \neq x_i ~\forall i$, then I get that:

$$f_0(c) = N.$$

Now, $\color{red}{\text{I assume in this context that}~ 0^0 = 0}$. That is, if $c = x_j$ for some $j$, I get:

$$\left|x_i - c\right|^0 = 0.$$

If the value of $x_j$ is repeated exactly $m$ times, then I get:

$$f_0(x_j) = N - m.$$

Therefore if $x_j$ correspond to the mode of the collection, then $m$ is maximum, and hence $f_0(x_j)$ attains its minimum.

Is this "proof" correct?


A numerical "evidence"

I consider the collection $\{1, 2, 2, 2, 3, 4, 5, 6\}$. In this case, the mean is $3.125$, the median is $2.5$ (between $2$ and $3$) and the mode is $2$.

Hereafter, I plot the function $f_r(c)$ for $r=2$ (mean) and $r=1$ (median). Also I plot the function for $r=0.1$, $r=0.01$, $r=0.001$ and $r=0.0001$.

enter image description here

the_candyman
  • 14,064
  • 4
  • 35
  • 62

2 Answers2

1

The idea is nice, but I think the mode needs to be more carefully defined.

Of course, $0^0$ is undefined. Moreover, if you are taking the limit of $x^0$ as $x \rightarrow 0,$ that limit is 1. Consequently, in many software packages 0^0 returns $1,$ on the assumption that the base $0$ is likely to be an 'underflow' (roughly, a number too small to handle within the the range of rational values the computer can represent), and not a 'genuine' $0.$

In R statistical software for example:

0^0
## 1

n = 1:6;  x = 1/(n^(n^n));  b=x^0  
cbind(n, x, b)   # 6 x 3 matrix
     n             x b
[1,] 1  1.000000e+00 1
[2,] 2  6.250000e-02 1
[3,] 3  1.311373e-13 1
[4,] 4 7.458341e-155 1
[5,] 5  0.000000e+00 1  # x is underflow
[6,] 6  0.000000e+00 1  # x is underflow

Unfortunately, this doesn't work out so well in the (presumably rarer) case, in which it's the exponent that tends to $0.$ Thus programmers do have to be careful some of the time.

n = 1:6;  x = 1/(n^(n^n));  c=0^x  
cbind(n, x, c)
     n             x c
[1,] 1  1.000000e+00 0
[2,] 2  6.250000e-02 0
[3,] 3  1.311373e-13 0
[4,] 4 7.458341e-155 0
[5,] 5  0.000000e+00 1
[6,] 6  0.000000e+00 1
BruceET
  • 51,500
  • 2
    "Of course, $0^0$ is undefined." — There's no "of course" here. As soon as you define it, it is not undefined. In the context of limits, there's no useful definition of $0^0$. In most other contexts, the most useful definition is $0^0=1$. The question is whether in this context, one should define $0^0=0$. Here I explained the question of $0^0$ in detail. $0^0=0$ is one of the sensible definitions I describe there, but I didn't see where it could be useful. It might be that this is a context where it is indeed the most useful definition. – celtschk Feb 17 '18 at 07:55
  • @celtschk for some $n > 0$, we have that $0^0 = 0^{n-n} = \frac{0^n}{0^n} = \frac 00$. If $n = 0$ then we obtain that $0^0 = \frac{0^0}{0^0}$ and therefore $$\begin{align} \frac 00 &= \frac{0^0}{0^0} \ \ \Leftrightarrow 0 &= 0^0.\end{align}$$ However, this may not be entirely true. $$\frac 33 = \frac 55 = 1,$$ but $3 \neq 5$. So how can we define $0^0$ to be equal to $0$? It seems like it is only sensible to define $0^0$ as being equal to $1$ because $$\lim_{k\to 0}k^k = 1.$$ – Mr Pie Feb 17 '18 at 08:02
  • 2
    @user477343: How can we define $0^0$ to equal $0$? Simple: Just do it. You cannot derive $0^0=0$, but you can define it, and you'll find that by doing this, that all power laws continue to hold. Note that you cannot use division by zero in your argumentation, unless you define that first. Now if you define $0^{-1}=0$, too, you no longer have $aa^{-1}=1$. But there does exist an algebraic structure where $a^{-1}$ is always defined, but in general $aa^{-1}\ne bb^{-1}$: completely regular semigroups. Indeed, with $0^0=0^{-1}=0$, $(\mathbb R,\cdot)$ is a completely regular semigroup. – celtschk Feb 17 '18 at 08:25
  • @celtschk thank you for explaining that to me :) – Mr Pie Feb 17 '18 at 08:28
  • 1
    To add, we sometimes (erroneously) say that $0^0$ is undefined, but what we really mean is that there's no way to define it so that, for any $f$ and $g$ such that $f(a) = g(a) = 0$ and both $f$ and $g$ are continuous at $x=a$, $f(x)^{g(x)}$ is also continuous at $a$. The word which describes this phenomenon is "indeterminate" and applies to other examples such as $0/0$ (and some expressions involving infinity with a careful definition of "continuous at infinity"). – Alex Jones Feb 17 '18 at 09:03
  • Thanks for your answer. Anyway, I don't understand how this can help to solve to my question. I'm aware about all the theory around $0^0$. What about the proof on the mode? – the_candyman Feb 17 '18 at 09:28
  • In your computational addendum with the nice graphs, I see you have used $r = 2,, r= 1,$ and $r \rightarrow 0.$ The purpose of my 'Answer' was announced in the first sentence: the mode needs to be more carefully defined. My extended examples in R show not $0^0$ but two relevant limiting relationships. You have discovered the useful one of the two. Now I suggest you clean up the mess by defining the relevant property of the mode in a mathematically rigorous way using a limit. You are almost there. (But the 'explanation' you liked best does not lead toward a rigorous treatment.) – BruceET Feb 17 '18 at 19:37
  • @BruceET thanks, I will try to work on this a little bit. Anyway, I did not vote any answer yet. – the_candyman Feb 18 '18 at 15:25
  • Less concerned about votes than putting ideas together for an intuitive, yet rigorous version of this idea of 'explaining' mean, median, and mode. Your graphs seem a good place to start. – BruceET Feb 18 '18 at 19:53
0

I disagree

$$f(x)=0^0 = a^x$$

using maclaurin series

$$a^x = 1 + x\ln a + \frac{x^2}{2!} (\ln a)^2 +. . . + \frac{x^n}{n!} (\ln a)^n$$

thus when $a = 0 , x= 0$

$$0^0 = 1 - \frac{0}{0} +\frac{0}{0} +. . . +(-1)^n+\frac{1}{0} \quad \text{because in} \quad 0 = -\frac{1}{0} \quad \text{i.e} \quad -\infty$$

hence $0^0 = 1 - \frac{0}{0} = \frac{0}{0}$

. : we can't assume that $0^0 = 0$

even the limit as $k \to 0$ , if the function is $k^k$ is not absolutely true

the_candyman
  • 14,064
  • 4
  • 35
  • 62
  • 1
    Please go here $\longrightarrow$ https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference – Mr Pie Feb 17 '18 at 08:31
  • 1
    There's no MacLaurin series in the context of the question. – celtschk Feb 17 '18 at 08:39
  • Thanks for your answer. Anyway, I don't understand how this can help to solve to my question. I'm aware about all the theory around $0^0$. What about the proof on the mode? – the_candyman Feb 17 '18 at 09:23