A Samples distribution stores individual samples and draws randomly from them.
NOTE: Samples.weights is only supported with scipy version 1.2+
Treatment under-the-hood:
-
Samples.sample, Samples.mean, Samples.median, Samples.std, and Samples.var act directly on the stored array in Samples.samples, unless Samples.weights are provided, in which case will act on a drawn sample from Samples.sample (with the exception of Samples.mean which calls numpy.average under-the-hood and passes Samples.samples and Samples.weights).
-
all other methods requiring a probability to be computed (Samples.pdf etc) rely on a KDE with Samples.samples, Samples.weights, and Samples.bw_method. See https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.gaussian_kde.html