MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

# Thread Subject: probability density function vs likelihood

 Subject: probability density function vs likelihood From: naimead Date: 22 May, 2010 10:36:23 Message: 1 of 6 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
 Subject: probability density function vs likelihood From: Tom Lane Date: 22 May, 2010 18:53:54 Message: 2 of 6 > 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
 Subject: probability density function vs likelihood From: naimead Date: 22 May, 2010 23:18:45 Message: 3 of 6 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
 Subject: probability density function vs likelihood From: naimead Date: 23 May, 2010 02:30:39 Message: 4 of 6 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
 Subject: probability density function vs likelihood From: naimead Date: 23 May, 2010 02:41:59 Message: 5 of 6 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
 Subject: probability density function vs likelihood From: Tom Lane Date: 24 May, 2010 13:48:29 Message: 6 of 6 > 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. Naimead, it sounds like you are just looking for a proper density (one that integrates to one). In that case you should divide by the product of the number of observations and the bin width. -- Tom