OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to create rv_histogram from known probability density function values

  • Thread starter Thread starter Tonny Tc
  • Start date Start date
T

Tonny Tc

Guest
Let's say there is a distribution, and all what is known about the distribution is the value of its probability density function in a small range(e.g. from 0.0 to 0.001).

Then, I want to use statistical functions in scipy to describe the distribution, and I found there is a function called scipy.stats.rv_histogram which seems can be used because everything I known about the distribution is the something like a array of histograms.

The method says that the first parameter:

In particular, the return value of numpy.histogram is accepted.

Following the guide, I tried to call the numpy.histogram method, however I found that it actually asks for count number but the probability density for each bin, viz. there are 123 elements but the probability density is 0.1 in the range from 0.0 to 0.001. And the parameter density controls the output but the input.

May I know are there some other solutions in such a case that only the value of probability density function is known please?
<p>Let's say there is a distribution, and all what is known about the distribution is the value of its probability density function in a small range(e.g. from 0.0 to 0.001).</p>
<p>Then, I want to use statistical functions in <code>scipy</code> to describe the distribution, and I found there is a function called <code>scipy.stats.rv_histogram</code> which seems can be used because everything I known about the distribution is the something like a array of histograms.</p>
<p>The method says that the first parameter:</p>
<blockquote>
<p>In particular, the return value of <code>numpy.histogram</code> is accepted.</p>
</blockquote>
<p>Following the guide, I tried to call the <code>numpy.histogram</code> method, however I found that it actually asks for count number but the probability density for each bin, viz. there are 123 elements but the probability density is 0.1 in the range from 0.0 to 0.001. And the parameter <code>density</code> controls the output but the input.</p>
<p>May I know are there some other solutions in such a case that only the value of probability density function is known please?</p>
 

Latest posts

Z
Replies
0
Views
1
zuegelwagen
Z
Top