About this course

If you are just getting started with machine learning, this short course will help you develop your skillset. We introduce a unique model, namely Tobit Regression, which differs from linear regression by being suited to data which has been censored. Since the course is taught in Jupyter Notebooks, you need to install https://www.anaconda.com/distribution/.  You will also need to install packages such as numpy, pandas, tensorflow, and perhaps more.

When you finish this class, you will have:

  • Developed your mathematical statistical skills through derivation of the Tobit MLE

  • Know how to work with custom loss functions in Tensorflow

  • Be able to train in Tensorflow using vectorised data

Prerequisites; we assume you:

  • Know how to code in Python

  • Have seen Tensorflow before and used it at least once

  • Know basic mathematical statistics notation​

  • The ability to think deeply

Part One

Advice, prerequisites, and overview


Part Two

Introduction to censored models

Censored models, such as the Tobit Model we will be dealing with, are widely used in economics, medicine and other fields. These models are typically used when the dependent variable, y, is "censored", that is, not observable beyond a certain level.

For example, in our case, we cannot observe negative dividends and so dividend yield data is censored below 0%. In the following video I will talk about this idea more in depth and will use graphs to expalin this concept.

Part Two: Lecture 1

Derivation of the average log-likelihood function

Part Three

Tobit MLE Derivation

This section of the course gives you the step-by-step derivation of the maximum likelihood estimator (MLE) for the Tobit Model. If you are not familiar with an MLE, at a high level, all that we are trying to do is find a function that takes in our data and tells us how likely it is that our parameters (the weight of each predictor variable) are correct. We can then use this function to find the optimum parameters given our data.

First watch the video lecture and then read through the pdf to review

Part Three: Lecture

Part Four

Determinants of corporate dividends

Our empirical setting and the main project

There are two sections to this part of the course.

Section One: We will talk about the data we are using and exactly what we are trying to do.

Section Two: This is your opportunity to apply everything that you've learned so far. We are working with Jupyter Notebooks and using Tensorflow to train our model.

Part Four: Section One

Part Four: Section Two

Download the Jupyter Notebook and data. Make sure that "Tobit_Dataframe.csv" is in the same folder as "FinanceAI Tobit Regression Workbook.ipynb".

Remember, you are here to learn so don't look at the solutions until you've tried your best, researched online, and watched the walkthrough video below. The walkthrough does not provide the solutions, but just gives some ideas of how to anwer each section.

Corporate Dividend Determinants with Tobit Modeling

Part Five

Results and conclusion



  • Black YouTube Icon
  • Black LinkedIn Icon