Questions tagged [probability-theory]
Challenges which involve computing probabilities for random variables and stochastic processes.
68
questions
9
votes
1
answer
349
views
Knockout probabilities
Knockout is a basketball game where players take turns shooting. It is played as a sequence of two-player contests, each of which has the possibility of "knocking out" one of those players.
Suppose ...
10
votes
2
answers
936
views
Probabilities - how high can you go?
I previously asked a question for how to compute a probability quickly and accurately. However, evidently it was too easy as a closed form solution was given! Here is a more difficult version.
This ...
10
votes
5
answers
1k
views
Calculate a probability exactly and quickly
[This is a partner question to Calculate a probability exactly ]
This task is about writing code to compute a probability exactly and quickly. The output should be a precise probability written as a ...
9
votes
4
answers
1k
views
Calculate a probability exactly
This task is about writing code to compute a probability exactly. The output should be a precise probability written as a fraction in its most reduced form. That is it should never output ...
13
votes
1
answer
1k
views
XKCD Bracket Probabilities
Today's XKCD is a sports-tournament style bracket, where the contestants are well-known names, put into groups of possibly confusing names.
Give the probability that a given contestant will win the ...
43
votes
10
answers
3k
views
Not Your Routine Bean Machine
Consider this ASCII version of a mechanism similar to a bean machine or plinko/pachinko game:
O
^
\ ^
^ ^ \
\ ^ / ^
U U U U U
1 2 3 4 5
The ...
20
votes
4
answers
1k
views
(Somewhat) Pedantic Birthday Paradox
Background
The birthday paradox is a popular problem in probability theory which defies (most people's) mathematical intuition. The problem statement is:
Given N people, what is the probability ...
21
votes
2
answers
974
views
Prepare to... die?
Background
One source of ennui in tabletop role-playing games is dealing with rolls involving many dice. Casting a Disintegration spell may be instantaneous, but rolling and adding together 40 dice ...
32
votes
7
answers
2k
views
Are these dice nontransitive?
Nontransitive dice are nice little toys that defy our intuition in probability theory. We'll need a few definitions for this challenge:
Consider two dice A and B which are thrown at the same time. We ...
15
votes
3
answers
801
views
Build a program to analyze coin flip sequence choices
In a puzzle in an old book of mine, a game is defined in which two players choose sequences of coin flips that they believe will appear first when a coin is repeatedly flipped. (It was actually odd ...
13
votes
3
answers
2k
views
Computer: you do the math
This challenge is partly an algorithms challenge, involves some math and is partly simply a fastest code challenge.
For some positive integer n, consider a ...
7
votes
1
answer
602
views
Evaluate CDF of Student-t distribution
The goal of this codegolf is evaluating the cumulative distribution function of the student-t probability distribution. This is not trivial since there is no closed form and the function is dependent ...
12
votes
4
answers
867
views
Uncertainty in the Timeline of a Day
Suppose your alarm wakes you up one morning, but you hit snooze so you can sleep for 8 more minutes. When it rings again you grudgingly get up and take a shower, which you estimate takes 15 to 17 ...
30
votes
8
answers
2k
views
Extreme Whitewater Canoeing
You are paddling a canoe down a fairly fast whitewater river. Suddenly, your paddles explode, and you find yourself in a dangerous situation hurtling down a river rapid without any paddles. Luckily, ...
6
votes
5
answers
960
views
Calculate the probability of seeing a landmark when starting at a given point and walking straight in a random direction
Input 5 integers: Landmark X & Y, Starting Point X & ...
6
votes
0
answers
2k
views
Probability to win a hand of poker (Texas hold 'em)
Challenge:
In the last stage of a two players Texas hold 'em, given a two-card hand and five cards on table, determine your probability to win versus an opponent by the standard ranking of poker ...
10
votes
20
answers
973
views
Calculate probability of getting half as many heads as coin tosses.
Write a program that, given a small positive even integer from standard input, calculates the probability that flipping that many coins will result in half as many heads.
For example, given 2 coins ...
20
votes
5
answers
1k
views
Fix a broken random function
A friend has an add-on card in their computer which generates a perfectly random number from 1 to 5 inclusive. Unfortunately, they spilt cola on it somehow, and it now generates only 2's for all ...