Jayman has a decent collection of references to the relevant research on his FAQ: https://jaymans.wordpress.com/jaymans-race-inheritance-and-i...
The 19th century version of someone with your thought pattern would no doubt see my ancestors in Ireland as a group of simple peasant bumpkins living with livestock and not capable of basic activities, much less advanced cognitive skills. Yet my grandparents managed to get out of there in the 1940s and move to New York City. Their grandchildren are doctors, attorneys, engineers, detectives, teachers and business leaders.
So when you tell me that someone from Nigeria or Sierra Leone is statistically likely to be fundamentally dumber than myself or my family, I'm skeptical.