![](https://hackernoon.com/hn-images/1*ADiZaUQetyNQxJmzYY0g8Q.jpeg) Why [Probability](https://hackernoon.com/tagged/probability)? Why can’t we leave [linear regression](https://hackernoon.com/tagged/linear-regression) just the way it is! Why to make it difficult? All these question were in my mind, when i was heading through this topic but as we know when there is loads of data suddenly randomness appears, she calls her sister probability with her. When there is probability we can’t leave Gaussian alone. All these words are so heavy that i will make sure to put some magic and make it easy for you. Let’s dive together. _Do you remember these equation from linear regression?_ ![](https://hackernoon.com/hn-images/1*ne0miZo9bWOYwLLXsr2zLg.png) ![](https://hackernoon.com/hn-images/1*k2SQS2xeMR0P-ifLJ0MrHA.png) > If not, Please read the article on [Supervised Learning](https://towardsdatascience.com/deep-dive-into-supervised-learning-e7952c0692e9). In probability theory, the very common continuous probability distribution is also known as **Normal Distribution** or **Gaussian Distribution**. This normal distribution is sometimes informally called as the **bell curve** as shown in the below image : ![](https://hackernoon.com/hn-images/1*9sYBM0h_7EJQr01PQzFSGA.gif) The probability density of above normal distribution or Gaussian is given by : ![](https://hackernoon.com/hn-images/1*tlBgq1rSoBJY6azvvgvleQ.png) Where, * ‘mu’ is the mean * sigma is the standard deviation * sigma square is the variance Now, as we have probability distribution equation and if we write the probability distribution of the predicted values ‘**Y**’ of the given ‘**X**’ and the parameter **Theta** is given as follows: ![](https://hackernoon.com/hn-images/1*HUH4jDbXZQ0KYo3Cv9es7Q.png) _Still the question remains, why always Gaussian? Why not something else?_ The answer lies in the “**Central Limit Theorem**”. This gives us an idea that when you take a bunch of random numbers from almost any distribution and add them together, you get something which is normally distributed. The more numbers you add, the more normally distributed it gets. In a typical machine [learning](https://hackernoon.com/tagged/learning) problem, you will have errors from many different sources (e.g. measurement error, data entry error, classification error, [data](https://hackernoon.com/tagged/data) corruption…) and it’s not completely unreasonable to think that the combined effect of all of these errors is approximately normal. When we wish to explicitly view the probability distribution function of theta θ, we will instead call it the **Likelihood function**: ![](https://hackernoon.com/hn-images/1*8QiqkozIqbpID9DpqTQ1OQ.png) When taken for ‘**m**’ training examples, the likelihood function is modified as follows : ![](https://hackernoon.com/hn-images/1*BhYXx9Kgkey8vnXINkzDBA.png) **Likelihood** and **Probability** are the same things. It is called likelihood because when we want to see the above equation as function of theta while keeping ‘X’ and ‘Y’ constant. **_Principle of maximum likelihood_** says that “_Choose theta to maximize the likelihood or choose parameters that makes data more probable as possible_”. Instead of maximizing L(theta), we can also maximize any strictly increasing function of L(theta). In particular, the derivations will be a bit simpler if we instead maximize the **log likelihood** we call it as ℓ(theta): ![](https://hackernoon.com/hn-images/1*wboWuGrz2ct69staBFkEvQ.png) which gives similar answer as minimizing J(theta): ![](https://hackernoon.com/hn-images/1*CcIWnYGv3qv8rSLhYxZXtQ.png) This probabilistic Interpretation will be further used in **Logistic Regression**. If you find any inconsistency in my post, please feel free to point out in the comments. Thanks for reading. If you want to connect with me. Please feel free to connect with me on LinkedIn. [**Sameer Negi - autonomous Vehicle Traniee - Infosys | LinkedIn** _View Sameer Negi's profile on LinkedIn, the world's largest professional community. Sameer has 3 jobs listed on their…_www.linkedin.com](https://www.linkedin.com/in/sameer-negi-356881115/ "https://www.linkedin.com/in/sameer-negi-356881115/")[](https://www.linkedin.com/in/sameer-negi-356881115/)