[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 709 KB, 1856x2101, BIG_BRAIN.png [View same] [iqdb] [saucenao] [google]
11704946 No.11704946 [Reply] [Original]

>> No.11704950

>>11704946
Scenario 1 and 2 don't each have 50% probability. Namely, half the time box 2 is chosen, you'll pick a silver ball. So in trials where you see a golden ball, box 1 is twice as likely to be the candidate as box 2.

>> No.11704972

Your IQ

>> No.11704995

>>11704946
I'm kind of stuck, I know the answer more than 50 %, which is more logical if you imagine there are more balls in a single box.

If there are 10 golden balls in box 1,
1 golden and 9 silver balls in box one,
and 10 silver balls in box 3,
I would be pretty sure that I have box 1 after seeing a golden ball, so the probability would be pretty high for a second one.

I also know that the right solution is 2/3, but I don't quite get why.

I view it that way:
The first draw determines the result.
You can only draw two golden balls if you choose box 1 right from the start, which has a 1/3 chance of happening. Only one event could let you pick a golden ball first and then a silver ball: choosing box 2.
This has also a chance of 1/3. By subtracting this failure event from desired 100 % chance (1-1/3=2/3) the result would be 2/3 (66 %) like in literature.

But in my opinion the failure event is even less likely as it would require not only choosing box 2, but also picking the golden, and not the silver ball inside of it, which has a chance of 50 %.
Then it would be 1-(1/3*1/2)=5/6 (83 %)

This would become even more apparent if I imagine 10 balls in every again. Then the probability of the failure event would be 1/3*1/10=1/30 (3 %) and the chance should be 97 %

If anyone finds my mistake of thought, please correct me.

>> No.11705011

>>11704946
Everything

>> No.11705473

>>11704995
>If anyone finds my mistake of thought
right here:
>But in my opinion

>> No.11705557

>>11704946
There are two lotteries, one where every ticket is a winner and one with only a 1 in a million chance of winning. It's randomly chosen which lottery you're entered into, and you get a winning ticket. So you're saying it's equally likely you won the million in one lottery as it is you won the every ticket is a winner lottery?

>> No.11705842

>>11704946
When you have two boxes, there is a 50% chance you always get a gold and a 50% chance you get either a silver or a gold. That means you had a 75% chance of getting a gold your first time.
Personally, I think it is irrelevant, as we cant know which box you got out of. So, if the question is rephrased as "You have a box with gold balls in front of you or you have a box with silver balls in front of you", what are the chances you get a gold ball. 50%, as it is equally likely you chose either box. Or, you could say, "Since I have a gold ball and it is more likely to get a gold ball out of the gold box then a gold ball out of the mixed box, I most likely pulled from the gold box, making it more than 50% chance I picked from the gold box". Im really not sure of the answer here and would only be comfortable talking about this with a genuine professor of mathematics.
Basically, you can view this as so, two thirds of the gold balls have a gold ball with them, while one third of gold balls do not have a gold ball with them. Thusly, it is only a 1/3 chance that I dont pull a golden ball here.
Holy shit I might have just opened my third eye to probability. I am 99% certain that one of these answers is correct, at least. I need to find a professor kind enough to sit down with me and walk through all the ways I am thinking about this now.
Thank you OP, very cool image.

>> No.11706154
File: 14 KB, 728x441, bertrandBox.png [View same] [iqdb] [saucenao] [google]
11706154

>>11704946
2/3

>> No.11706299

there is two possible scenarios so 50%. you either picked the box with two gold or one gold. if all the balls were in one box it would be 2/3.
the trick is that you will think that the question is about the balls when it's the boxes

>> No.11706315

>>11706299
You are on the right track but you reached the opposite conclusion. When you randomly pick a box and then randomly pick one of the balls it's as if the presence of the boxes doesn't matter for this step. Picking any of the three balls is equally likely. Putting the walls of the boxes up or not doesn't matter at all for this step. And since 2 of those 3 balls come from the same box, the answer is 2/3.

It's not that hard, but some people just refuse to understand this

>> No.11706321

>>11704946
who the fuck cares?

>> No.11706330

>>11706315
read the question again. you are not starting from zero, you already picked a gold ball.
let's say gold is a and silver is b
so you have aa box and ab box. you picked a, what is the probability that your next pick will also be a? you already eliminated the first a so it's just a vs b which is 50/50

>> No.11706342

>>11706330
Probability doesn't work like that. Let's do a simpler experiment. We pick one ball at random from a random box. Don't worry about what happens after yet. You would agree with me that the probabilities are as follows?
1/3 a gold ball from the box with two gold balls
1/6 a gold ball from the mixed box
1/6 a silver ball from the mixed box
1/3 a silver ball from the box with two silver balls

Do you think these probabilities change if I decide I am going to pick a second time?

>> No.11706349 [DELETED] 

[eqn]
import random

def main():

LIMIT = 100000
iterations = 0

boxes = [
['gold', 'gold'],
['gold', 'silver'],
['silver', 'silver'],
]

success = 0
failure = 0

while iterations < LIMIT:
box_index = random.randrange(3)
box = boxes[box_index]

first_ball_index = random.randrange(2)
first_ball = box[first_ball_index]

if first_ball == 'gold':

second_ball_index = (first_ball_index + 1) % 2
second_ball = box[second_ball_index]

if second_ball == 'gold':
success += 1
else:
failure += 1

iterations += 1

print(f'Success rate: {success / LIMIT}')


if __name__ == "__main__":
main()

[/eqn]

The possibility is 66%, proven empirically. Now figure out the math behind it so it fits my observations, peasants :^)

