# Questions tagged [probability-theory]

Challenges which involve computing probabilities for random variables and stochastic processes.

68 questions
Filter by
Sorted by
Tagged with
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 ...
• 4,472
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 ...
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 ...
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 ...
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 ...
• 71.8k
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 ...
• 89.3k
1k views

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 ...
• 196k
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 ...
• 2,959
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 ...
• 196k
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 ...
• 34.7k
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 ...
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 ...
• 43.7k
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 ...
• 89.3k
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, ...
• 8,619
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 & ...
• 71
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 ...
• 421
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 ...
• 693