r/probabilitytheory 7h ago

[Applied] What's the equation for this scenario?

2 Upvotes

Suppose I have a standard deck of cards, no cards missing and no abnormal cards added. If I shuffle the deck and draw one card at random, the odds of it being a spade are 1 in 4. That's pretty straightforward.

However, what if I put the card back in the deck, reshuffle, and draw another card? And I repeat this cycle X number of times (that is... X times I shuffle, X times I draw, and X-1 times I put the card back). I want to know what the odds are of me drawing a spade at least once.

And while we're at it, I'd also like to know the equation if there are a different number of suits. What if there's 3 suits and 39 cards? Or what if there's a 5th suit and 65 cards? Let's say that "1/s" represents the odds of me drawing a spade, with S representing the number of suits in the deck. And I draw after shuffling X number of times. What's the equation to determine the likelihood then?


r/probabilitytheory 16h ago

[Applied] From biased coins (and nothing else) to biased coins

3 Upvotes

Background

We're given a coin that shows heads with an unknown probability, λ. The goal is to use that coin (and possibly also a fair coin) to build a "new" coin that shows heads with a probability that depends on λ, call it f(λ). This is the Bernoulli factory problem (Keane and O'Brien 1994), and I catalog algorithms to solve it.

Main Question

Prove or disprove: Let f:(D⊆[0,1])→[0,1]. Given a coin that shows heads with probability λ (which can be 0 or 1), it is possible to toss heads with probability f(λ) using the coin and no other sources of randomness (and, thus, f is strongly simulable) if and only if—

  • f is constant on its domain, or is continuous and polynomially bounded on its domain (polynomially bounded means, both f and 1−f are bounded below by min(xn, (1−x)n) for some integer n [Keane and O'Brien 1994]), and
  • f(0) and f(1) are each 0, 1, or undefined, and
  • if f(0)=0 or f(1)=0 or both, then there is a polynomial g(x):[0,1]→[0,1] with computable coefficients, such that g(0)=f(0) and g(1)=f(1) whenever 0 or 1, respectively, is in the domain of f, and such that g(x)>f(x) for every x in the domain of f, except at 0 and 1, and
  • if f(0)=1 or f(1)=1 or both, then there is a polynomial h(x):[0,1]→[0,1] with computable coefficients, such that h(0)=f(0) and h(1)=f(1) whenever 0 or 1, respectively, is in the domain of f, and such that g(x)<f(x) for every x in the domain of f, except at 0 and 1.

It's possible that the conditions given are not necessary, and stronger conditions hold; for example: "0 is not in the domain of f, or f can be extended to a Lipschitz-continuous function on [0,ϵ) for some ϵ>0". A tricky example of such a function is f(x)=(sin⁡(1/x)/4+1/2)⋅(1−(1−x)n ) for n≥1 (f(0)=0), which is strongly simulable at 0 and is Lipschitz at, say, [0,0.01]. ((1−x)n is the probability of the biased coin showing zero n times in a row.)

For details, see my progress on this problem.

(In this post, "f(x) is undefined" means that x is not in the domain of f.)

The rest of this page will detail the problem.

Simulable and strongly simulable functions

There are two kinds of factory functions:

  • A function f(λ) is simulable if an algorithm exists to toss heads with probability f(λ) given a coin with probability of heads λ (the "biased coin") as well as a fair coin.
  • A function f(λ) is strongly simulable if an algorithm exists to toss heads with probability f(λ) given only a coin with probability of heads λ.

Every strongly simulable function is simulable, but not vice versa.

In fact, Keane and O'Brien (1994) showed already that f(λ) is strongly simulable if f is simulable and neither 0 nor 1 is in f's domain (that is, if the biased coin doesn't show heads every time or tails every time). And it's also easy to show that if f is strongly simulable, then f(0) and f(1) must each be 0, 1, or undefined.

However, it's not so trivial to find the exact class of strongly simulable functions when f's domain includes 0, 1, or both.

As one illustration of this, the proof of Keane and O'Brien relies on generating a geometric random variate and using that variate to control which "part" of the target function f(λ) to simulate. This obviously works on all of [0, 1] if the algorithm uses both the biased coin and a separate fair coin. However, if only the biased coin is used in the algorithm, the geometric random variate is generated using fair bits via the von Neumann method, which however will never terminate if λ is either 0 or 1. In addition, a result I found gives sufficient conditions for being strongly simulable when f's domain includes 0, 1, or both. Its proof proceeds by showing, among other things, that the Bernoulli factory for f must flip the input coin and get 0 and 1 before it simulates any fair coin flips via the von Neumann trick.

References


r/probabilitytheory 16h ago

[Discussion] Monty Hall, the never ending story

0 Upvotes

A lot of the confusion and misunderstandings and paradoxes around the Monty-Hall-Discussion arise from the different interpretations of the game with either a "knowing host" or an "ignorant host". Some people do that math based on an ignorant host, some assume the host knows. But today, I want to propose a method that we can actually use to *test* the host's knowledge.

This is my setup:

You are only ever brought into the TV studio when there has been one door reserved for you (randomly of course) and one door opened and showing a goat. Thats what you see, and you play this setup 100 times. And I believe you can determine whether the host knew where the car was or not.

Here is how: If you play the "stay"-strategy, you would expect to win 33% of the games. but this will only happen if you see all the games. If the host accidentely reveals the car, the game is aborted and you will never see it. In this case (Monty does not know) you will observe that your win-rate is 50%. And then you know that there were games you never saw.

I have written a Javascript simulation for this, and it seems to work. I also asked AI for a comment, and it confirmed my approach. Nevertheless I find it wiered that it works. Or am I missing something?


r/probabilitytheory 1d ago

[Education] Which is the probability density function?

2 Upvotes

Hello all, I have a semantics question.

I have the definition that the probability of X between a and b is the integral from a to b of f(x) with respect to x.

In case latex renders: $P(a <X < b) = \int_{a}^b{f(x)}dx$

Is the probability density function the integral or f? If f (my reading of the text) what is the name for the integral?

Same sort of question with the c.d.f.

PS.
I'm working out of the text book Mathematical Statistics and Data Analysis (Rice; 3rd ed.). Definition occurs on page 47.


r/probabilitytheory 2d ago

[Homework] Rarity

0 Upvotes

Over the weekend, I sat down and did a calculation (wrong, no doubt)

to see what chance you would have of catching a traitor, selecting a name randomly.

The answer I got was 1/675,675. Having forgotten what happens when there are three players.

...

This got me thinking, about rareness,

and I wondered, for myself,

at what probability do things start to become called rare?

I mean, 1/4000 , but 1/30 actually, you'd be waiting around a fair bit.

Is an answer even possible/ show me error of way. BW, Ben.


r/probabilitytheory 4d ago

[Discussion] Before you think im an ai bot, i asked claude to restructure my text because i kept circling around trying to explain what i did not understand

0 Upvotes

I'm working through E.T. Jaynes' Probability Theory: The Logic of Science on my own, currently in Chapter 2 (around page 28). My motivation is applied: I run an online retail business and want a principled way to forecast demand — for instance, estimating the probability that a given product sells between 100 and 200 units in one month of the year versus another, and eventually building forecasting software around that kind of inference.

Before starting the book I reviewed the calculus prerequisites — partial derivatives, the chain rule, the product rule — so I can follow the derivations step by step.

My difficulty is conceptual rather than computational. In the sections where Jaynes derives the rules of probability from his desiderata, he sets up functional equations relating the plausibilities of propositions and then differentiates them to determine the form the combining function must take. I can execute each step — I can do the differentiation and integration, and I follow that we differentiate — but I don't understand why differentiation is the right tool at each point, or what underlying logic drives the derivation to proceed the way it does. My grasp is mechanical: I can reproduce the manipulations without understanding the principle behind them.

Concretely: in the derivation of the product rule (and sum rule) from the desiderata, could you walk me through the reasoning that justifies each move in the functional-equation argument — what makes differentiation the appropriate step there, not just how to carry it out?

I can send my notes as well to anybody who'd like to help me
thanks


r/probabilitytheory 6d ago

[Education] probability — a probability & sampling playground (stats) - made with manic

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/probabilitytheory 6d ago

[Discussion] How much money could someone make through hitting every possible statistical anomaly?

Thumbnail
0 Upvotes

r/probabilitytheory 7d ago

[Discussion] Random life time probability

0 Upvotes

Ive asked AI this and I get wildly different answers. So what is the probability just for a one off random life event.

So I for fun wrote a song aboit someone famous called Roland Browning and year later he was sitting in front of my at a Squeeze concern in London.

How would you calculate the odds for such a random event?

Thanks


r/probabilitytheory 8d ago

[Education] Visual BAC Probability Tree Solution!

Enable HLS to view with audio, or disable this notification

6 Upvotes

Solved a classic BAC probability tree problem using Manim! ✨

For more step-by-step visual proofs and exam prep, check out my workbook "The Ultimate BAC Math Challenge" on Amazon!

🔗 Get your copy here:https://www.amazon.com/dp/B0H7Y4GF62


r/probabilitytheory 7d ago

[Discussion] What's the flaw in my thinking for this bayesian thinking example?

2 Upvotes

In a question I saw from a 3Blue1Brown video about baye's law, that was as follows:

Linda is 31 years old, single, outspoken, and very bright. She majored in philosophy. As a student, she was deeply concerned with issues of discrimination and social justice, and also participated in anti-nuclear demonstrations. Which is more probable?

Linda is a bank teller.

Linda is a bank teller and is active in the feminist movement.

Now I understood that there are definitely more bank tellers than there are bank tellers that are active in the feminist movement, and that if you plucked out a random girl she is definitely more likely to be the former, however, what I thought is that since we've been given context about Linda, it seems rational to assume that she is likely to be active in the feminist movement due to her past, but that turned out to be wrong.

What am I missing? 😭

And if someone has ways to explain bayesian thinking intuitively and how to adapt it realistically aswell, I'd greatly appreciate it


r/probabilitytheory 8d ago

[Education] A good question

1 Upvotes

Ek accha sawal hai bhaiya

•A one-way road track is 20 km long and 8 km wide, divided into 4 equal lanes. There are 16 identical cars already on the track, moving at a constant speed of 10 km/h. Exactly 4 cars are present in each lane.

A new car enters the track from the starting point at a speed of 11 km/h. It chooses one of the four lanes uniformly at random and cannot change lanes thereafter.

Assume that the positions of the existing cars in each lane are independently and uniformly distributed along the length of the track, no two cars initially overlap, and overtaking is not allowed. A collision occurs if the new car catches up to at least one car in its lane before reaching the end of the track.

Find:

1.The probability P that the new car collides with at least one existing car.

2.The probability P' that the new car completes the journey without any collision.

a) P = (1/4 )⁴, P' =1- (1/4)⁴

b) P =( 1/11 )⁴, P' = 1-(1/11)⁴

c) P = (1/11)⁴ , P' = 1

