You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benjamin W Trent (Jira)" <ji...@apache.org> on 2021/07/14 14:33:00 UTC
[jira] [Updated] (STATISTICS-31) Add survival probability function
to continuous distributions
[ https://issues.apache.org/jira/browse/STATISTICS-31?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin W Trent updated STATISTICS-31:
---------------------------------------
Description:
It is useful to know the [survival function|[https://en.wikipedia.org/wiki/Survival_function]] of a number given a continuous distribution.
While this can be approximated with
{noformat}
1 - cdf(x){noformat}
, there is an opportunity for greater accuracy in certain distributions.
A good example of this is the gamma distribution. The survival function for that distribution would probably look similar to:
```java
@Override
public double survivalProbability(double x) {
if (x <= SUPPORT_LO)
{ return 1; }
else if (x >= SUPPORT_HI)
{ return 0; }
return RegularizedGamma.Q.value(shape, x / scale);
}
```
was:
It is useful to know the [survival function|[https://en.wikipedia.org/wiki/Survival_function]] of a number given a continuous distribution.
While this can be approximated with `1 - cdf(x)`, there is an opportunity for greater accuracy in certain distributions.
A good example of this is the gamma distribution. The survival function for that distribution would probably look similar to:
```java
@Override
public double survivalProbability(double x) {
if (x <= SUPPORT_LO) {
return 1;
} else if (x >= SUPPORT_HI) {
return 0;
}
return RegularizedGamma.Q.value(shape, x / scale);
}
```
> Add survival probability function to continuous distributions
> -------------------------------------------------------------
>
> Key: STATISTICS-31
> URL: https://issues.apache.org/jira/browse/STATISTICS-31
> Project: Apache Commons Statistics
> Issue Type: New Feature
> Reporter: Benjamin W Trent
> Priority: Major
>
> It is useful to know the [survival function|[https://en.wikipedia.org/wiki/Survival_function]] of a number given a continuous distribution.
> While this can be approximated with
> {noformat}
> 1 - cdf(x){noformat}
> , there is an opportunity for greater accuracy in certain distributions.
>
> A good example of this is the gamma distribution. The survival function for that distribution would probably look similar to:
>
> ```java
> @Override
> public double survivalProbability(double x) {
> if (x <= SUPPORT_LO)
> { return 1; }
> else if (x >= SUPPORT_HI)
> { return 0; }
> return RegularizedGamma.Q.value(shape, x / scale);
> }
> ```
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)