help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Understanding empirical_pdf


From: Marco Atzeri
Subject: Re: Understanding empirical_pdf
Date: Mon, 27 Oct 2014 14:46:43 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0



On 10/27/2014 1:34 PM, Jose wrote:
Hello.

In octave 4.8.1, while
->
empirical_cdf ([0:0.1:1], rand(1e3,1))
<-
returns values of a cdf,
->
empirical_pdf ([0:0.1:1], rand(1e3,1))
<-
returns all zero. This behaviour is somehow counter-intuitive to me. I
would like to understand if this is intended and why.

as none of the [0:0.1:1] are in the rand(1e3,1)
the probability of each one is zero

See as comparison:

 empirical_pdf ([0:0.1:1], [0:0.05:1])

ans =

 Columns 1 through 7:

0.047619 0.047619 0.047619 0.047619 0.047619 0.047619 0.047619

 Columns 8 through 11:

   0.047619   0.047619   0.047619   0.047619

J.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]