d) P =1- (10/11)⁴ , P'=(10/11)⁴

Isko Maine khud banaya Hai Koi galti Ho To dekhna


r/probabilitytheory 10d ago

[Discussion] How is the national lottery regulated...

4 Upvotes

What's to stop Allwyn from pre recording thousands of draws and using the sets of numbers with the fewest winners each time as the draw. Easily doable within the half hour of the closing.


r/probabilitytheory 11d ago

[Discussion] Monty Hall variation with 4 doors

4 Upvotes

There are 4 doors A B C D each with 1/4 of binding a prize. I choose door C. The host then reviele the door A (she/he knows that has no main prize behind it) and asks me should I stick with C or switch to B or D (you know the story)

Is it better to switch to B or to D or it doesn't matter?


r/probabilitytheory 11d ago

[Discussion] Monty Hall - The "Real" solution for the sceptical among you.

Thumbnail
2 Upvotes

For those of you (or someone you know) who struggle with grasping the true result. Let me know if this helped.


r/probabilitytheory 11d ago

[Applied] What are the chances in this result? And more

2 Upvotes

Okay, this is likely more simple than most questions here, admittedly, but I was just doing a mystery box/essentially gambling thing and had what appears to me to be a super improbable result, and I'm curious just how unlikely it is and I can't recall how to do the math here.

