electricpy.math.probdensity

electricpy.math.probdensity(func, x, x0=0, scale=True)[source]

Probability Density Function.

This function uses an integral to compute the probability density of a given function.

Parameters:
func : function

The function for which to calculate the PDF

x : numpy.ndarray

The (array of) value(s) at which to calculate the PDF

x0 : float, optional

The lower-bound of the integral, starting point for the PDF to be calculated over, default=0

scale : bool, optional

The scaling to be applied to the output, default=True

Returns:

sumx – The (array of) value(s) computed as the PDF at point(s) x

Return type:

numpy.ndarray