r/probabilitytheory

A Bayesian Approach to the Mary's Children Problem

Introduction

I'm sure others have seen posts about the Mary's Children Problem.

Mary tells you the sex of one of her children. What is the probability that the other child is the opposite sex? Many say 67% with a conditional probability argument. Many say 50% with a statistical independence argument.

I did some calculations and am finding that the correct answer depends on the setup in a way that I have yet to see identified.

In summary:

If you ask Mary to randomly choose a child and tell you its sex, the probability that the other child is the opposite sex is 50%.

If you ask Mary to tell you whether one of her children is a given sex, and she says yes, the probability that the other child is the opposite sex is 67%.

The calculations:

First case:

Consider the experiment: Mary has two children. She randomly picks one and tells you its sex. What is the probability, given the sex she tells you is “boy”, that the sex of the other child is “girl”?

There are four mutually exclusive possibilities for the sexes of Mary’s children, listed in age order: BB, BG, GB, GG, each of which are equally likely a priori (before Mary speaks).

If Mary says “Boy”, let this event be called Sb. If Mary says “Girl”, let this event be Sg.

We’ll use Bayes’ formula to calculate the probability of BB given Sb: P(BB|Sb).

P(BB|Sb) = P( BB and Sb) / P(Sb) = P(Sb|BB)*P(BB)/P(Sb).

P(Sb) = ½ by symmetry. She is equally likely to say “boy” as “girl” given the setup.
P(Sb|BB) = 1 because Mary must say “boy” if both children are boys.
P(BB) = ¼ because BB is one of four equally likely possibilities for Mary’s offspring.

Therefore P(BB|Sb) = 1*¼ / ½ = ½.

By the law of total probability, the likelihood the other child is a girl is also ½.

Second case:

Consider the experiment: Mary has two children. You ask Mary if either child is a boy, and she says yes. What is the probability that the other child is a girl?

Again, there are four equally likely mutually exclusive possibilities for the sexes of the two children: BB, BG, GB, GG.

The probability that both children are boys given this answer from Mary is:

P(BB| not GG) =P(BB and not GG)/P(not GG) = ¼ / ¾ = ⅓.

So the probability that the other child is a girl is ⅔.

Conclusion

The answer to this dilemma depends on how the statement by Mary about the sex of one of her children is prompted. Is this a random thing that happens in conversation which reveals the sex of a randomly chosen child? Then 50% is correct for the other child having the opposite sex.

Is Mary's statement the result of an intentional question posed to Mary, which selects a sex and asks her if either child has that sex? Then 67% is correct.

The reason that the answers diverge is that when Mary randomly picks a child and tells you its sex, the likelihood is tilted in favor of both children having the sex she tells you, so BB, BG and GB are not equally likely anymore if she says "boy": BB is now more likely. This is why the second case analysis doesn't work for the first case setup.

Let me know what you guys think. Do you agree?

reddit.com
u/amerovingian — 4 days ago

Help an old man with problem from Bertsekas

Hello, I am trying to self-study probability as an old old man. I am using the book by Bertsekas and Tsitsiklis, and following the MIT course https://ocw.mit.edu/courses/6-041sc-probabilistic-systems-analysis-and-applied-probability-fall-2013/ .

It's quite difficult, and I am stuck on this problem here, where I don't know why a particular way of solving the problem doesn't work. The problem is problem 1 of problem Set 2 of the above course.

I would appreciate any help.

1.
Most mornings, Victor checks the weather report before deciding whether to carry an umbrella. If the forecast is “rain,” the probability of actually having rain that day is 80%. On the other hand, if the forecast is “no rain,” the probability of it actually raining is equal to 10%. During fall and winter the forecast is “rain” 70% of the time and during summer and spring it is 20%.

(a)

Oneday, Victor missed theforecast andit rained. Whatistheprobability thattheforecast was “rain” ifitwasduring thewinter?Whatistheprobability thattheforecastwas “rain” if it was during the summer?

So I can solve it and get the answer in the solutions, using the method they also use in the solutions:

solution with season set

However, I'd like to know why my solution which does not fix the season first is wrong. Here it is:

S=Summer, W=Winter; FR=ForecastRain, ~FR=Forecase no rain; R=Rain, ~R=not rain

P(FR | R W) = P(FR R W ) / P(R W ) ... definition of conditional probability

P(FR R W ) = P(W)P(FR|W)P(R|FR**∩** W) ... Multiplication rule

P(R ∩ W) = P(R ∩ W|FR)P(FR) + P(R ∩ W|~FR)P(~FR) ... Total probability rule

P(FR) = P(FR|W)P(W) + P(FR|S)P(S)
P(~FR) = P(~FR|W)P(W) + P(~FR|S)P(S) = 1 - P(FR)

Then taking into account wh at we are giving, and assigning P(S) = P(W) = 1/2:

P(R|FR) = 0.8; P(R| ~FR) = 0.1
P(FR|W) = 0.7; P(FR|S) = 0.2

