Arcsine Distribution Class
Definition
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.7
public class ArcsineDistribution : ContinuousDistribution
- Inheritance
- Object → Distribution → ContinuousDistribution → ArcsineDistribution
Remarks
The arcsine distribution is a probability distribution for a random variable whose probability density function is proportional to the reciprocal of the square root of the product of the variable and one minus the variable.
This distribution is a special case of the beta distribution with parameters (1/2, 1/2). It is used in various fields such as physics, finance, and engineering to model phenomena with bounded support.
In particular, the arcsine distribution is related to the beta distribution and can be used to model the distribution of the fraction of time a Brownian motion spends above zero.
Example
// Example of using the ArcsineDistribution class
using System;
using Numerics.NET.Statistics.Distributions;
// Distribution parameters
var dist = new ArcsineDistribution(0.0, 1.0);
Console.WriteLine($"Lower Bound: {dist.LowerBound}");
Console.WriteLine($"Upper Bound: {dist.UpperBound}");
// Functions
double pdf = dist.ProbabilityDensityFunction(0.5);
double cdf = dist.DistributionFunction(0.5);
double invCdf = dist.InverseDistributionFunction(0.5);
Console.WriteLine($"PDF at 0.5: {pdf}");
Console.WriteLine($"CDF at 0.5: {cdf}");
Console.WriteLine($"Inverse CDF at 0.5: {invCdf}");
// Moments
Console.WriteLine($"Mean: {dist.Mean}");
Console.WriteLine($"Variance: {dist.Variance}");
Console.WriteLine($"Skewness: {dist.Skewness}");
Console.WriteLine($"Kurtosis: {dist.Kurtosis}");
// Other properties
Console.WriteLine($"Is Symmetrical: {dist.IsSymmetrical}");
Console.WriteLine($"Entropy: {dist.Entropy}");
Console.WriteLine($"Mode: {dist.Mode}");
Console.WriteLine($"Number of Modes: {dist.NumberOfModes}");
Console.WriteLine($"Support: {dist.Support}");
This example demonstrates how to create an instance of the ArcsineDistribution class, access its parameters, and use its methods to compute the probability density function, cumulative distribution function, and inverse cumulative distribution function. It also shows how to retrieve various statistical moments and properties of the distribution.
Constructors
Arcsine | Constructs a new ArcsineDistribution. |
Arcsine | Constructs a new ArcsineDistribution. |
Properties
Capabilities |
Gets a value that indicates the capabilities of the distribution class.
(Inherited from Distribution) |
Entropy |
Gets the entropy of the distribution.
(Overrides Distribution.Entropy) |
Inter |
Returns the inter-quartile range of this distribution.
(Inherited from ContinuousDistribution) |
IsSymmetrical |
Gets whether the distribution is known to be symmetrical around the mean.
(Overrides ContinuousDistribution.IsSymmetrical) |
IsUnimodal |
Gets whether the distribution has one or more modes.
(Inherited from ContinuousDistribution) |
Kurtosis |
Gets the kurtosis of the distribution.
(Overrides Distribution.Kurtosis) |
Lower | Gets the lower bound of the interval on which this ArcsineDistribution is defined. |
Mean |
Gets the mean or expectation value of the distribution.
(Overrides Distribution.Mean) |
Median |
Gets the median of the distribution.
(Inherited from ContinuousDistribution) |
Mode |
Gets the mode of the distribution.
(Overrides ContinuousDistribution.Mode) |
Number |
Gets the number of modes of the distribution.
(Overrides ContinuousDistribution.NumberOfModes) |
Skewness |
Gets the skewness of the distribution.
(Overrides Distribution.Skewness) |
Standard | Returns the standard arcsine distribution. |
Standard |
Gets the standard deviation of the distribution.
(Inherited from Distribution) |
Statistic |
Gets the common symbol to describe a statistic
from the distribution.
(Inherited from Distribution) |
Support |
Gets the support of the distribution.
(Overrides ContinuousDistribution.Support) |
Upper | Gets the upper bound of the interval on which this ArcsineDistribution is defined. |
Variance |
Gets the variance of the distribution.
(Overrides Distribution.Variance) |
Methods
Cdf |
Evaluates the cumulative distribution function
(CDF) of this distribution for the specified value.
(Inherited from ContinuousDistribution) |
Distribution |
Evaluates the cumulative distribution function
(CDF) of this distribution for the specified value.
(Overrides ContinuousDistribution.DistributionFunction(Double)) |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
Get |
Returns an array that contains all the modes of the distribution.
(Overrides ContinuousDistribution.GetAllModes()) |
Get |
Returns the expectation value of a function.
(Inherited from ContinuousDistribution) |
Get |
Returns the un-normalized expectation value of a function over the specified interval.
(Inherited from ContinuousDistribution) |
Get |
Gets a vector containing a histogram of the expected number of samples
for a given total number of samples.
(Inherited from ContinuousDistribution) |
Get |
Gets a vector containing a histogram of the expected number of samples
for a given total number of samples.
(Inherited from ContinuousDistribution) |
Get |
Gets a vector whose bins contain the expected number of samples
for a given total number of samples.
(Inherited from ContinuousDistribution) |
Get | Serves as the default hash function. (Inherited from Object) |
Get |
Returns a sequence of random samples from the distribution.
(Inherited from ContinuousDistribution) |
Get |
Returns a sequence of random samples from the distribution.
(Inherited from ContinuousDistribution) |
Get |
Returns a sequence of random samples of the specified length from the distribution.
(Inherited from ContinuousDistribution) |
Get | Gets the Type of the current instance. (Inherited from Object) |
Hazard |
Returns the probability of failure at the specified value.
(Inherited from ContinuousDistribution) |
Inverse |
Returns the inverse of the DistributionFunction(Double).
(Inherited from ContinuousDistribution) |
Inverse |
Returns the inverse of the DistributionFunction(Double).
(Overrides ContinuousDistribution.InverseDistributionFunction(Double)) |
Left |
Returns the probability that a sample from the distribution
is less than the specified value.
(Inherited from ContinuousDistribution) |
Log |
Returns the logarithm of the probability density function
(PDF) of this distribution for the specified value.
(Inherited from ContinuousDistribution) |
Memberwise | Creates a shallow copy of the current Object. (Inherited from Object) |
Moment |
Returns the value of the moment function of the specified order.
(Inherited from ContinuousDistribution) |
Returns the value of the probability density function
(PDF) of this distribution for the specified value.
(Inherited from ContinuousDistribution) | |
Probability |
Returns the probability that a sample taken from the
distribution lies inside the specified interval.
(Inherited from ContinuousDistribution) |
Probability |
Returns the value of the probability density function
(PDF) of this distribution for the specified value.
(Overrides ContinuousDistribution.ProbabilityDensityFunction(Double)) |
Right |
Returns the probability that a sample from the distribution
is larger than the specified value.
(Inherited from ContinuousDistribution) |
Sample() |
Returns a random sample from the distribution.
(Inherited from ContinuousDistribution) |
Sample( |
Returns a vector of random samples from the distribution.
(Inherited from ContinuousDistribution) |
Sample( |
Returns a random sample from the distribution.
(Inherited from ContinuousDistribution) |
Sample( |
Returns a vector of random samples from the distribution.
(Inherited from ContinuousDistribution) |
Sample |
Fills a list with random numbers from the distribution.
(Inherited from ContinuousDistribution) |
Sample |
Fills a list with random numbers from the distribution.
(Inherited from ContinuousDistribution) |
Sample |
Fills a span with random numbers from the distribution.
(Inherited from ContinuousDistribution) |
Sample |
Fills part of a list with random numbers from the distribution.
(Inherited from ContinuousDistribution) |
Survivor |
Evaluates the survivor distribution function
(SDF) of this distribution for the specified value.
(Inherited from ContinuousDistribution) |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Two |
Returns the probability that a sample from the distribution deviates from the mean more than
the specified value.
(Inherited from ContinuousDistribution) |