[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: empirical_cdf
From: |
Francesco Potortì |
Subject: |
Re: empirical_cdf |
Date: |
Wed, 22 Sep 2010 11:46:45 +0200 |
>Is this a known bug in 3.2.4 or am I doing anything wrong?
>
>octave> empirical_pdf(linspace(0,1,10),rand(1000,1))'
>ans =
>
> 0
> 0
> 0
> 0
> 0
> 0
> 0
> 0
> 0
> 0
Answering to myself: I downloaded discrete_cdf and discrete_pdf from the
devel trunk. discrete_cdf now needs much less memory, and discrete_pdf
works, as long as you change the lookup arg from 'm' to 'l' in 3.2.4.
However, the results look strange (useless?) to me:
octave> empirical_pdf(linspace(0,1,10),rand(1,1000))'
ans =
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
If I ask for the pdf on ten points, I should get 0.1 on each, rather
than 0.001 on each. Moreover, one gets the same results whichever the
points asked for:
octave> empirical_pdf(linspace(0.2,0.8,5),rand(1,1000))'
empirical_pdf(linspace(0.2,0.8,5),rand(1,1000))'
ans =
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
1.0000e-03
What I would expect, instead, is the diff of the pdf. Is this done for
compatibility with Matlab or is there any other reason?
--
Francesco Potortì (ricercatore) Voice: +39 050 315 3058 (op.2111)
ISTI - Area della ricerca CNR Fax: +39 050 315 2040
via G. Moruzzi 1, I-56124 Pisa Email: address@hidden
(entrance 20, 1st floor, room C71) Web: http://fly.isti.cnr.it/
- empirical_cdf, Francesco Potortì, 2010/09/21
- Re: empirical_cdf,
Francesco Potortì <=