The answer to your question is relatively straightforward though, different races raised in the same circumstances have been given IQ tests. Among other techniques.
Once again, this is a century old science, it's been thought through pretty well. Whatever confounding factor you come up with in 2 minutes, someone has likely thought of it.