What values of $q_1 + q_2 + \dots + q_n = 1$ minimise $q_1^2 + q_2^2 + \dots + q_n^2$? In context, take an $n$-sided die where the probability it lands on $i$ is $q_i$, $q_i>0$. Then the probability of rolling the same number twice is  $q_1^2 + q_2^2 + \dots + q_n^2$. I am interested in which values of $q$ minimise this probability and how I would go about proving that, preferably in a simple way such a problem makes me think would exist.
Intuitively I thought it would be that all $q_n=1/n$, since otherwise, we must have some $q_i>1/n$, and $q_i^2$ grows fast. When trying to piece together an argument that $x$ outgrows $x^2$ when $x<1/2$, but for a minimisation of $n$ variables, this became very unrigorous very quickly.
 A: Form a vector $e$ whose entries are $1$. You want to minimize $q^2$ subject to $q\cdot e=1$. By Cauchy-Schwarz, $nq^2\ge(q\cdot e)^2$ with equality iff $q\parallel e$. This gives $q_i=1/n,\,q^2=1/n$.
A: By symmetry, if $(q_1^*, \ldots, q_n^*)$ is an optimal solution, so is any permutation of it.
But the objective $q_1^2 + \ldots + q_n^2$ is strictly convex, so the optimal solution must be unique.  Therefore the optimal solution must be invariant under permutations, i.e. all $q_i^*$ are equal, and it's easy to see the common value must be $1/n$.
A: If $q_i \not= q_j$ for some $i \not= j$, then replacing $(q_i,q_j)$ with $\left(\frac{q_i+q_j}{2},\frac{q_i+q_j}{2}\right)$ preserves the equality constraint and reduces the objective value by
$$q_i^2+q_j^2-2\left(\frac{q_i+q_j}{2}\right)^2 = \frac{(q_i-q_j)^2}{2}>0.$$
That is, every solution other than $(1/n,\dots,1/n)$ can be improved.
Note that this elementary argument does not rely on Cauchy-Schwarz, convexity theorems, or calculus.
A: Method of Lagrange multipliers:
$$\begin{aligned}L&=\sum_{i=1}^n q_i^2 - \lambda \left(\sum_{i=1}^n q_i -1\right)\\
0 &= \frac{\partial L}{\partial q_i} = 2 q_i - \lambda
\end{aligned}$$
Thus, all $q_i$'s are equal.  Each $\displaystyle q_i = \frac{1}{n}.$
A: In $n$-D that's the equation of a diagonal plane intersecting a sphere, whose radius will be minimal when the sphere is tangent to the plane, which occurs at $q_1 = q_2 = \cdots$
A: The cost and constraint are convex, and it is clear that permuting the components does not change the cost of constraint value.
Let $f(q) = \sum_k q_k^2$. Since $f$ is convex, we see that
$f(\bar{q} e) \le {1 \over |{\cal P}|} \sum_{P \in {\cal P}} f(Pq) = f(q)$, where ${\cal P}$ is the collection of permutation matrices, $e=(1,1,...,1)^T$ and $\bar{q} = {1 \over n} \sum_k q_k$.
In particular, we can presume that $q$ is of the form $q=\alpha e$, and since it satisfies the constraint we have $\alpha = {1 \over n}$ and so a solution is
$q^* = ({1 \over n}, {1 \over n}, ..., {1 \over n})$. Since $f$ is strictly convex
we see that this is the unique solution.
A: This is a direct application of Cauchy-Schwarz inequality. It states that $$(p_1^2+p_2^2+\dots+p_i^2)(q_1^2+q_2^2+\dots+q_i^2)\ge (p_1q_1+p_2q_2+\dots+p_iq_i)^2.$$
From the problem, we know that $q_1+q_2+\dots+q_i = 1$. If we let $p_i = 1$, then on the RHS we have ($q_1+q_2+\dots+q_i)^2$, since we just multiply each $q_i$ by $1$. Therefore, the RHS is $1^2 = 1$.
That also means that the first factor is $n$, since each $p_i = 1$, so $1^2+1^2+\dots+1^2$ occurs $n$ times, which is simply $n$. Therefore, we have $(n)(q_1^2+q_2^2+\dots+q_i^2)\ge 1$, so $q_1^2+q_2^2+\dots+q_i^2\ge \frac{1}{n}$.
Therefore, the minimum value is $$\boxed{\frac{1}{n}.}$$
