Drawing a log likelihood of some distribution

조회 수: 1 (최근 30일)
googo
googo 2013년 6월 20일
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!

답변 (0개)

카테고리

Help CenterFile Exchange에서 Exploration and Visualization에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by