>> No.11706353

>>11706342
>Do you think these probabilities change if I decide I am going to pick a second time?
yes that's literally how it is. the entire trick in op's question is that the boxes are enclosed systems that aren't related to each other. the question is very simple. you already picked a gold ball, you took it out of the box and stuffed it somewhere else. now you are either left with a box of one silver ball or a box with one golden ball

>> No.11706355

>>11706353
No. Because the probability of choosing the gold ball from a box with two golden balls is 2/3, while the probability of choosing the gold ball from a box with golden and silver balls is 1/3.

>> No.11706363

>>11706353
The random choice has already happened before you got a gold ball. Someone else posted something like this already but imagine there was one box with 1000 gold balls, one box with 1000 silver balls, and one box with 999 silver balls and 1 gold ball. If you randomly choose a box and a ball (here risking choosing a silver ball) and are lucky enough to get a gold ball, I think you'd agree it is much more likely that gold ball came from the box with 1000 gold balls not the one with 1 gold ball and 999 silver balls. If you don't accept this or my earlier posts, I don't know what to tell you

>> No.11706368

>>11706355
>>11706363
you already picked a gold ball and you took it out. it's out of the question, forget about it. now the entire question is did you pick the box with one gold one silver or did you pick the one with two golds.
the two things you are missing is that the boxes are different enclosed systems unrelated to each other and that you don't need to add in the probability of the golden ball you already picked

>> No.11706375

>>11706368
Taking prior probabilities "out of the question" when calculating posterior probabilities is a recipe for failure.

>> No.11706379
File: 37 KB, 396x382, WeHaveThisThreadEveryDay.jpg [View same] [iqdb] [saucenao] [google]
11706379

>>11704946
There are 3 boxes. The first box contains 2 gold balls. Another box contains 2 silver balls, and the last box contains one gold ball and an infinite number of silver balls.

You pick a box at random and take a ball from that box. The ball is gold.What is the probability that the next ball you take from the same box will also be gold?

How likely is it that you picked the gold ball out of the box with infinite silver balls? Very unlikely. therefore you almost certainly picked the box with 2 gold balls and the probability is not 50/50. According to your picture's logic, the probability would still be 50/50.

>> No.11706381

>>11706368
Ok let's play a game. I'll risk $15 dollars and you can risk $10. We pick a ball at random from the setup explained in OP. If it's a silver ball we have to reshuffle everything and pick again. If it's a gold ball then we check the other ball. If it's gold I win your $10. If it's silver you win my $15. Since you believe it's a 50-50 chance it's silver this is a good bet for you since you'll lose your $10 half the time but win my $15 the other half. Do you want to play?

>> No.11706393

ITT: People who don't understand probabilities arguing with people who also don't understand probabilities.

>> No.11706394

if you change box the probability is 2/3

>> No.11706398

>>11706299
Consider this:

In the original problem, there are 2/3 boxes that contain coins of the same type.
The success condition for the trial is getting two coins of the same type.
Realise that this implies that there is a 2/3 chance that the box you pick has two coins of the same type (that might be hard to wrap your head around).

You pick a box and find out that there is a gold coin inside, and now the instructor asks you the question. Note that nothing changes here, there is new information, but you CAN'T act on it, so there is NO VARIABLE CHANGE (which is the important thing here).
Now, answer the instructor anon, what is the probability that you picked a box with two coins of the same colour inside it?

>> No.11706400

>>11706393
ITT: People who aren't confident enough to say which side is not understanding probabilities correctly but they still want to feel superior so they post a smug comment even though most posts in the thread are understanding probability correctly

>> No.11706407

>>11706400
In this comment: someone who doesn't understand probability but still wants to feel superior so they post a smug comment implying they actually understand probability even though they're supporting the side that doesn't understand probability

>> No.11706411

