He did also go to school and even tried to go to college, he even got a scholarship! He had a lot of issues with the non math coursework however and did not finish any degree that I am aware of.
The reality of his life is a bit more complex than "oh a poor boy found a basic math text book and taught himself to be one of the greatest mathematicians in history"
What is more interesting here is to imagine if he grew up with wealth and formal training, would he have died at 32? Would he been given the time and resources to actually become one of the greatest math geniuses out there?
Ramanujan had a lot of raw talent, but it wasn't honed, and ultimately it was cut extremely short and wasted.
By definition, we know of zero examples of geniuses who were never discovered due to poverty, which makes it hard to extrapolate the rate at which this happens. But we do have examples of geniuses who grew up poor but were discovered nonetheless, which gives us hope that exceptional people in similar situations will be discovered. Especially today with global primary school enrollment rates close to 90% [1], and secondary school rates around 76%.
In at least one study I've seen, smaller class size didn't have much effect, but private tutoring did.
Yes a really "dumb" kid will still be "dumb" academically, but people here are severely underestimating what money can buy in education. I've seen really "dumb" kids be brought up to the level of "passably smart" simply because of resource access.
When you have teachers who are not overworked and are paid lovely salaries (ie 6 figure salaries), imagine every teacher you have actually cares and invested in your education? Imagine every class has recordings of every lecture as well as a curriculum that has a lot of forethought and time put into it? And imagine if the school has a lacking teacher, than the parents hire some ex-olympian, or ex-superstar coach or teacher to make up for that? I've seen parents hire ex-olympic athletes to get some untalented rich kid to close to olympic level.
Honestly, I think it's really understated how much educational spending can affect a kid. Most people will not see what I've seen, and even from someone who came from a middle class background who used to believe wealth does not matter when it came to education, even I was shocked by what money can buy in "academic success" and my opinion changed. I at this point, don't need to see a study because it was that drastic.
There is such a difference in environments in this country's education system. I was doing math in my sophomore year of high school that some don't see until college (or ever). Was I inherently smarter? Of course not. I had good teachers and books, I didn't have to work a job at night, etc.