SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.probdist.HyperbolicSecantDist Class Reference

Extends the class ContinuousDistribution for the hyperbolic secant distribution with location parameter \(\mu\) and scale parameter. More...

Inheritance diagram for umontreal.ssj.probdist.HyperbolicSecantDist:
umontreal.ssj.probdist.ContinuousDistribution umontreal.ssj.probdist.Distribution

Public Member Functions

 HyperbolicSecantDist (double mu, double sigma)
 Constructs a hyperbolic secant distribution with parameters.
double density (double x)
 Returns \(f(x)\), the density evaluated at \(x\).
double cdf (double x)
 Returns the distribution function \(F(x)\).
double barF (double x)
 Returns the complementary distribution function.
double inverseF (double u)
 Returns the inverse distribution function \(x = F^{-1}(u)\).
double getMean ()
 Returns the mean.
double getVariance ()
 Returns the variance.
double getStandardDeviation ()
 Returns the standard deviation.
double getMu ()
 Returns the parameter \(\mu\) of this object.
double getSigma ()
 Returns the parameter \(\sigma\) of this object.
void setParams (double mu, double sigma)
 Sets the parameters \(\mu\) and \(\sigma\) of this object.
double[] getParams ()
 Return a table containing the parameters of the current distribution.
String toString ()
 Returns a String containing information about the current distribution.
Public Member Functions inherited from umontreal.ssj.probdist.ContinuousDistribution
double inverseBrent (double a, double b, double u, double tol)
 Computes the inverse distribution function \(x = F^{-1}(u)\), using the Brent-Dekker method.
double inverseBisection (double u)
 Computes and returns the inverse distribution function \(x = F^{-1}(u)\), using bisection.
double getXinf ()
 Returns \(x_a\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
double getXsup ()
 Returns \(x_b\) such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXinf (double xa)
 Sets the value \(x_a=\) xa, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).
void setXsup (double xb)
 Sets the value \(x_b=\) xb, such that the probability density is 0 everywhere outside the interval \([x_a, x_b]\).

Static Public Member Functions

static double density (double mu, double sigma, double x)
 Computes the density function ( fHyperbolicSecant ) for a hyperbolic secant distribution with parameters.
static double cdf (double mu, double sigma, double x)
 Computes the distribution function of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).
static double barF (double mu, double sigma, double x)
 Computes the complementary distribution function of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).
static double inverseF (double mu, double sigma, double u)
 Computes the inverse of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).
static double[] getMLE (double[] x, int n)
 Estimates the parameters \((\mu, \sigma)\) of the hyperbolic secant distribution using the maximum likelihood method, from the.
static HyperbolicSecantDist getInstanceFromMLE (double[] x, int n)
 Creates a new instance of a hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).
static double getMean (double mu, double sigma)
 Computes and returns the mean \(E[X] = \mu\) of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).
static double getVariance (double mu, double sigma)
 Computes and returns the variance \(\mbox{Var}[X] = \sigma^2\) of the hyperbolic secant distribution with parameters \(\mu\) and.
static double getStandardDeviation (double mu, double sigma)
 Computes and returns the standard deviation of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).

Detailed Description

Extends the class ContinuousDistribution for the hyperbolic secant distribution with location parameter \(\mu\) and scale parameter.

\(\sigma> 0\). Its density is

\[ f(x) = \frac{1}{2 \sigma} \mbox{ sech}\left(\frac{\pi}{2} \frac{(x - \mu)}{\sigma}\right) \tag{fHyperbolicSecant} \]

The distribution function is given by

\[ F(x) = \frac{2}{\pi} \tan^{-1}\left[\exp{\left(\frac{\pi}{2} \frac{(x - \mu)}{\sigma}\right)}\right] \tag{FHyperbolicSecant} \]

The non-static versions of the methods cdf, barF, and inverseF call the static version of the same name.

Definition at line 48 of file HyperbolicSecantDist.java.

Constructor & Destructor Documentation

◆ HyperbolicSecantDist()

umontreal.ssj.probdist.HyperbolicSecantDist.HyperbolicSecantDist ( double mu,
double sigma )

Constructs a hyperbolic secant distribution with parameters.

\(\mu\) and \(\sigma\).

Definition at line 88 of file HyperbolicSecantDist.java.

Member Function Documentation

◆ barF() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.barF ( double mu,
double sigma,
double x )
static

Computes the complementary distribution function of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).

Definition at line 157 of file HyperbolicSecantDist.java.

◆ barF() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.barF ( double x)

Returns the complementary distribution function.

The default implementation computes \(\bar{F}(x) = 1 - F(x)\).

Parameters
xvalue at which the complementary distribution function is evaluated
Returns
complementary distribution function evaluated at x

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 100 of file HyperbolicSecantDist.java.

◆ cdf() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.cdf ( double mu,
double sigma,
double x )
static

Computes the distribution function of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).

Definition at line 141 of file HyperbolicSecantDist.java.

◆ cdf() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.cdf ( double x)

Returns the distribution function \(F(x)\).

Parameters
xvalue at which the distribution function is evaluated
Returns
distribution function evaluated at x

Implements umontreal.ssj.probdist.Distribution.

Definition at line 96 of file HyperbolicSecantDist.java.

◆ density() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.density ( double mu,
double sigma,
double x )
static

