expt: Theoretical Probability Distribution of General Experiment

Description Usage Arguments Details Value Examples

Description

General experiment with basic probability

Usage

1
expt(x, n, prob = NULL)

Arguments

x

vector, possible outcomes in one trial of experiment

n

number of trials

prob

probability assigned to each possible outcome

Details

The default probabilty equals to 1/n. All the assigned probabilites must between 0 and 1.

Value

Mean value and corresponding probabilities for all possible outcomes.

Examples

1
2
expt(x = c(1:3), n = 4)
expt(c(2:4), 3, prob = c(0.3, 0.5, 0.2))

clttools documentation built on May 2, 2019, 9:17 a.m.

Related to expt in clttools...