powered by
Computes a highest probability interval for a discrete probability distribution
discint(dist, prob)
probability distribution written as a matrix where the first column contain the values and the second column the probabilities
probability content of interest
exact probability content of interval
set of values of the probability interval
# NOT RUN { x=0:10 probs=dbinom(x,size=10,prob=.3) dist=cbind(x,probs) pcontent=.8 discint(dist,pcontent) # }
Run the code above in your browser using DataLab