Computes the density function ( fHyperbolicSecant ) for a hyperbolic secant distribution with parameters.

\(\mu\) and \(\sigma\).

Definition at line 127 of file HyperbolicSecantDist.java.

◆ density() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.density ( double x)

Returns \(f(x)\), the density evaluated at \(x\).

Parameters
xvalue at which the density is evaluated
Returns
density function evaluated at x

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 92 of file HyperbolicSecantDist.java.

◆ getInstanceFromMLE()

HyperbolicSecantDist umontreal.ssj.probdist.HyperbolicSecantDist.getInstanceFromMLE ( double[] x,
int n )
static

Creates a new instance of a hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\) estimated using the maximum likelihood method based on the \(n\) observations \(x[i]\), \(i = 0, 1, …, n-1\).

Parameters
xthe list of observations to use to evaluate parameters
nthe number of observations to use to evaluate parameters

Definition at line 246 of file HyperbolicSecantDist.java.

◆ getMean() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.getMean ( )

Returns the mean.

Returns
the mean

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 108 of file HyperbolicSecantDist.java.

◆ getMean() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.getMean ( double mu,
double sigma )
static

Computes and returns the mean \(E[X] = \mu\) of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).

Returns
the mean of the hyperbolic secant distribution \(E[X] = \mu\)

Definition at line 257 of file HyperbolicSecantDist.java.

◆ getMLE()

double[] umontreal.ssj.probdist.HyperbolicSecantDist.getMLE ( double[] x,
int n )
static

Estimates the parameters \((\mu, \sigma)\) of the hyperbolic secant distribution using the maximum likelihood method, from the.

\(n\) observations \(x[i]\), \(i = 0, 1,…, n-1\). The estimates are returned in a two-element array, in regular order: [ \(\mu\), \(\sigma\)]. The estimate of the parameters is given by maximizing numerically the log-likelihood function, using the Uncmin package [203], [224] .

Parameters
xthe list of observations to use to evaluate parameters
nthe number of observations to use to evaluate parameters
Returns
returns the parameters [ \(\hat{\mu}\), \(\hat{\sigma}\)]

Definition at line 202 of file HyperbolicSecantDist.java.

◆ getMu()

double umontreal.ssj.probdist.HyperbolicSecantDist.getMu ( )

Returns the parameter \(\mu\) of this object.

Definition at line 290 of file HyperbolicSecantDist.java.

◆ getParams()

double[] umontreal.ssj.probdist.HyperbolicSecantDist.getParams ( )

Return a table containing the parameters of the current distribution.

This table is put in regular order: [ \(\mu\), \(\sigma\)].

Implements umontreal.ssj.probdist.Distribution.

Definition at line 316 of file HyperbolicSecantDist.java.

◆ getSigma()

double umontreal.ssj.probdist.HyperbolicSecantDist.getSigma ( )

Returns the parameter \(\sigma\) of this object.

Definition at line 297 of file HyperbolicSecantDist.java.

◆ getStandardDeviation() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.getStandardDeviation ( )

Returns the standard deviation.

Returns
the standard deviation

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 116 of file HyperbolicSecantDist.java.

◆ getStandardDeviation() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.getStandardDeviation ( double mu,
double sigma )
static

Computes and returns the standard deviation of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).

Returns
the standard deviation of the hyperbolic secant distribution

Definition at line 283 of file HyperbolicSecantDist.java.

◆ getVariance() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.getVariance ( )

Returns the variance.

Returns
the variance

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 112 of file HyperbolicSecantDist.java.

◆ getVariance() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.getVariance ( double mu,
double sigma )
static

Computes and returns the variance \(\mbox{Var}[X] = \sigma^2\) of the hyperbolic secant distribution with parameters \(\mu\) and.

\(\sigma\).

Returns
the variance of the hyperbolic secant distribution \(\mbox{Var}[X] = \sigma^2\)

Definition at line 270 of file HyperbolicSecantDist.java.

◆ inverseF() [1/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.inverseF ( double mu,
double sigma,
double u )
static

Computes the inverse of the hyperbolic secant distribution with parameters \(\mu\) and \(\sigma\).

Definition at line 174 of file HyperbolicSecantDist.java.

◆ inverseF() [2/2]

double umontreal.ssj.probdist.HyperbolicSecantDist.inverseF ( double u)

Returns the inverse distribution function \(x = F^{-1}(u)\).

Restrictions: \(u \in[0,1]\).

Parameters
uvalue at which the inverse distribution function is evaluated
Returns
the inverse distribution function evaluated at u
Exceptions
IllegalArgumentExceptionif \(u\) is not in the interval \([0,1]\)

Reimplemented from umontreal.ssj.probdist.ContinuousDistribution.

Definition at line 104 of file HyperbolicSecantDist.java.

◆ setParams()

void umontreal.ssj.probdist.HyperbolicSecantDist.setParams ( double mu,
double sigma )

Sets the parameters \(\mu\) and \(\sigma\) of this object.

Definition at line 304 of file HyperbolicSecantDist.java.

◆ toString()

String umontreal.ssj.probdist.HyperbolicSecantDist.toString ( )

Returns a String containing information about the current distribution.

Definition at line 324 of file HyperbolicSecantDist.java.


The documentation for this class was generated from the following file: