discint: Highest probability interval for a discrete distribution

Description Usage Arguments Value Author(s) Examples

Description

Computes a highest probability interval for a discrete probability distribution

Usage

1
discint(dist, prob)

Arguments

dist

probability distribution written as a matrix where the first column contain the values and the second column the probabilities

prob

probability content of interest

Value

prob

exact probability content of interval

set

set of values of the probability interval

Author(s)

Jim Albert

Examples

1
2
3
4
5
x=0:10
probs=dbinom(x,size=10,prob=.3)
dist=cbind(x,probs)
pcontent=.8
discint(dist,pcontent)

Example output

$prob
[1] 0.8214841

$set
[1] 1 2 3 4

LearnBayes documentation built on May 1, 2019, 7:03 p.m.