Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

 6 edited tags | link edited Jul 31 '15 at 0:51 Glen_b 225k2323 gold badges449449 silver badges801801 bronze badges 5 added 667 characters in body edited Jul 20 '15 at 11:55 xyguo 5855 bronze badges Suppose there are $$n$$ data values $$x_1，and I've found a partition number $$k$$, such that $$\left|\frac{1}{k}\sum_{i=1}^k(x_i-\hat{\mu_k})^2-\frac{1}{n-k}\sum_{j=k+1}^n(x_j-\hat{\mu}_{n-k})^2\right|$$ is minimal. Here $$\hat{\mu}_k$$ is the mean of the first $$k$$ values, and $$\hat{\mu}_{n-k}$$ is the mean of the last $$n-k$$ values. But is this optimal partition unique for any set of mutually different data values? How could I prove the uniqueness (or the opposite)? Furthermore, under what conditions would the solution be unique? -- EDIT 1 -- @Glen_b has given a nice answer which let me notice that the original problem description is incomplete in some sense. The method to partition two datasets by minimizing their variance difference is a heuristic way to do binary classification, and it works in practice. So I'm thinking of the underlying theoretical aspects of the particular problem. In practice the data are affected by noise and will never distributed in some regular symmetric style. Now if I assume the data are generated by a mixture of two Gaussian distribution with equal variance, is it possible to prove that the method mentioned above generates a meaningful result? Suppose there are $$n$$ data values $$x_1，and I've found a partition number $$k$$, such that $$\left|\frac{1}{k}\sum_{i=1}^k(x_i-\hat{\mu_k})^2-\frac{1}{n-k}\sum_{j=k+1}^n(x_j-\hat{\mu}_{n-k})^2\right|$$ is minimal. Here $$\hat{\mu}_k$$ is the mean of the first $$k$$ values, and $$\hat{\mu}_{n-k}$$ is the mean of the last $$n-k$$ values. But is this optimal partition unique for any set of mutually different data values? How could I prove the uniqueness (or the opposite)? Furthermore, under what conditions would the solution be unique? Suppose there are $$n$$ data values $$x_1，and I've found a partition number $$k$$, such that $$\left|\frac{1}{k}\sum_{i=1}^k(x_i-\hat{\mu_k})^2-\frac{1}{n-k}\sum_{j=k+1}^n(x_j-\hat{\mu}_{n-k})^2\right|$$ is minimal. Here $$\hat{\mu}_k$$ is the mean of the first $$k$$ values, and $$\hat{\mu}_{n-k}$$ is the mean of the last $$n-k$$ values. But is this optimal partition unique for any set of mutually different data values? How could I prove the uniqueness (or the opposite)? Furthermore, under what conditions would the solution be unique? -- EDIT 1 -- @Glen_b has given a nice answer which let me notice that the original problem description is incomplete in some sense. The method to partition two datasets by minimizing their variance difference is a heuristic way to do binary classification, and it works in practice. So I'm thinking of the underlying theoretical aspects of the particular problem. In practice the data are affected by noise and will never distributed in some regular symmetric style. Now if I assume the data are generated by a mixture of two Gaussian distribution with equal variance, is it possible to prove that the method mentioned above generates a meaningful result? 4 formatting, layout, tags edited Jul 19 '15 at 0:05 Glen_b 225k2323 gold badges449449 silver badges801801 bronze badges Suppose there are $$n$$ data values $$x_1，and I've found a partition number $$k$$, such that $$\left|\frac{1}{k}\sum_{i=1}^k(x_i-\hat{\mu_k})^2-\frac{1}{n-k}\sum_{j=k+1}^n(x_j-\hat{\mu}_{n-k})^2\right|$$ is minimal. Here $$\hat{\mu}_k$$ is the mean of the first $$k$$ values, and $$\hat{\mu_{n-k}}$$$$\hat{\mu}_{n-k}$$ is the mean of the last $$n-k$$ values.    But is this optimal partition unique for any set of mutually different data values? How could I prove the uniqueness (or the opposite)? Furthermore, under what conditions would the solution be unique? Suppose there are $$n$$ data values $$x_1，and I've found a partition number $$k$$, such that $$\left|\frac{1}{k}\sum_{i=1}^k(x_i-\hat{\mu_k})^2-\frac{1}{n-k}\sum_{j=k+1}^n(x_j-\hat{\mu}_{n-k})^2\right|$$ is minimal. Here $$\hat{\mu}_k$$ is the mean of the first $$k$$ values, and $$\hat{\mu_{n-k}}$$ is the mean of the last $$n-k$$ values.  But is this optimal partition unique for any set of mutually different data values? How could I prove the uniqueness (or the opposite)? Furthermore, under what conditions would the solution be unique? Suppose there are $$n$$ data values $$x_1，and I've found a partition number $$k$$, such that $$\left|\frac{1}{k}\sum_{i=1}^k(x_i-\hat{\mu_k})^2-\frac{1}{n-k}\sum_{j=k+1}^n(x_j-\hat{\mu}_{n-k})^2\right|$$ is minimal. Here $$\hat{\mu}_k$$ is the mean of the first $$k$$ values, and $$\hat{\mu}_{n-k}$$ is the mean of the last $$n-k$$ values.  But is this optimal partition unique for any set of mutually different data values? How could I prove the uniqueness (or the opposite)? Furthermore, under what conditions would the solution be unique? Tweeted twitter.com/#!/StackStats/status/622541024376791044 occurred Jul 18 '15 at 22:58 3 grammar correction for clarity edit approved Jul 18 '15 at 15:33 Gavin M. Jones 621212 bronze badges 2 added 65 characters in body edited Jul 17 '15 at 15:27 xyguo 5855 bronze badges 1 asked Jul 17 '15 at 13:50 xyguo 5855 bronze badges