In an infinite universe with random local density of matter, the gravitational constant would vary by location. Anyone know what the consensus is among astonomers if the universe is infinite or not ? Is there even a way to theoretically know ?
Theory can say what shape the universe should have, for example inflation predicts a flat universe[2]. Of course you then have to check if the theory matches what we observe.
As far as I've gathered, the current measurements are consistent with a flat universe. Here's[1] a post about a recent, improved measurement.