What property should $A$ satisfy so that $A[x_1, \ldots, x_n]$ satisfies the dimension formula, $$\mathrm{dim}(A[x_1, \ldots, x_n]) = \mathrm{dim}(A[x_1, \ldots, x_n]/\mathfrak{p}) + \mathrm{ht}(\mathfrak{p}),$$ for any prime ideal $\mathfrak{p}$ in $A[x_1, \ldots, x_n]$?
For instance, this property holds when $A$ is a field. Is there a general property that ensures this formula is satisfied?