The goal of this session today would be to introduce some of the common distributions that you're likely to see. So the purpose of the session would be to introduce some of the basic distributions, have a qualitative understanding of some of the parameters associated with these distributions, and know when and where to use these distributions. So let us start off by looking at the distinction between a parametric and a non-parametric model. Parametric methods assume that the data can be represented using a model with a finite number of parameters. The number of parameters is bounded and as a result, it is inflexible for modeling data with decisive data growth. In non-parametric methods, on the other hand, we do not model the data with the preset number of parameters. The number of parameters here grow with the size of the data. And as a result, can be quite flexible in modeling complex phenomena. Keep in mind that non-parametric models do not mean that you do not have parameters at all. Let's start off by looking at parametric methods. So if you're going to run this in a data bricks notebook, or in your local notebook, you may want to make sure that these libraries are all installed. One of the easiest ways to run this notebook would be to click on this button right here, which will give you three options to launch this notebook, either on binder, on collab, on light colored. I recommend that you click on binder. Binder will launch this notebook with all the dependencies on a Google Cloud VN such that you can interact with the cells and run the code. For example, I have already deployed a binder and the notebook is up and running. So I can simply click on a cell and execute the code. There are two ways to display images in this notebook. You would notice here that I have this variable interact flag set to false here. That's because when to false, all the images that are generated are just simply static images. When is set to true, we can use the interact function from the iPod widgets library to generate an interactive images that can be controlled using widgets. The first distribution we will look at here is the binomial distribution. The binomial distribution can be used to describe the number of successes given by p in end total number of events, and is given by the following probability density function. That is p(y) given theta equals, and choose p multiplied by theta, raised to the power of p, multiplied by 1 minus theta to the power n minus p. Here, theta is the probability of the success of the event. >> So we can use this function that we see here to generate and plot the probably density of y. Or the binomial distribution given a certain parameter, theta, and the total number of events as you can see here. So what does this function actually do? Here it is generating in a way that goes from 0 to the total number of events. So we're sweeping across all the values that p or y can take. And the next line here, we were essentially calculating or computing this probably the density here for every single value of y in this array. And they were plotting that probability density over each value of y and the interact flag. You might notice this default statement here which, depending on the value of interact flag, either calls the binomial vector, or wraps the binomial vector function with an interact. So we'll see how to use this in a Jupyter Notebook. So now we're switched over to the Jupyter Notebook. And we can see how we can interactively change the parameters to a binomial function and see how the probability density function changes by changing data. And so currently, we have interact, flag sector false. So what happens if you run this? It basically displays a static web. And we want to answer the question, how does that the probability density change, when we change y? For example, we want to find out what the probability of getting 1 successes, 2 successes, 3 and so on. All the way up to the total number of events. So we can go ahead and change our values here. So let's just say, we want to find the probability of success when you have 10 events. Once you change that and run it, the graph now updates. What if we want to identify the probability density, when we have a data of 0.5? Similarly, the graph gets updated. However, we can do the same thing interactively if we go and change the flag here. Set it to true, run it. And now if we run the cell again, you would notice that two sliders show up corresponding to the two inputs to our binomial vector function. So instead of having to rerun this code by changing the parameters, it can just simply drag the sliders and you would notice that the value is updated. So this is a nice way to interact with the function and get a qualitative understanding for how the probability density changes as you vary the parameters.