Skip to content

Instantly share code, notes, and snippets.

View tleysh's full-sized avatar

Thomas Leyshon tleysh

  • Imperial College London
  • London
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tleysh
tleysh / Probability_of_dice_post.ipynb
Last active November 18, 2021 19:45
The probability of dice post
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#The first binomial
def firstBinomialCoff(num_of_dice,k):
return (math.factorial(num_of_dice)/(math.factorial((num_of_dice-k))*math.factorial(k)))
#The second binomial
def SecondBinomialCoff(num_of_dice,k,s,Total):
return (math.factorial((Total-s*k-1))/(math.factorial((Total-s*k-num_of_dice))*math.factorial((num_of_dice-1))))
#The full expression of Prob
def ProbofEachNum(num_of_dice,s,Total):
@tleysh
tleysh / UntitledTomLeyshon.ipynb
Last active November 25, 2020 23:48
TomLeyshTest
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.