P(FR R W ) = P(W)P(FR|W)P(R|FR**∩** W) = (1/2)(7/10)(8/10) = 56/200
P(FR) = P(FR|W)P(W) + P(FR|S)P(S) = (7/10)(1/2) + (2/10)(1/2) = 9/20
P(~FR) = 11/20

P(R ∩ W) = P(R ∩ W|FR)P(FR) + P(R ∩ W|~FR)P(~FR) = (8/10)(9/20) + (1/10)(11/20) = (72+11)/200 = 83/200

=> P(FR | R W) = P(FR R W ) / P(R W ) = 56/83

And as you can see from the above solution this doesn't work.

So What am I getting wrong here? I would appreciate any help, because I think this could reveal some fundamental misunderstanding I have about how the things work.

------------------------------

I figured it out:

P(R∩ W) =  P(R ∩ W|FR)P(FR) + P(R ∩ W|~FR)P(~FR)
= P(R ∩ W∩ FR) + P(R∩ W∩ ~FR)
= 56/200 + P(R∩ W∩ ~FR)

P(R∩ W∩ ~FR) = P(W)P(~FR|W)P(R|W∩ ~FR) ... again multiplication rule
= 3/200

P(R∩ W) = (56+3)/200 = 59/200

=> P(FR|R  W) = P(FR  R  W ) / P(R  W ) = 56/59

The mistake was where I said  P(R ∩ W|FR) = 8/10 and P(R ∩ W|~FR), in the model I had set up, the forecast will affect the probability of whether or not it is winter or summer.

This also demonstrates that everything posted about why this method wasn't possible is not correct.

reddit.com
u/Tall_Specialist_7623 — 9 days ago
▲ 2 r/probabilitytheory+1 crossposts

Probability and optimization

I am given the entropy function of S(P(x))=\sum_{\{0,1}^n} P(x)*ln(P(x)), where n represents dimension. This will create vertices of sorts, use n=3 for example. We will get the following 8 vertices (0,0,0), (1,0,0), (0,1,0), (0,0,1), (1,1,0), (1,0,1), (0,1,1), (1,1,1). If we group these terms based on the number of 1's in each vertex point, we get 1 term with zero 1's, 3 terms with one 1, 3 terms with two 1's, and one term with three 1's -> 1,3,3,1. If we consider the example with n=4, then we get 1,4,6,4,1, n=5 gives 1,5,10,10,5,1, and so on. This pattern is identical to pascals triangle. Also, all terms add up to (1/2^n), like for n=4: 1+4+6+4+1=16=(1/2)^4.

Then, another thing I noticed was the connection to the binomial distribution. If we calculate (n \\ k) meaning out of n choose k, for any n and k, we will get the values defined by the pascals triangle in the first paragraph. For example, with n=5:

(5 \\ 0) =5!/(5-0)!*0! = 1

(5 \\ 1) =5!/(5-1)!*1! = 5

(5 \\ 2) = 5!/(5-2)!*2! =10 and so on.

I want to check whether these relations have any validity or I am wasting my time with this. Any help here would be appreciated.

reddit.com
u/grinchboys — 4 days ago
▲ 25 r/probabilitytheory+3 crossposts

Why does our intuition fail so spectacularly at probability? (And how to fix it) 🎲

Hey Reddit!

I just made a new animated video exploring why the human brain is naturally so terrible at grasping probability and how to correct it.

If you've ever been baffled by the "Birthday Paradox" (where a room of just 23 people gives you a >50% chance of a shared birthday), it comes down to how our brains struggle with scale and overcounting.

In this video, I dive into the math and logic behind uncertainty and break it down. I put a lot of work into the visual storytelling to make these complex mathematical rules easy to digest. Whether you're learning statistics or just want to stop getting fooled by randomness, I think you'll find this helpful.

I'd love to hear your thoughts and am happy to answer any questions about the math in the comments!

youtube.com
u/Ki-Chao — 8 days ago

A bag contains a large number of red, green, white and black marbles with atleast 24 of each colour, in how many ways one can select 24 of these marbles so that there are even number of white marbles and atleast six black marbles?

How to solve this question, and simple and memorable way such that i do not forgot the concept in exam

reddit.com
u/Prudent_men — 7 days ago

Card draw probability

I'm playing a game, and another player has a hand of 6 cards. There are 64 unplayed cards that he could have. What are the odds that he has 2 particular cards out of that deck? If he has both, and I make the wrong choice, I lose. The other option I have also has risk (which I was able to calculate), so I need to weigh the odds. (This is online and asynchronous, so I have the leisure of asking.)

So think drawing 6 cards out of a deck of 64, and picking 2 particular cards.

reddit.com
u/CatfinityGamer — 17 days ago

piecewise function after integration

Hi guys! I was working on a introductory probability class problem and I'm not understanding a detail about integration for density functions.

In particular, given that we have 2 RV and their joint pdf, and their domain is a quadrangle with vertices on (0,0); (1,1) (1,2) (0,1)

if we try to calculate the marginal of Y, we would have to integrate. In this case I tried dividing the integral into 2 parts, since the extremes of integration differ depending on the part.

one part has extremes of integration from 0 to y and the second one from y-1 to 1.