>>11706407
Which side do you think I'm on? I'm the guy trying to teach the one holdout that the probability of picking a second gold ball is 2/3. Nearly all posts in this thread are supporting 2/3.

>> No.11706422

>>11706411
>>11706398
>>11706381
>>11706375
>>11706363
>>11706355
>>11706342
>>11706315
>>11706154
since all of you 2/3 retards are dense as fuck, how about you try it in real life?
keep in my mind that it's a requirement that you have boxes and that you have already picked a golden ball

>> No.11706424

>>11706411
I thought you were talking about me in >>11706398
sorry

>> No.11706432

>>11706422
they would still get 2/3 because they don't even know how to interpret the question, leading them to get the wrong answer

>> No.11706436

>>11706422
I already offered a gambling game for you here
>>11706381

I would be more than willing to do this in real life. It would be a pleasure to give you an expensive lesson in how probabilities work

>> No.11706467

https://en.wikipedia.org/wiki/Bertrand%27s_box_paradox

>> No.11706550

>>11706422
awww it's retarded

>> No.11706552

>>11706432
>interpret
lol

>> No.11706626

>>11706422
>>11706432
A: A golden ball was picked with the first draw.
B: The box that was drawn from is the leftmost box.

Clearly p(A) = 1/2 and p(B) = 1/3.
What we are looking for is p(B|A).
p(B|A) = p(B ^ A) / p(A) = p(A|B) * p(B) / p(A) = 1 * 1/3 / 1/2 = 2/3

>> No.11706640
File: 10 KB, 250x250, 1584823771701.jpg [View same] [iqdb] [saucenao] [google]
11706640

>>11706422
I once did try it because I didn't believe it and it is true.
You can simply do it as a thought experiment.
Each box has 1/3 chance of being picked.

Box 1 always gives GG.
Box 2 gives GS or SG by 1/2 chance.
Box 3 always gives SS.

If you pick a box 300 times you'll pick each box around 100 times, so you'll get:

100 GG
50 GS
50 SG
100 SS

Only GG and GS are relevant, because then you picked the golden ball first like stated in the experiment.

In 150 cases you picked the golden ball first.
In 100 out of these you picked the box 1 with GG which will yield another golden ball on the second draw.
100 of 150 is 2/3.
Only in 50 cases you picked box 2 with GS, which only is 1/3 of the cases.

So the chance to pick another golden ball after you already picked one is definetly 2/3.

>> No.11707502

>>11704946
it's 50%, enyone saying anything else is either retarded or part of the psyop

>> No.11707516

>>11704946
You are missing scenario 3, which is picking the other gold ball from the first box.

>> No.11707635

>>11704995
#include <iostream>
#include <random>
#include <thread>
#include <chrono>
#include <stdint.h>
#include <vector>

std::mt19937_64& get_random_gen_ref() {
[math]~~~[/math]thread_local static std::random_device rd;
[math]~~~[/math]thread_local static size_t thread_id = std::hash<std::thread::id>{}(std::this_thread::get_id());
[math]~~~[/math]thread_local static long long time = std::chrono::high_resolution_clock::now().time_since_epoch().count();
[math]~~~[/math]thread_local static std::seed_seq seeds{
[math]~~~~~~[/math]static_cast<uint_least32_t>(time >> 32), static_cast<uint_least32_t>(time),
[math]~~~~~~[/math]static_cast<uint_least32_t>(thread_id >> 32), static_cast<uint_least32_t>(thread_id),
[math]~~~~~~[/math]rd(), rd(), rd(), rd(), rd(), rd()
[math]~~~[/math]};
[math]~~~[/math]thread_local static std::mt19937_64 mt{seeds};
[math]~~~[/math]return mt;
}
[math]~~~[/math]int random_range(int a, int b){ return std::uniform_int_distribution<>{a,b}(get_random_gen_ref()); }

int main()
{
[math]~~~[/math]enum Ball {silver = 0, gold =1};
[math]~~~[/math]using Box = std::vector<Ball>;
[math]~~~[/math]Box boxes[3] {
[math]~~~~~~[/math]{silver, silver, silver, silver, silver, silver, silver, silver, silver, silver},
[math]~~~~~~[/math]{silver, silver, silver, silver, silver, silver, silver, silver, silver, gold},
[math]~~~~~~[/math]{gold, gold, gold, gold, gold, gold, gold, gold, gold, gold}
[math]~~~[/math]};

[math]~~~[/math]int possible_outcomes=0;
[math]~~~[/math]int event=0;
[math]~~~[/math]for(int i = 0; i<9000000; ++i){
[math]~~~~~~[/math]const Box & box = boxes[random_range(0,2)];
[math]~~~~~~[/math]if(box[random_range(0,box.size()-1)]==gold){
[math]~~~~~~~~~[/math]++possible_outcomes;
[math]~~~~~~~~~[/math]if(boxes[2] == box)
[math]~~~~~~~~~~~~[/math]++event;
[math]~~~~~~[/math]}
[math]~~~[/math]}
[math]~~~[/math]std::cout<<"Events: "<<event<<"\nOut of: "<<possible_outcomes <<"\nRatio: " << static_cast<double>(event)/possible_outcomes <<std::endl;
}

