Effacer les filtres
Effacer les filtres

Drawing a log likelihood of some distribution

2 vues (au cours des 30 derniers jours)
googo
googo le 20 Juin 2013
Hello,
Suppose I have a distribution with this pdf:
p*(x==0) + (1-p)*poisspdf(2,x(i))
her log likelihood will be:
Y = SUM from 1:100 (log(p*(x(i)==0) + (1-p)*poisspdf(2,x(i))
x is 1X100 vector sample from this distribution.
I want to plot p as function of Y. meaning, I want to draw the log likelihood of the sample.
p is defined to be p = linspace(0,1,100). p is a probability of course.
I'm trying to use a function handle
for example : f=@(p) but which function sould I write here? if the function was p^2 then I would have wrote f=@(p) p^2 and then plot it but what about this case?
Thank's!

Réponses (0)

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by