Description Usage Arguments Details Value Author(s) References Examples
This function computes the posterior distribution of the success probability theta when a coin is spun on its edge (or tossed), when the prior density for that probability is a mixture of beta densities.
1 | coin.spin(para, r = 0, n = 0, n.points = 199)
|
para |
A matrix with 3 columns and k rows, where k is the number of components of the mixture. The first column contains the probabilities, and the next two the shape parameters a and b for the components. |
r |
Number of successes |
n |
Number of trials |
n.points |
The number of values of theta, equally-spaced between 0 and 1. |
This is provided simply so that readers spend less time typing. It is not intended to be robust and general code.
x |
Values of theta |
y |
Values of posterior density for theta |
Anthony Davison (anthony.davison@epfl.ch
)
Davison, A. C. (2003) Statistical Models. Cambridge University Press. Practical 11.1.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.