the problem is that at the end of the integration, the pdf of Y should be a piecewise function, with the individual integrated parts that are individual pdfs, for a specific range of Y.

My question is:
Why in this case we obtained a piecewise function as a result?

If we try to calculate the mean of a continuous variable we would have to do integration too, why in that case we don't divide a function into sub-function?

and also how would this thing apply more generally?

PS. the joint distribution is a uniform, with pdf that is equivalent to 1, inside the quadrangle domain

domain of the joint pdf where the pdf is equal to 1. it's 0 otherwise.

the result is a piecewise function

reddit.com
u/ApprehensiveDrink618 — 14 days ago

Can someone Help Me Stress-Test This System?

I’m looking for people to point out where this model would fail, what incentives it creates, and what kinds of behavior it would likely produce.

I’m working on this because I think modern democracy, even with separation of powers, still often assumes that people in power will more or less carry out the responsibilities attached to their office. Symbiocracy is different in that it does not assume good faith. Instead, it deliberately separates rule-making from execution, then lets different parties pursue their own interests within that structure to see whether relatively stable outcomes can still emerge.

The state is divided into three systems:

S system (Sovereign system): handles national survival functions such as defense, intelligence, and emergencies.

H system (Health system): handles administration and civil governance.

R system (Regulator system): handles oversight, the judiciary, budget supervision, and institutional adjustment.

Power is allocated like this:

The largest party controls the S system and leads the R system.

The second-largest party controls the H system.

Other parties participate in the R system in proportion to their seats.

Let total national resources be T (tax).

A share, S value, is allocated first to the S system, so the S system receives T × S value.

The remaining T × (1 − S value) is then divided according to H value:

H system receives T × (1 − S value) × H value

R system receives T × (1 − S value) × (1 − H value)

(How S value is set can be discussed separately if anyone is interested.)

So the higher the H value, the more resources go to the H system; the lower the H value, the more resources go to the R system.

The H value is not a natural quantity. It is institutionally constructed.

The R system first defines the indicators, calculation method, and evaluation standard for the H value.

The H system then operates under those rules and generates the relevant data.

The R system then verifies that data and publishes the final H value.

For example, the H value could be built in a way similar to New Zealand’s Living Standards Framework. Suppose that in one period it uses only two components:

Housing score = 1 − proportion of households spending more than 30% of income on housing

Employment score = 1 − unemployment rate

The R system would predefine:

H value = 0.6 × Housing score + 0.4 × Employment score

The H system would then generate the relevant data under those rules, and the R system would verify and publish the result. That result would determine the next period’s allocation between the H system and the R system.

Another deliberate feature is that resources inside each system are not restricted by public or private purpose. In other words, once a system receives its resources, they can be used for policy, vote-buying, private gain, or even buying a private yacht. The only hard constraint is that resources cannot be moved across systems without declaration. So the model does not rely on moral constraints on use, only on boundaries between systems.

There is also a one-time no-confidence mechanism:

During a term, the largest party and the second-largest party may each propose one no-confidence motion, but at most one can actually take effect during the entire term.

Once triggered, the two parties swap control of the H system and the R system, while the S system remains unchanged.

So before no-confidence:

Largest party = S + R

Second-largest party = H

After no-confidence:

Largest party = S + H

Second-largest party = R

After that point, any further change to the H value evaluation standard requires co-signature from both parties.

Any criticism is welcome, especially criticism that can break the model directly.

Much thanks.

reddit.com
u/Symbiocracy — 16 days ago

Standard Error of Repeat k-Fold Cross Validation

Hello everyone. I wanted to get people's opinions on what they think. I'm writing a paper, and I need to come up with a standard error for repeated k-fold cross validation. The problem is I'm not sure what a good metric is for this; we have two different sample spaces: the repeats and the folds. They don't seem to be entirely independent either. Should it be sigma/root(#repeats)? Or sigma/root(#repeats * k)? Or is it fine to use either as long as I clearly layout what I did?

reddit.com
u/Visible-Biscotti7769 — 7 days ago

Beat the Drop game tactic suggestions?

Hi there, apologies if this is inappropriate to post as it pertains to a simple gambling game I enjoy playing.

The game costs £2 to enter and essentially awards you an initial £750,000 pot of cash to play with. You then have to answer 20 sports based outcome questions one at a time to leave with any money. All 20 questions must be completed. The key component of the game is that you can split your cash pot any way you want for every question.

For example, the question might say: will the Boston Celtics vs Philadelphia 76ers game have 214 points or more? Yes/No.

You can then put any amount you want on either side of the Yes/No divide. So maybe £500,00 Yes / £250,000 No if you weren't 100% sure.

In my case I always go with 100% of the cash pot on either outcome for at least the first 10 questions. I've only ever made it to question 11 before losing it all with a wrong answer.

There is a new selection of questions to choose from each day and you have 14 days from your last answer to choose your next question.

I am fascinated by this game and have just discovered r/probabilitytheory and wondered if you guys had any suggestions on how you would approach this game from a probability angle. Thanks

Oh, the game is https://beatthedrop.paddypower.com/

reddit.com
u/Mel0nFarmer — 1 day ago