• Welcome to Religious Forums, a friendly forum to discuss all religions in a friendly surrounding.

    Your voice is missing! You will need to register to get access to the following site features:
    • Reply to discussions and create your own threads.
    • Our modern chat room. No add-ons or extensions required, just login and start chatting!
    • Access to private conversations with other members.

    We hope to see you as a part of our community soon!

Probability Question for Fun (Again)

Debater Slayer

Vipassana
Staff member
Premium Member
Yes, but unless you know that your friend is chronically late, the best bet is to try to be punctual within the optimal range.

A German friend who is chronically late? I think you might have just broken the laws of the cosmos!
 

Exaltist Ethan

Bridging the Gap Between Believers and Skeptics
20 minutes is 1/3 of one hour, therefore, 33%. Give us some harder questions!
 

Debater Slayer

Vipassana
Staff member
Premium Member
I'll post the answer today. Just letting everyone know in case anyone wants to take a shot at this before I do!
 

Polymath257

Think & Care
Staff member
Premium Member
Two friends agree to meet up between 6 PM and 7 PM, and they agree that whoever arrives first will not wait for the other for more than 20 minutes. What is the probability that they will meet up?

The depends on the joint probability distribution of their arrival times.

So, for example, if both agree to show up at 6:30, the probability is 100%. :)

In any case, it is the measure of the set {(x,y) : 0<=x,y<=1, |x-y|<=1/3 } for that joint measure.

This set has a nice picture in the plane, just take out two right triangles of side length 2/3 from the top left and bottom right corners.

So, assuming uniform distributions, the probability is 1-(2/3)^2 =5/9.
[\SPOILER]
 

Debater Slayer

Vipassana
Staff member
Premium Member
Okay, so this is a problem that can be solved neatly using a graphical approach. To construct equations that we can clearly graph and from which we can derive the solution, let the arrival time of the first person be x and that of the second person be y.

Since the maximum difference between their arrival times is 20 minutes, the equations will look like this:

First person: x - y = 20, so y = x - 20. Later on, it will be clear why I isolated y on the LHS.

Second person: y - x = 20, so y = x + 20.

To graph each equation, we can start by plugging x = 0 and y = 0 into each, respectively, so that we have our starting points. Furthermore, since our time range is an hour, we can graph it as a square of side length = 60, for a total area of 3600.

LBgvYzw.jpg


The line intercepting the y-axis at (0, 20) represents the equation y - x = 20, which I rearranged into y = x + 20. When x = 0, y = 20. When y = 60, x = 40, which means that if the first person arrives at 6:40, the second will arrive at the very end of the hour, at 7.

The line at the bottom represents the equation of the first person's arrival time: x - y = 20, which I rearranged into y = x - 20. When y = 0, x = 20. When x = 60, y = 40.

We have our graph ready. Now, to derive the probability of both friends meeting up, we need to find the shaded area inside the square. There are two ways to go about this:

1) By normalizing the area of the square to 1, since it represents a probability distribution. This means we will calculate probabilities instead of calculating the area of the shaded region and then converting it into a probability via dividing it by the total area, which is 3600.

2) By calculating the area of the shaded region (which represents the probability of the meetup) and then dividing it by 3600 to find its probability.

Since the maximum waiting interval is 20 minutes = 20/60 = 1/3 of an hour, we can calculate the area of the shaded region by subtracting the sum of the areas of the two triangles in the top left and bottom right corners from the total area of the square. The area of each triangle is half the area of a square of side length = 2/3. This gives 1 - 2(1/2)(2/3)^2 = 1 - 4/9 = 5/9.

The other way, as I mentioned above, is to calculate the areas and then turn them into a probability. The area of each triangle is half the area of a square of side length = 40, so their sum is 2(1/2)(40)^2 = 1600. To find the shaded region, we will simply subtract 1600 from the total area (= 3600), which gives us 2000. Then we can find the probability of the shaded region by dividing it by the total area of the square, so 2000/3600 = 20/36 = 5/9.

We can also find the total area of the triangles using definite integrals: the total area of the square is the definite integral from 60 to 0 of f(x) = 60. The area of the triangle in the bottom right corner is the same as that of the triangle in the top left corner, so we will find the former and multiply it by 2 to get the sum of the two triangles' areas.

The line forming the bottom right triangle is defined by y = x - 20. This is why I isolated y earlier: I can integrate the function of the first person's arrival time very easily when I isolate y on the LHS and integrate x - 20 from 60 to 20, which is the interval on which the bottom right triangle is drawn.

5YeUHOw.jpg


Which gives (3600 - 1600)/3600 = 2000/3600 = 5/9.
 

Debater Slayer

Vipassana
Staff member
Premium Member
ouch!

after trying to think it thru for a few minutes I decided it would be easier to write a little code: run thru a couple thousand iterations using two random numbers between 1 and 60, count the "+- 20 hits" and compare the hits to the total iterations to get the percentage.

i anxiously await the non-code explanation, this one seems hard!

Your program came very close. That's quite impressive considering that it merely ran random iterations without using any calculus or algebra.
 

icehorse

......unaffiliated...... anti-dogmatist
Premium Member
Your program came very close. That's quite impressive considering that it merely ran random iterations without using any calculus or algebra.

I made a few assumptions about the edge cases. My guess is that if I'd known more about the edge cases, the program would have been closer still.

I do agree though, it's fun to see the math and the simulation support each other.

BTW, years ago I was arguing the famous "Monte Hall, three door" problem with a friend. I wrote a similar simulation and of course it supported the actual logic.

Hooray!
 
Top