A classical result in algebraic geometry states that every irreducible component of a variety defined by $r$ polynomials in affine $n$-space has dimension not less than $n-r$. This is a special case of Krull's height theorem which states that in a noetherian ring every prime ideal minimal above an ideal generated by $r$ elements has height at most $r$. I would like to know if this bound holds for all associated primes, i.e., also for the embedded primes.

To be precise, the question is the following: Let $k$ be a field and $f_1,\ldots,f_r\in k[x_1,\ldots,x_n]$ polynomials in $n$-variables ($r< n$). Assume that the ideal $I=(f_1,\ldots,f_r)$ generated by the $f_i$'s does not contain $1$. Is it true that $\dim(k[x_1,\ldots,x_n]/\mathfrak{p})\geq n-r$ for every associated prime ideal $\mathfrak{p}$ of $k[x_1,\ldots,x_n]/I$?

It seems a rather natural question to me and so I find it hard to believe that I am the first one to think about it. However, so far, I could not find anything in the literature. This seems to indicate that it might not be true. At the same time it appears not too easy to find a counterexample. Note that in a Cohen-Macaulay ring every ideal of height $r$ generated by $r$ elements is unmixed, i.e., has no embedded primes. In particular the answer is "yes" if $\dim(k[x_1,\ldots,x_n]/I)=n-r$.