>> No.11707641

>>11704995
It should be 10/11 = 90/99 = 0.909090...
>>11707635
Events: 2998278
Out of: 3298325
Ratio: 0.90903

>> No.11707668

The 50/50 reasoning is only true if the first gold ball is always there, and not randomly put in

>> No.11707728

>>11706393
Do mathfags never take a statistics course in their life? This is literally basic combinatorics stuff.

>> No.11707734
File: 39 KB, 1224x1298, Untitled.png [View same] [iqdb] [saucenao] [google]
11707734

this is why

>> No.11707773
File: 1.82 MB, 392x340, GOLDENBALLS.webm [View same] [iqdb] [saucenao] [google]
11707773

>>11704946

>> No.11707955
File: 1.80 MB, 392x340, GOLDENBALLS2.webm [View same] [iqdb] [saucenao] [google]
11707955

>>11707773
i'm sorry 50% frens, apparently 2/3 fags were right all along. i even managed to put my retardation into my simulation. either that or realaty just changed.

>> No.11707990
File: 440 KB, 836x631, answer.png [View same] [iqdb] [saucenao] [google]
11707990

>>11704946

OP here.

I decided to write a python script for the question posed in the pic related.

Two Box Scenario: third box is irrelevant to the question.
Three Box Scenario: third box is relevant to the question.

Here are the results:

>Running Scenario: Two Boxes
>Gold Ball Probability 0.500106 with 1000000 second balls picked.
>Silver Ball Probability 0.499894 with 1000000 second balls picked.
>Running Scenario: Three Boxes
>Gold Ball Probability 0.6665987832903073 with 500859 second balls picked.
>Silver Ball Probability 0.33340121670969275 with 500859 second balls picked.

Here is the source code with an online python script editor and interpreter.

https://onlinegdb.com/rkcJiDusU

>> No.11707999
File: 44 KB, 800x450, brainlettttt.jpg [View same] [iqdb] [saucenao] [google]
11707999

>>11707955

Here I am writing a script with a command line output and this guy creates 3D output.

>> No.11708002

>>11707990
>Two Box Scenario: third box is irrelevant to the question.
>Three Box Scenario: third box is relevant to the question.
The third box is irrelevant, so you should have gotten the same results with both of these. So where did you fuck up?

>We have 50% probability of having picked either box A or box B - just like a coin toss.
Right here.

>> No.11708014

>>11707999
ckecked. i'm to dumb for scripting i just used logic bricks in blender

>> No.11708089
File: 615 KB, 3337x1092, light.png [View same] [iqdb] [saucenao] [google]
11708089

>>11708002
>Right here.

I've finally seen the light.

There is a 2/3 probability the FIRST gold ball came from Box A and a 1/3 probability the FIRST gold ball came Box B.

Aahaha. I coded that in and the result match.

Running Scenario: Two Boxes
Gold Ball Probability 0.666982 with 1000000 second balls picked.
Silver Ball Probability 0.333018 with 1000000 second balls picked.
Running Scenario: Three Boxes
Gold Ball Probability 0.6670775708359432 with 499711 second balls picked.
Silver Ball Probability 0.33292242916405684 with 499711 second balls picked.

>> No.11709965

>>11707990
Nice!

I did it with Matlab.. It is not optimal but it works

box1={'g','g'};
box2={'s','g'};
box3={'s','s'};
boxes={box1,box2,box3};
n=0;
max_iterations=100000000;
total=0;
gpicks=0;
while n<max_iterations
box_choice=boxes{randperm(3,1)};
a=randperm(2);
ball_choice=box_choice{a(1)};

if ball_choice=='g'
total=total+1;
other_ball=box_choice{a(2)};
if other_ball=='g'
gpicks=gpicks+1;
end
end
n=n+1;
end
ratio=gpicks/total;
fprintf('%i / %i = %f\n',gpicks,total,ratio)

>> No.11709971

What are the chances i dicked down your crush while you were thinking about imaginary balls?

>pops collar and exits room

>> No.11711173

>>11707990
>line 84
That's where you're wrong.
>#randomly pick either box A or box B from which you already pulled a gold ball.
No. You need to simulate a random first pick, and then discard everything that is silver. If you want to assume that you already have a golden ball in your hand, then the probability of the first box needs to be 2/3 because it has 2 golden balls. You're a brainlet and your code sucks too.