Essentially I had an advertised 62% chance of a loss result, with the other 38% being break even and above. I did 5 throws at once and all 5 ended in the loss result. Then I did another 5 at once, and again all ended in a loss result. So what are the chances of 10 consecutive/concurrent losses at a 62% chance of loss?


r/probabilitytheory 11d ago

[Discussion] Jackpot Numbers On Roulette

1 Upvotes

It had been a minute since I been to this casino near me, recently I discovered they added Jackpot numbers to their video roulette. I'll explain further..

After bets are placed and the dealer spins the ball, Jackpots of either 50x, 100x, 175x and 250x are placed on between 2 and 5 random numbers including 0 and 00. The bet has to be placed on the exact number to get the jackpot.

I didn't do any math on this but I figured if I covered the board in $1 chips as much as I could while mitigating loss, eventually I'd hit some Jackpots. I saw in the recent history that Jackpots did come up.

To start since the payout for one number is 30 to 1.. which I noticed.. it was 30 not 35 for some reason, so I began putting $1 on 30 numbers. That's 30 out of 38 where if I didn't hit a jackpot but one of my numbers did hit I wouldn't lose money. Then I thought, if I'm willing to lose 1 or 2 dollars a spin, I can cover more odds so I did 5 spins each of 31/38 and 32/38.

