How can we do statistical analysis of the success of online classes?
Doing statistical analysis of the "success" of e-learning is part of a field known as "outcomes assessment" which is extremely important in contemporary educational scholarship and administrative practice. The main difficulty with outcomes assessment is defining outcomes, setting criteria for what you might consider a positive result (or "success"), and developing methods of investigating it.
For e-learning, the gold standard is having multiple sections of the same course at a university taught to identical student populations and observing differences in grade distributions for the course itself and a course for which it is prerequisite -- i.e. do students who took an e-version of Calculus I do worse or better in Calculus II than students who took a traditional version of Calculus I?
The other issue is an increasing "digital divide" in education, where students from rich families attend physical campuses and are taught by full-time faculty, and students from underprivileged backgrounds are increasingly shunted into mass-produced e-courses taught by underpaid contingent faculty often with fewer qualifications. It is difficult in such cases to disentangle outcomes to do preparedness from ones due to course delivery format.