From: naimead on
Hello,

I calculated probability density function from a histogram(thus non-parametrically).But how I calculate the likelihood(not the maximum likelihood estimation neither the log-likelihood estimation) from the probability density function?I know that an important difference between them is that the first isn't normalized to one.Could you please give me a practical example?

thank you very much,

naimead
From: Tom Lane on
> I calculated probability density function from a histogram(thus
> non-parametrically).But how I calculate the likelihood(not the maximum
> likelihood estimation neither the log-likelihood estimation) from the
> probability density function?I know that an important difference between
> them is that the first isn't normalized to one.Could you please give me a
> practical example?

Naimead, can you elaborate on what you are trying to do? I think of the
likelihood as the joint density of the data evaluated as a function of the
parameters. You say you have no parameters. It would be helpful to
understand what you're trying to accomplish.

Just answering your question directly:

You need to normalize the density to integrate to one. The joint density of
the entire sample would be the product of h(x(i)) values taken over all x(i)
data points, where h(x) is the height of the density at x.

-- Tom



From: naimead on
Hello Tom,

I calculated power (S(:,1:49152)) over a specific frequency range.Then I used [y,x]=hist((S(1,1:49152)),200) to divide the power of the first frequency into 200 equally sized bins, so I have the pdf (plot(x,y)).I need to draw the power-likelihood distribution in the given frequency. So, in order to calculate y-axis(that is the likelihood) what I did is to divide the number of observations in each one of the 200 bins with the total number of observations which is 49152.

Does it seem correct?

naimead
From: naimead on
I have another question though.What part of the power of each bin are we choosing to put on the diagram power-likelihood?I have 192 bins and each bin consists of 256 power values. Do I take the mean value of these 256 values of each bin?(because it doesn't seem to work since it excludes extremely small power values)

Guys if it is possible give me some help here because I am running out of ideas.

naimead
From: naimead on
Below I am posting a part of the code I have written so far:

S4=(coefs1.*conj(coefs1));%power calculation using wavelet coefficients

S5=fliplr(S4);
S6=sort(S5(213,1:49152));
S7=reshape(S6,256,[]);%256:number of data in each of the 192 bins
[y,x]=hist((S6(1,1:49152)),192);
z=y./49152;%likelihood calculation
for i=1:192
g(i)=mean(S7(1:256,i));
end
plot(g,z);%plot power vs likelihood