In about 20 to 30 minutes time, I hit a 175x and a 100x jackpot and two times my numbers missed and took a loss. I didn't count the spins but dealer didn't work like a clock.

I didn't play that long as I was with my gf and she wanted to do other stuff. I want to go back with a more tempered strategy and more time.

What do y'all think? Any strategies come to mind? Anything I'm missing? Is it too risky to try with higher values? Would you recommend I don't do it at all?


r/probabilitytheory 12d ago

[Education] Built a probability puzzle game which exercise my understanding of Bayesian Network

1 Upvotes

Being inspired by the propagation on Bayesian network.

It is based on directed graph. Flow enters at a source, splits at junctions by pipe weights, and hit exact percentage targets at terminal buckets. Your job is to find the right pipe/weight configuration.

This is the same math as belief propagation on a Bayesian network, or exact inference on a DAG. It also maps cleanly to an MDP where the pipe configuration is the policy and hitting the target distribution is the reward.

Would love your feedback, especially if anything feels off mathematically or puzzle-design-wise. It's called Markov, free on the App Store.


r/probabilitytheory 12d ago

[Discussion] Calculating Probability of Default

3 Upvotes

Hi everyone,

I work at a long term car rental company, and I need to calculate the probability that someone will default on their monthly payment. In order to allocate a risk reserve.

For context:

Contract lengths are 1 year

We pre approve the client, i.e using their personal info, credit checks etc., and sort them into "risk" groups/buckets.

So the reasoning would be, splitting the customers up into these respective groups, calculating the probability of default, per group, and then allocating respective risk reserves, to build into the monthly premium.

We are using Markov Chains for this. So far.

I'm unsure whether this is the right approach, or if we are the blind leading the blind. So any advice would be appreciated. Some thoughts on implementing a ML Model would be cool too.


r/probabilitytheory 12d ago

[Research] suggestion on probability book

Thumbnail
2 Upvotes

r/probabilitytheory 12d ago

[Discussion] 100 % vs 1% * 100 times

0 Upvotes

Someone please explain;

Problem - Lets say the chance of a player scoring a goal is a 100% per game, so the probability of them not scoring is 0 and scoring is 1. But, if I divide the 100% win probability into 90 outcomes to get the probability of them scoring per minute, this would mean that their chance of scoring per minute is 1 in 90 (assuming no added time and that they play from start to finish)

So now, say I use a random number generator from 1 to 90 (to check in which minute they will score), 90 times (cuz they play 90 minutes) to simulate this. All I need is one of the randomised numbers to be "1" out of 90 randomised numbers. That will mean they scored and lived happily ever after. And for the probability of 100% score rate to hold true.

But if I simulate this enough times, there will be a data set where in all of those 90 randomised samples, not one of them will be "1" meaning our player doesnt end up scoring in the match, despite having a "100% chance of scoring"

