How-tos survival

Watching “ReactJS Basics” course the other day I’ve noticed that the further I go – the smaller number of pageviews for each lesson was. But is that “dropout rate” the same for all courses? Here is my little research.

Intro

So the procedure we are going to follow is called survival analysis. It’s very well known in medicine but could be applied to many more industries as well.

The fraction of patients living for a certain amount of time after treatment.
by Wikipedia

Let’s think of a brighter example for it than cancer patients. It could be a percentage of working laptops from the same batch or fraction of people who continue using your product after the first week, second week, etc.

In our research, we’ll look at how many people who started online course continue with it and watch new lessons.

Main assumption

We are going to work with Youtube data since it’s open and there are plenty of interesting courses. But there is a very important assumption – to make a precise survival analysis we’d need to know timestamp and user id for every view of every video in the course. But since Youtube gives us only a number of pageviews per video, let’s assume that all pageviews are unique and there are no users who started the course lately (we’d exclude them in real analysis).

Getting the data

So I’ve picked up some courses on programming, chess, guitar, drawing, and fitness:

I think there is no use to share Ruby basics like looping through an array of ids and dump downloaded data to CSV, you can check all the code yourself. May be pay attention how it’s organized. It’s very much inspired by Jupyter Notebooks in Python: progression of steps that should be run one by one.

Visualize survival curves

At this point, we have pageviews for each video in selected courses. Before we start processing it, let’s just plot it as it is. I think this step is very useful in any research you do.

As you can see not every curve has downward slope – there are spikes in the middle with millions of pageviews. I guess it’s very specific to Youtube when some videos became viral – just look at the title “How to Achieve Checkmate in 2 Moves”. So we’ll remove these points. We’d also remove pageviews when users haven’t started from the beginning, but our assumption is that there are no such pageviews.

For the final plot we will calculate a portion of “survived” users for every lesson:

As you can see it’s really hard to survive singing and drawing classes online On top, we have chess and React JS – both are easy but bring you a lot of fun

Are you full-stack developer or web designer? Join me at Growth Dev team at Blinkist!

I work in Growth Development team at Blinkist (app that allows you to read/listen short versions of non-fiction books), we maintain our webapps, design & ship AB-tests, build API integrations, analyse user data to improve our web products for millions of users. If you’re Rails developer with a passion for front-end or a web designer with a passion for growth – send me an email or ping on Twitter.

Hi My name is Anatoli, I'm a Software Engineer living in Berlin. In my work I deal with all things web: design systems, all kinds of backend, data, AB-testing etc My favorite things is to learn smth new by making a small prototype so others can try it. I'll shoot you an email every 2-3 weeks with my latest learnigs.

Wow, thank you for subscribing!

I really appreciate it and it motivates me even more to learn and ship new things. If you already have something in mind – ping me on twitter or just shoot me an email. See you in 2-3 weeks