[
https://issues.apache.org/jira/browse/STATISTICS-31?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17383313#comment-17383313
]
Alex Herbert commented on STATISTICS-31:
----------------------------------------
bq. Javadoc ending with **/
Checkstyle is not as strict on the test classes. One such change is that any
old javadoc is allowed thus allowing methods with no javadoc.
bq. I wonder why the protected methods in class
ContinuousDistributionAbstractTest aren't annotated with @Test
I thought this was related to JUnit 5 invoking tests only on the class where
they are annotated. Thus if you override the test method you have to add the
annotation in your sub-class again. With the current set-up you do not need
this as you are overriding a method invoked by the test.
> 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
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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)