DescTools (version 0.99.18)

Datasets for Simulation: Datasets for Probabilistic Simulation

Description

For performing elementary probability calculations in introductory statistic courses, there might datasets of playing cards casually be wanted. The dataset roulette contains the standard sample space for one spin on a roulette wheel. cards contains the standard set of 52 playing cards in four colours. tarot does the same with a classic tarot deck.

Usage

cards tarot roulette

Arguments

Value

cards is a data.frame with two columns named rank and suittarot is a data.frame with three columns named rank, suit and descroulette is a data.frame with two columns named num and col

Examples

Run this code
head(cards)
head(tarot)
head(roulette)

# drawing 5 cards
sample(do.call(paste, cards), 5)

# spin the wheel
sample(do.call(paste, roulette), 1)

# simulate the evening in Las Vegas
sample(do.call(paste, roulette), 32, replace=TRUE)

Run the code above in your browser using DataLab