Student T Distribution¤
stamox.distribution.pt(q: Union[Float, ArrayLike], df: Union[Int, Float, ArrayLike], loc: Union[Float, ArrayLike] = 0.0, scale: Union[Float, ArrayLike] = 1.0, lower_tail: bool = True, log_prob: bool = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Calculates the probability of a given value for Student T distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
q |
Union[Float, ArrayLike] |
The value to calculate the probability of. |
required |
df |
Union[Int, Float, ArrayLike] |
The degrees of freedom of the distribution. |
required |
loc |
Union[Float, ArrayLike] |
The location parameter of the distribution. |
0.0 |
scale |
Union[Float, ArrayLike] |
The scale parameter of the distribution. |
1.0 |
lower_tail |
bool |
Whether to calculate the lower tail probability or not. |
True |
log_prob |
bool |
Whether to return the log probability or not. |
False |
dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
The cdf value of the given value for Student T distribution. |
Examples:
>>> pt(1.0, 1.0)
Array(0.74999994, dtype=float32, weak_type=True)
stamox.distribution.qt(p: Union[Float, ArrayLike], df: Union[Int, Float, ArrayLike], loc: Union[Float, ArrayLike] = 0.0, scale: Union[Float, ArrayLike] = 1.0, lower_tail = True, log_prob = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Calculates the quantile of Student T distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
p |
Union[Float, ArrayLike] |
A float or array-like object representing the quantile to be calculated. |
required |
df |
Union[Int, Float, ArrayLike] |
An int, float, or array-like object representing the degrees of freedom. |
required |
loc |
Union[Float, ArrayLike] |
An optional float or array-like object representing the location parameter. Defaults to 0.0. |
0.0 |
scale |
Union[Float, ArrayLike] |
An optional float or array-like object representing the scale parameter. Defaults to 1.0. |
1.0 |
lower_tail |
A boolean indicating whether the lower tail should be used. Defaults to True. |
True |
|
log_prob |
A boolean indicating whether the probability should be logged. Defaults to False. |
False |
|
dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
The quantile of the Student T distribution. |
Examples:
>>> qt(0.5, 1.0)
Array(0., dtype=float32, weak_type=True)
stamox.distribution.dt(x: Union[Float, ArrayLike], df: Union[Int, Float, ArrayLike], loc: Union[Float, ArrayLike] = 0.0, scale: Union[Float, ArrayLike] = 1.0, lower_tail: bool = True, log_prob: bool = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Calculates the probability density function of a Student's t-distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
x |
Union[Float, ArrayLike] |
A float or array-like object representing the values at which to evaluate |
required |
df |
Union[Int, Float, ArrayLike] |
Degrees of freedom for the Student's t-distribution. |
required |
loc |
Union[Float, ArrayLike] |
Location parameter for the Student's t-distribution. Defaults to 0.0. |
0.0 |
scale |
Union[Float, ArrayLike] |
Scale parameter for the Student's t-distribution. Defaults to 1.0. |
1.0 |
lower_tail |
bool |
Whether to return the lower tail probability. Defaults to True. |
True |
log_prob |
bool |
Whether to return the log probability. Defaults to False. |
False |
dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
The probability density function evaluated at |
Examples:
>>> dt(1.0, 1.0)
Array(0.1591549, dtype=float32, weak_type=True)
stamox.distribution.rt(key: PRNGKeyArray, sample_shape: Optional[Sequence[int]] = None, df: Union[Int, Float, ArrayLike] = None, loc: Union[Float, ArrayLike] = 0.0, scale: Union[Float, ArrayLike] = 1.0, lower_tail: bool = True, log_prob: bool = False, dtype = <class 'jax.numpy.float64'>) -> ArrayLike
¤
Generates random numbers from a t-distribution.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
key |
PRNGKeyArray |
Type of the random number generator. |
required |
sample_shape |
Optional[Sequence[int]] |
Shape of the output array. |
None |
df |
Union[Int, Float, ArrayLike] |
Degrees of freedom. |
None |
loc |
Union[Float, ArrayLike] |
Location parameter. |
0.0 |
scale |
Union[Float, ArrayLike] |
Scale parameter. |
1.0 |
lower_tail |
bool |
Whether to return the lower tail probability. Defaults to True. |
True |
log_prob |
bool |
Whether to return the log probability. Defaults to False. |
False |
dtype |
The dtype of the output. Defaults to jnp.float_. |
<class 'jax.numpy.float64'> |
Returns:
Type | Description |
---|---|
ArrayLike |
Random numbers from a t-distribution. |
Examples:
>>> rt(key, (2, 3), 1.0)
Array([[1.9982358e+02, 2.3699088e-01, 6.6509140e-01],
[5.3681795e-02, 3.3967651e+01, 6.8611817e+00]], dtype=float32)