Motivated by the numerical treatment of parametric and stochastic PDEs, we analyze the least-squares method for polynomial approximation of multivariate functions based on random sampling according to a given probability measure. Recent work has shown that in the univariate case and for the uniform distribution, the least-squares method is optimal in expectation in [1] and in probability in [7]...