expt {clttools}R Documentation

Theoretical Probability Distribution of General Experiment

Description

General experiment with basic probability

Usage

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

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

[Package clttools version 1.3 Index]