# How to find the time complexity of an MLE based algorithm

How to calculate or what is the time complexity (big-Oh) for this method?

Based on my understanding, MLE depends on number of datapoints, $$N$$ so time complexity for MLE is O(N). However, there are some computations involved while calculating the log-likelihood such as multiplication, optimization. Do we include for these steps?

The complexity will depend on the method being used to calculate the MLE. For example, the MLE for the mean of a Bernoulli distribution is just the sample mean, which can be calculated in $$O(N)$$ (assuming that each arithmetical operation takes effectively constant time).