Just by dividing the probability of 100 and adding it back up, I've created a chance for him to lose. Does this mean the sum of its parts is not equal to a 100? What?! How?! Why?! I don't understand this! Someone please explain.


r/probabilitytheory 13d ago

[Applied] NoiseLang: Where N = 5 is a Dirac delta

6 Upvotes

Creator of NoiseLang here! During my telecom degree I took a course on random signals and noise, I spent a lot of evenings writing probability by hand (expectations, variances, the odds of two random variables landing in some region) and every time I tried to run any of it on a computer it was so much boilerplate. I kept wishing I could type the math and have it run.

The whole language hangs on one idea, every value is a probability distribution. A plain number is a Dirac spike, so constants and random variables are the same kind of object and every operator maps distributions to distributions. Names are algebraic like on a page of math, so X + X is 2X and X - X is exactly 0, if you want independence you draw twice with ~.

Distributions compose (a random variable can feed another distribution's parameter), and conditioning is just the | bar from probability notation, scoped to the query. So a full Bayesian update fits in four lines:

bias  ~ unif(0, 1)            # prior: the coin's bias could be anything
flips ~[10] bernoulli(bias)   # 10 flips of the same mystery coin
heads = count(flips)
E(bias | heads == 7)          # posterior mean bias, 0.6667

I started it about nine years ago and never finished it, the parser and a tree-walking interpreter were a weekend of work, the efficient Monte Carlo runtime was not. Recently I brought it back, JIT (Cranelift), the WASM backend and the numerical code...

Rest of the announcement:

https://manualmeida.dev/articles/noiselang/

It's a toy language, you probably should not use it for anything serious, but it runs in the browser (WASM) at noiselang.com if you wanna play with it!


r/probabilitytheory 13d ago

[Discussion] What is the probability of all events occuring?

6 Upvotes

I apologize if this isn't allowed, but I recently experienced a stillbirth at 37 weeks due to a true knot in his umbilical cord (TKUC). Once I finally processed what happened, as I was filling out the fetal demise paperwork, I noticed something peculiar about his delivery date, then I noticed another peculiarity of his delivery time. After doing research about the cause of his passing and learning that 98% of TKUC outcomes are positive, the probability of a TKUC that results in fetal demise is only 0.3% - 1%, I began to wonder about the probability of everything peculiar about my sons existence occurring. I am terrible at math, but my attempts just gave me comfort because ( even though most likely incorrect ) the possibility of everything happening to one individual seemed incredibly low, it just kinda gave me the sense that everything worked out exactly the way it was supposed to, and he is where he was meant to be. I said all that to say this: would someone be willing to calculate the probability of each event separately, and then calculate the probability of them all together? I would then love to hear your interpretation of the solution. Honestly, it's helping me grieve. If this is not allowed, again I apologize.

1) Probability of being born on June 25th 2026

2) Probability of delivery time (6:25am )matching delivery date

3) Probability of delivery date being a palindrome date 6.25.26

4) Probability of both parents agreeing on first middle and last name and loving the combination of all 3

5) Probability of both parents agreeing on the spelling of each name and loving it

6) Probability of the uncommon agreed upon spelling accidentally being a mash up of his half siblings names ( prefix of half sister's name, suffix of half brothers name )

7) Probability of a TKUC resulting in fetal demise

8) Probability of funeral date being on the date he was due to be born ( 7.10.26 )

I would greatly appreciate assistance in this if at all possible. Thank you so much.


r/probabilitytheory 13d ago

[Discussion] What are the odds of this stat layout?

Thumbnail gallery
0 Upvotes

What are the genuine odds of rolling 24 six sided Dice and ending up with this layout?


r/probabilitytheory 13d ago

[Discussion] Absolute VS Relative Probability

0 Upvotes

Someone explain to me this - If I flip a coin and regardless of whether it's heads or tails, you win. So probability is 100% but if I say I will flip a coin twice and if either time it comes up heads, then you win, so probability is 1/2 + 1/2 = 2/2 = 1 = 100%

So mathematically they're both equal but intuitively 1 is more superior than the other.