iidspace {probs} | R Documentation |
Independent Identical Experiments Sets up a probability space corresponding to independent, identical experiments.
Description
Independent Identical Experiments Sets up a probability space corresponding to independent, identical experiments.
Usage
iidspace(x, ntrials, probs = NULL)
Arguments
x |
a vector of outcomes |
ntrials |
number of times to perform the experiment. |
probs |
vector of non-negative weights corresponding to |
Details
The elementary experiment to be repeated consists of drawing an element of x
according to the probabilities contained in probs
. The entries of probs
need not sum to one, but they will be normalized before any computations. If probs
is not specified, the equally likely model will be assumed.
Value
A data frame, with a probs
column, where probs
is calculated to be the probability of observing the outcome in its row under the assumption of independence and identical distribution of draws from x
.
Author(s)
G. Jay Kerns gkerns@ysu.edu.
See Also
Examples
iidspace( 1:6, ntrials = 3) # same as rolldie(3)
iidspace( 1:6, ntrials = 3, probs = 3:8 ) # unbalanced die
[Package probs version 0.9.9 Index]