# How to calculate a 95% Credible Interval for a Bernouli sampling in R?

How does one calculate a 95% Credible Interval for Bernouli sampling? I have looked into the package emdbook and the function tcredint() but i am unsure if this the way to go.

If anyone has references, I'm grateful.

Create data with 2000 rows of (0,1) set.seed(100) data<-data.frame(replicate(1,sample(0:1,2000,replace=TRUE))) colnames(data) <- c("sample") require(psych) mean(data$sample) sd(data$sample)'

Confidence Interval require(Publish) ci.mean(data)]