has anyone done a study that if your grades are slightly on the lower side for top schools, so you go to a state school, are the undergrad grades better and therefore get into a better grad school?

I would think that would be the case. Many of DD's classmates in the lower grade point are switching back to easier schools. They will have a better grade average to apply to colleges in Canada, which are totally merit based. Although some have high school profiles so that a 90 at one school maybe equivalent to a 98 at another.

So if you cannot get into a Yale, or would be in the bottom half of the class, is it better to go to Penn State Honors and be in the top 10% and apply to graduate school? Does anyone know?

How do they evaluate when on grad applications, because you still do the GRE, MCAT or whatever.