Shape

com.phasmidsoftware.number.core.numerical.Shape
trait Shape

Describes a probability density function for a continuous distribution. NOTE: this isn't suitable for discrete distributions, obviously.

CONSIDER: implement additional shapes, for example O(f(x)). This would be used for the Basel problem, for example.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Box
object Gaussian
class Trapezoid

Members list

Value members

Abstract methods

def effectiveMagnitude(l: Double): Double

Computes the effective magnitude for the given scale parameter of the distribution.

Computes the effective magnitude for the given scale parameter of the distribution.

Value parameters

l

the scale of the probability density function (e.g., standard deviation for Gaussian, half-width for Box).

Attributes

Returns

the effective magnitude as a derived measure based on the provided scale.

def probability(l: Double, x: Double): Double

Computes the probability that random points will be found with the range -x to +x where l is a measure of this size of this shape.

Computes the probability that random points will be found with the range -x to +x where l is a measure of this size of this shape.

Value parameters

l

the size or scale of the probability density function (e.g., standard deviation for a Gaussian distribution).

x

the specific point that bounds the region we're interested in.

Attributes

Returns

the calculated probability density at the given point.

def thresholdConfidence(x: Double, l: Double): Double
def wiggle(l: Double, confidence: Double = ...): Double

Determine the half-width δ such that the cumulative probability P(-δ, δ) = 1 - confidence. In other words, get the wiggle room: the range within which a random point will fall with probability (1 - confidence). NOTE that the greater the value of confidence, the smaller the resulting wiggle room.

Determine the half-width δ such that the cumulative probability P(-δ, δ) = 1 - confidence. In other words, get the wiggle room: the range within which a random point will fall with probability (1 - confidence). NOTE that the greater the value of confidence, the smaller the resulting wiggle room.

Value parameters

confidence

the tail probability: the probability of a random point falling outside the range [-δ, δ]. Typical value: oneSigma.

l

the scale of the PDF (e.g. standard deviation for Gaussian, half-width for Box).

Attributes

Returns

δ, the half-width of the symmetric interval around the mean.