from symbulate import *
%matplotlib inline

"""
Explanation: Symbulate Documentation
Cards, coins, and dice
Many probabilistic situations involving physical objects like cards, coins, and dice can be specified with BoxModel.
< Common probability models | Contents | Common discrete distributions >
Be sure to import Symbulate using the following commands.
End of explanation
"""


n = 6
die = list(range(1, n+1))
P = BoxModel(die)
RV(P).sim(10000).plot()

"""
Explanation: Example.  Rolling a fair n-sided die (with n=6).
End of explanation
"""


P = BoxModel(['H', 'T'], size=2, order_matters=True)
P.sim(10000).tabulate(normalize=True)

"""
Explanation: Example. Flipping a fair coin twice and recording the results in sequence.
End of explanation
"""


P = BoxModel(['orange', 'brown', 'yellow'], probs=[0.5, 0.25, 0.25])
P.sim(10000).tabulate(normalize = True)

"""
Explanation: Example. Unequally likely outcomes on a colored "spinner".
End of explanation
"""


DeckOfCards(size=5).sim(3)

"""
Explanation: DeckOfCards() is a special case of BoxModel for drawing from a standard deck of 52 cards.  By default replace=False.
Example. Simulated hands of 5 cards each.
End of explanation
"""


