R/pChern.R

Defines functions pChern

Documented in pChern

#' Cumulative distribution function of Chernoff's distribution
#'
#' Computes the CDF of Chernoff's distribution.
#'
#' @param q evaluation point of the distribution function.
#' @return The function returns Chernoff's distribution function evaluated at q.
#' @export
#' @examples
#' pChern(0)
pChern <- function(q){

  if (q >=0){
  return(0.5+stats::integrate(dChern,lower=0,upper=q)$value)}
  else{return(0.5-stats::integrate(dChern,lower=0,upper=-q)$value)}

}

Try the ChernoffDist package in your browser

Any scripts or data that you put into this service are public.

ChernoffDist documentation built on May 31, 2023, 8:14 p.m.