Learn R Programming

clttools (version 1.3)

coin: Theoretical Probability Distribution of Flipping Coins

Description

Mean and probability of flipping fair or loaded coin

Usage

coin(n, prob = NULL)

Arguments

n
number of trials
prob
probability assigned to each possible outcome

Value

Mean value and corresponding probabilities for all possible outcomes.

Details

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

Examples

Run this code
coin(n = 4)
coin(6, c(0.1, 0.9))

Run the code above in your browser using DataLab