how do i apply maximum likelihood estimation for a gaussian distribution?

3 Ansichten (letzte 30 Tage)
I have written a short code of converting an image into normal distribution as follows;
a=imread('lena.jpg'); A=rgb2gray(a); P1=im2double(A); K = P1(:) PD=fitdist(K,'normal')
Now how do i apply Maximum likelihood on it to get the estimates of mean and std. deviation?

Antworten (1)

Brendan Hamm
Brendan Hamm am 28 Dez. 2015
Maximum Likelihood estimates for a normal distribution would be:
mu = mean(K);
sigma = std(K,1); % 1 for population standard deviation.
However, when we fit Normal distributions we use the Best Unbiased Estimate, which is:
mu = mean(K);
sigma = std(K); % Sample standard deviation
These values can be found in the PD object you fit:
muFit = PD.mu;
sigFit = PD.sigma;

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by