This playbook automates local installation of a Wikka wiki webserver:
ansible-playbook -v -i .dev/deploy/dev .dev/deploy/dev_install.yml --connection=local
|from math import sqrt|
|from trueskill import TrueSkill, Rating, quality_1vs1, rate_1vs1, BETA|
|from trueskill.backends import cdf|
|# From https://github.com/sublee/trueskill/issues/1#issuecomment-10491635|
|def win_probability(team_rating, opponent_rating):|
|delta_mu = team_rating.mu - opponent_rating.mu|
|denom = sqrt(2 * (BETA * BETA) + pow(team_rating.sigma, 2) + pow(opponent_rating.sigma, 2))|
|win_prob = cdf(delta_mu / denom)|
From a comment by aws17576 on MetaFilter:
By the way, I wholeheartedly endorse Persi Diaconis's comment that probability is one area where even experts can easily be fooled. This was demonstrated to me in grad school when my advisor, addressing a roomful of mathematicians, posed this problem:
Person A flips a coin repeatedly, stopping the first time two heads in a row appear. Person B flips a coin repeatedly, stopping the first time a head and then a tail appear in a row. Who will flip the coin more times on average -- A, B, or is there no difference?
He let everyone think for a moment, then took a show of hands. Almost everyone got it wrong.