Bernoulli Trials
Consider independent
where
Beta distribution. The pdf
is known as the beta distribution with parameters
> rbeta(n,alpha,beta)generates
Bayes estimate.
When the uninformative prior
,
the posterior density is give by
,
and the expected value of
is calculated as
Explore it. Download bernoulli.r. The function bernoulli() generates data, and compares the estimates of two distinct methods. See how they differ in a particular outcome, and repeat the experiment with the same size. Increase the size, and observe the similarity of the two estimate.
> source("bernoulli.r")
> bernoulli()
> bernoulli(size=20)
© TTU Mathematics