In the polynomial regression model of degree $m \in \mathbb{N}$ we consider the problem of determining a design for the identification of the correct degree of the underlying regression. We propose a new optimality criterion which minimizes a weighted $p$-mean of the variances of the least squares estimators for the coefficients of $x^l$ in the polynomial regression models of degree $l = 1,\cdots, m$. The theory of canonical moments is used to determine the optimal designs with respect to the proposed criterion. It is shown that the canonical moments of the optimal measure satisfy a (nonlinear) equation and that the support points are given by the zeros of an orthogonal polynomial. An explicit solution is given for the discrimination problem between polynomial regression models of degree $m - 2, m - 1$ and $m$ and the results are used to calculate the discrimination designs in the sense of Atkinson and Cox for polynomial regression models of degree $1,\cdots,m$.