This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import sample | |
deck = range(60) | |
# Rotom is 0-3 | |
# Other basics are 4-12 | |
# Trolley is 13 | |
# FSS is 14-17 | |
# Town Store is 18-21 | |
# Nest is 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
import sys | |
from argparse import ArgumentParser | |
@functools.cache | |
def streak_chance(n, k, p): | |
# Probability of k successes in k tries is p^k. | |
if k == n: | |
return p ** k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
import csv | |
chances = { | |
'PHI': 250, | |
'LAL': 199, | |
'BOS': 156, | |
'PHX': 119, | |
'MIN': 88, | |
'NOP': 63, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
install.packages("expm") | |
library(expm) | |
#If you have 5000 people, what are the chances every birthday is represented at least once? | |
#method taken from http://mathforum.org/library/drmath/view/56679.html , coded for general solution | |
#number of days over which people are randomly distributed | |
n = 365 | |
#Set up an n*n transition matrix. |