bernoulli.trial: Execute a (series of) Bernoulli trial(s)
Description
This function allows one to calculate the probability of having r structures
out of n, orientated towards a target with probability p.
Usage
bernoulli.trial(n, p, r, type = "tail")
Arguments
n
Total number of structures
p
Probability of target (e.g. ratio of azimuths)
r
Number of structures orientated towards target (hits)
type
(Optional) Type of probability to output. Possibilities are: (a) single
in which case the result of a single Bernoulli trial is reported; or (b) tail in
which case it calculates Bernoulli trials for all hit values between 1 and (r-1) and then
outputs 1 minus the calculated probability. The latter is effectively a p-value. Default is tail
References
Ruggles, C (1999) Astronomy in Prehistoric Britain and Ireland. Yale University Press.