Mathematics behind Maximum Likelihood Function

RohithMahadev
4 min readSep 26, 2024

In this article, I will explain in simple terms the implementation of key concepts in regression.

The article covers a summary of the likelihood function implementation and intuition with the help of Python

For better understanding and implementation. We refer to a simple dataset.

Dataset:

Kaggle Dataset — head

The dataset has 365 rows and the following is the descriptive parameters of the dataset

Descriptive paremeters of df

Maximum Likelihood Function

Let us first understand why we use the maximum likelihood function. It is used to estimate the parameters of a probability distribution by maximizing the likelihood function. To be concise, we can find the parameter values that make the observed data most probable. The assumption here is that the data follows a particular statistical model.

The data for ice cream profit follows a normal distribution here.

plt.hist(df['Ice Cream Profits'])
plt.xlabel('Frequency')
plt.ylabel('Count')
plt.title("Distribution of Ice Cream Profit"

--

--

RohithMahadev
RohithMahadev

Written by RohithMahadev

Aspiring AI Consultant and tech enthusiast. I write articles about motivation, self-learning, AI, Data science, and analytics.

No responses yet