[ 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: 250 KB, 1105x917, ballsincpp.jpg [View same] [iqdb] [saucenao] [google]
9471032 No.9471032 [Reply] [Original]

> holy shit 66%

>> No.9471044

holeeee fuk
alert the media

>> No.9471072

>>9471032
you count the probability of picking the gold ball from the first box. but the question is different. try again.

>> No.9471078

its 75%

>> No.9471096

You either picked the box with two gold or one gold. You can ignore the two grey box at this point. There are 3 possible balls left, two gold and one grey. That is where you get 2/3. However, you had an equal chance of picking either box you possibly have. If you picked the gold gold box, you have a 100% chance of picking gold. If you picked the gold grey box, you have a 0% chance of picking gold. I got 50%. I could be wrong. I am not the best at these problems, but hold a gun to my head and I say 50%

>> No.9471102

>>9471032
>writing a fucking class for box

go poo in the >>>/g/oolag

>> No.9471140

>>9471032
Can't even write a representation...

>> No.9471144

>>9471096
>That is where you get 2/3. However, you had an equal chance of picking either box you possibly have
If you choose the second box and the silver ball, you need to put it back and try again. That is, there is a selection algorithm that favor choosing the first box.

Your reasoning is wrong. Here is right >>9470080

>> No.9471146

>>9471072
/thread

>> No.9471153 [DELETED] 

>>9471144
"You put your hand in and take a ball from that box at random. It is a gold ball. What is the probability that the next ball you take from the same box is also gold?"

No, you don't need to calculate the probability of having to put a grey ball back. The wording of the problem literally excludes that possibility. Maybe other problems are worded differently, but this one asks for the probability of getting gold from the same box after already getting gold on the first draw.

>> No.9471174

>>9471144
Oh, I get it now. This was my error:
>you had an equal chance of picking either box you possibly have
The chance you chose Gold Gold is twice the chance you chose Gold Grey.
So the actual math is 2/3(100%) + 1/3 (0%).

>> No.9471183
File: 115 KB, 850x800, 1454458646875.png [View same] [iqdb] [saucenao] [google]
9471183

>>9471032
>using a fucking class for box
This is why people who have ever coded in java should be lifetime banned from /sci/. Just fucking use a fucking typedef "using Box = array<Ball::color, 2>;"
>int otherballidx = ballidx == 0 ? 1 : 0;
Pajeet, my son, this isn't /g/. If you can't see 1-ballidx then you need to get the fuck out and stay out.
>random_device r;
You don't need it for more than on call so just use "default_random_engine e1(random_device()());"
>distrib2(e1)
You go out of your way to make the code more readable and then call with generators? Learn to std::bind
auto distrib3 = bind(uniform_int_distribution<int>(0,2), ref(e1));
auto distrib2 = bind(uniform_int_distribution<int>(0,1), ref(e1));
or just
auto distrib3 = bind(uniform_int_distribution<int>(0,2), default_random_engine(random_device()()) );
auto distrib2 = bind(uniform_int_distribution<int>(0,1), default_random_engine(random_device()()) );

>> No.9471197

>>9471072
No, that's functionally identical. One logically entails the other.

>> No.9471266

>>9471197
that's a fallacy. probability spaces of choosing 1st box and picking 2nd gold ball are different.
just because you know how the first ball was selected doesn't mean that probability space is reduced about th

>> No.9471269

>>9471032
/g/ can't answer this.

>> No.9471273

>>9471266
No. They are functionally identical. If the second ball is gold, then you have picked the first ball from the box with two gold balls. Knowing one means knowing the other.

>> No.9471287
File: 3 KB, 125x118, bertrandBox_diagram.jpg [View same] [iqdb] [saucenao] [google]
9471287

2/3

>> No.9471307
File: 33 KB, 734x434, Screenshot from 2018-01-29 19-13-44.png [View same] [iqdb] [saucenao] [google]
9471307

>> No.9471317

it's 50-50

>> No.9471318

>>9471307
whoops nevermind

>> No.9471320

>>9471032
#include <iostream>
using std::cout;
using std::endl;
#include <random>
using std::uniform_int_distribution;
using std::default_random_engine;
using std::random_device;
#include <functional>
using std::bind;

enum Ball {silver = 0, gold =1};
using Box = Ball[2];

int main()
{
Box boxes[3] { {silver, silver}, {silver, gold}, {gold, gold} };
auto distrib3 = bind(uniform_int_distribution<int>(0,2), default_random_engine(random_device()()) );
auto distrib2 = bind(uniform_int_distribution<int>(0,1), default_random_engine(random_device()()) );
int possible_outcomes{};
int event{};
for(int i = 0; i<1000000; ++i){
Box & box = boxes[distrib3()];
auto ballindex = distrib2();
if(box[ballindex]==gold){
++possible_outcomes;
if(box[1-ballindex]==gold)
++event;
}
}
cout<<"Events: "<<event<<"\nOut of: "<<possible_outcomes
<<"\nRaito: " << static_cast<double>(event)/possible_outcomes <<endl;
}

>> No.9471322
File: 49 KB, 935x936, sci shitpost meme.png [View same] [iqdb] [saucenao] [google]
9471322

>>9471287

>> No.9471325

>>9471032
But there's only two boxes, third one doesn't exist for the problem

>> No.9471334
File: 34 KB, 734x434, Screenshot from 2018-01-29 19-24-58.png [View same] [iqdb] [saucenao] [google]
9471334

fixed

>> No.9471335
File: 14 KB, 439x357, Unbenannt.png [View same] [iqdb] [saucenao] [google]
9471335

how did i do?

>> No.9471336

P[gg | one g] = P[gg] / P[one g] = 1/3 / 1/2 = 2/3

>> No.9471345

>>9471322
Yeah, no:
https://en.wikipedia.org/wiki/Bertrand%27s_box_paradox#Solution

>> No.9471357

>>9471335
>>9471334
>le troll face
nest those if statments fuckface

>> No.9471371

>>9471273
>No. They are functionally identical
No they're not and you're only asserting they are because you know you answered the wrong question.

>> No.9471377

>>9471032
Correct.

Imagine the Gold Balls are labeled A, B, C, D, E and F.

You got a gold ball with the first pick. Can't be E or F, because there's no chance of getting a gold ball there.

Your first pick must be A, B or C. It wasn't D.

If you picked A, your next is B.
If you picked B, your next is A.
If you picked C, your next is D.

2/3 of B, A and D are Golden. 66%.

And I don't even fucking know math.

>> No.9471380

>>9471357
>nest those if statments fuckface
That would answer the wrong question. If you're ever considering the probability of pulling out the initial gold then it means your answer is wrong.

>> No.9471381

>>9471371
No, I'm asserting they are because they are.

>> No.9471386

>>9471334
>>9471335

You didn't randomly pick ball [0] or [1] from your randomly selected box. You have it set to always pick [0].

>> No.9471389

>>9471357
can you even python?

>> No.9471393

>>9471380
By not nesting the if statements you also count the event that you pick a silver ball and then a gold ball. KYS

>> No.9471394

>>9471377
Sorry, I said all the balls are gold in the second line, this is incorrect.

>> No.9471395

>>9471393
>>9471380

The if statements are nested. They didn't randomly select the ball from the box though.

>> No.9471399

>>9471386
>You have it set to always pick [0].
That's because the question states you pick [0]. It's already been determined. Pretending you had a chance to pick the other ball when the question says it's already been determined is disingenuous and why so many people reach the wrong conclusion.

>> No.9471401

>>9471395
oh good catch
I guess I'd better learn python

>> No.9471408

>>9471399

From the question:

>You pick box at random
>You put your hand in and take a ball from that box at random

They don't have it set to take the ball at random. They both have it set so that when they pick the gold-silver box they always pick the gold ball.

>> No.9471420

>>9471408
>You put your hand in and take a ball from that box at random
And you always get a gold. With 100% certainty. There is no "probability" of picking a silver. According to the question it cannot occur. You pick a box and ALWAYS pick a gold, period. Therefore it is correct to assume the gold is picked because the question presumes you have. You could have a box with a billion silvers and one gold and again, the question says you pull out the gold. Probability has nothing to do with it, the fact you pull out a gold is predetermined.

>> No.9471424
File: 15 KB, 432x410, Unbenannt.png [View same] [iqdb] [saucenao] [google]
9471424

oh noes

>> No.9471441

>>9471420

True, but it effectively halves the probability of picking the gold-gold box.

>> No.9471444

>>9471420

In the gold gold box [1] is also gold.

>> No.9471460

>>9471441
The probability of picking the box is outside the scope of the question since it's already been done. The probability of events that have already occurred is 1. The probability of picking a gold from either box is the same because the question precludes the possibility of having picked silver.

To demonstrate this, according to what the question asks how probable is it that you end with a silver in your hand? It's impossible, probability of 0 because the question states outright you get a gold. Now imagine we repeat exactly as the question states. We repeat it 1000 times over and always pick a gold. Every time. Why? Because again, the question states we do. Therefore calculating the probability of getting a gold in the first place misses the mark. It has been pre-determined and is one of the basic assumptions of the question. You pick a gold. Therefore even if a box has trillions of silvers and one gold you would still pick a gold from that box. Does that defy probability? It does but luckily we are NOT ASKED to calculate what the probability of what the first ball was. Only what the second one is, and they are independent events.

Again, if you are including the probability of picking the first gold in your calculations you are wrong. This is not what the question asked and is outside the scope of the question. Having gold is a matter of fact, you only need calculate the probability of the second ball which is 0.5

>> No.9471469

>>9471345
This is the equivalent of that explanation. https://www.youtube.com/watch?v=WFoC3TR5rzI

>> No.9471470

>>9471460
/thread

>> No.9471476

>>9471460
How you came by that gold ball is still the deciding factor, because if it's from the wrong box, you won't get gold a second time. Therefore, it matters which gold ball you have. It could be one of the ones in the double gold box, or the one from the gold-silver box. Two to one.

>> No.9471480

>>9471460
>Again, if you are including the probability of picking the first gold in your calculations you are wrong. This is not what the question asked and is outside the scope of the question. Having gold is a matter of fact, you only need calculate the probability of the second ball which is 0.5
This is what I originally thought but it is wrong. >>9471096
This is the flaw in this reasoning: >>9471174
While reading the problem, at the phrase "It's a gold ball" we must calculate the probability we chose any of the boxes. The probability that we chose Grey Grey is 0%. The probability that we chose Gold Gold is twice the probability that we chose Gold Grey.

The easiest way to check the solution is the diagram here: >>9471287

The dotted box is the probability space we are working with.

>> No.9471485

the only thing that matters is that i could code a little bit

>> No.9471486

>>9471476
This assumes you had a chance of picking a silver. You didn't. You always pick a gold therefore the probability of picking any gold ball is 1 over the number of gold balls in that box.

Don't you see how silly it is to be trying to claim that you have less chance of getting a gold in the gold/silver box because you make the erroneous presumption you could've picked the silver? The question precludes that possibility. You can never pick silver, ever. If you reason that you have less chance of picking a gold from the gold/silver box you are wrong because the probability you pick a silver is ZERO. None.

>> No.9471488

>>9471486
>This assumes you had a chance of picking a silver.
No, it does not. It merely acknowledges that your gold ball is twice as likely to come from the box that has twice the gold balls.

>> No.9471490

>>9471460

Pick a ball at random. If it's gold what's the probability of the other one being gold?

>> No.9471491

>>9471486
He didn't assume you had a probability of choosing silver. He is talking about the probability that you CHOSE a specific box. Gold Gold is twice as likely as Gold Grey.

>> No.9471493

>>9471469
It's a counterintuitive problem. The answer seems absurd because it goes against the shortcuts built in our brains, but it's still no less true. Ever heard of the Monty Hall problem?

>> No.9471494

>>9471490
Pick a box at random. If that box has at least one gold ball what is the probability it has two gold balls?

>> No.9471500

>>9471494

Wrong. That's not the problem. You're throwing out all the times you picked the gold-silver box but picked a silver.

>> No.9471503

>>9471500
>You're throwing out all the times you picked the gold-silver box but picked a silver.
That's because it's literally impossible to pick a silver because the initial state of the question is you having already picked out a gold. See >>9471460

>> No.9471505
File: 9 KB, 645x773, 1506657831602.gif [View same] [iqdb] [saucenao] [google]
9471505

>have a legitimate IQ of 91
>solved Bernard's box problem correctly the first time

I guess /sci/ really is filled with LARPing brainlets.

>> No.9471506

>>9471503

Yeah, yet you didn't subtract that probability from your calculation.

>> No.9471507

>>9471505
>Implying we're not trying to drive /sci/ to greater heights by forcing them to think outside the box to solve counter intuitive problems

>> No.9471519


import random

boxes = [[1, 1], [1, 0], [0, 0]]

first = 0
second = 0

for i in range(1000):
box = boxes[random.randint(0, 2)]
ball = random.randint(0, 1)
if box[ball]:
first += 1
if box[1 - ball]: second += 1

print float(second) / float(first)

sorry it looks retarded, but outputs

0.665226781857

>> No.9471522

>>9471519
fuck me I swear I'm smart my mom said I am

>> No.9471524

Similar to the Monty Hall problem, this can be clarified if we up the numbers. Suppose you have two boxes with a million balls in them. One is all gold. One has a single gold ball, with the rest being silver. You take out one ball from one box. It happens to be gold. How likely is it that your next ball from the same box is also gold? Without doing the maths it's immediately obvious that it will only be gold if you chose the all-gold box, and also that it is a million times likelier that that is where you got your golden ball from.

>> No.9471600

>>9471522
I can post a screenshot if this is indecipherable.

>> No.9471606

>>9471505
>have a legitimate IQ of 91
I doubt it now fuck off

>> No.9471609

>>9471470
/dumb

>> No.9471615

>>9471322
3 gold balls

2/3 of the time you started from the GG box
1/3 of the time you started from the GS box

>> No.9471623

>>9471460
This is what I got from it as well.

>> No.9471628 [DELETED] 

>>9471519
test
[math]
\code{
123
abc}
[/math]

>> No.9471646
File: 7 KB, 1087x311, gggs.png [View same] [iqdb] [saucenao] [google]
9471646

>>9471322

>> No.9471667

>>9471646
>The gold gold box is not magic. There is only one gold gold box no matter which gold ball you pick in the gold gold box.

>> No.9471668

>>9471646
I was a 1/2 fag until I saw this, thanks for posting. You all suck at explaining things.

>> No.9471675

>>9471668
by your logic, a box with 1000 gold balls has a 999/1000 chance of being picked, despite there being an equal chance of picking either box.

>> No.9471678

>>9471675
I was a 2/3 fag until I saw this, thanks for posting. You all suck at explaining things.

>> No.9471682

>>9471675
Wait but because the ball you're holding is gold, doesn't that mean it's more likely that the ball it came from only has gold balls?

>> No.9471686

>>9471682
*box it came from

>> No.9471689

>>9471682
Yes. But that isn't the question. Read the prompt.

>> No.9471694

>>9471689
But you know the ball you're holding is gold, so you know it's more likely you chose the gold box, so you know you're more likely to pull a gold

>> No.9471696

>>9471675
By your logic, if you have two boxes, one with 999/1000 gold balls, and one with 999/1000 silver balls, and you draw a ball from a random box, and it turns up gold, it's equally likely that you drew from the first box as the second.

>> No.9471710

>>9471694
You're going backwards.

You pick a box with at least 1 gold ball at random, and then take a gold ball. You then are tasked with determining the probability of the next ball you take from the same box being gold.

You do not take a gold ball out of a box, and then find the probability that you are holding a certain box. That is not what was asked.

>> No.9471718

>>9471710
But if you know which box you have, you know what you're going to pull next. Determining the box is relevant to the problem.

>> No.9471721

>>9471696
Is your IQ above 85?

That is not my logic, that is not what I said. You're asking a different question.
2/3rd is the answer to "what are the odds that the first gold ball came from the GG box?".
The box is chosen at random with the guarantee that there is at least one gold ball. It doesn't matter how many gold balls above 1 that there are for how likely a box is to be chosen.

>> No.9471723

>>9471710
What color the second ball is, is entirely determined by which box you picked. If you picked A it's a gold, if you pick B it's a silver. Thus the question is really asking which box you picked since which balls you'll pick out are a consequence of that choice.

>> No.9471724

>>9471718
>Determining the box
Determining the probability of the next draw being gold for each box is. Determining the which box you actually have isn't.

>> No.9471726

>>9471723
You're forgetting, averages exist.

>> No.9471733

>>9471724
Yes—the probability of pulling gold from gg is 100%
The probability of pulling silver from gs is 100%
The probability you chose gold box is is 2/3
There is a 2/3 chance next ball is gold

>> No.9471737

>>9471032
>using namespace std;
that gets a pass for this one-off program
>default_random_engine and not mt19937
>actually storing random_device instead of mt19937{ random_device{}() }
>using int instead of unsigned for semantic correctness
>creating classes called Box and Ball that are essentially transparent instead of just using a const array and enum class
>storing a reference
>ternary operator in this day and age
>C-style casts
this code is garbage

>>9471183
>>9471320
>using anything related to std::function instead of lambdas

here you go boys: https://wandbox.org/permlink/I73NaqfKEMLB8bDJ

>> No.9471738

>>9471675
>being an equal chance of picking either box.
try again

>> No.9471742

>>9471738
You pick the box before you know which balls are inside. He is correct.

>> No.9471744
File: 73 KB, 1702x1596, sci shitpost meme 2.png [View same] [iqdb] [saucenao] [google]
9471744

>>9471733
There is only one GG box...

>> No.9471752

>>9471742
do it a 1000 times, now reject the times you picked a silver. 750 remain.

you have picked from the GG box 250+250 times

you have picked from the GS box 250 times

250/750 = 1/3

500/750 = 2/3

>> No.9471759

>>9471752
>now reject the times you picked a silver
You can't pick a silver. The question disallows it. There is 0 probability of picking a silver, you pick gold, the question states this very clearly. By going back and assuming there was a possibility of getting silver you are going to come to an erroneous conclusion. You have gold, you only ever could have picked gold.

>> No.9471763

>>9471752
Flip a coin 3 times in a row 1000 times.
Of the times that you flipped to heads in a row, what are the odds that you flipped heads a third time?

Do you care about the total probability? No.
Do you care about times where you didn't flip two heads in a row? No.

>> No.9471765

>>9471744
Take another peek. These are the possible gold balls you could have picked. 2/3 times it's from gg. You have a gold ball. There is a 2/3 chance you chose that ball from gg. If it's from gg, there's a 100% chance the next ball is gold. There is a 2/3 chance it's from gg. There is a 2/3 chance next ball is gold.

>> No.9471766

>>9471737
>>using int instead of unsigned for semantic correctness

>>>/g/tfo pajeet

Maybe use int_64_t to iterate more than 4 billion times for i and the counters but never use unsigned numbers "for semantic correctness". It will always bite you in the ass.

>> No.9471770

>>9471759
The question starts from the situation where the culling of the 'silver taken first' cases has already happened.

That's what the "It's a gold ball" means.
If you disagree, then probability just isn't for you. Stay away from Las Vegas.

>> No.9471777

>>9471766
>never use unsigned numbers
is that some nonsense that the google style guide mentions or just some aged advice? unsigneds are perfectly fine. ever wonder what type you're using when you call operator[] on array, vector, etc.? the answer is size_t which is, you guessed it, an unsigned int type.
i couldn't help but notice (because you pointed it out) that you had some counter argument prepared that doesn't even apply - something along the lines of "hurr if you need more just use a bigger int" which really reinforces the idea that you're just regurgitating.
moreover, int_64_t? that's not even guaranteed to exist you moron - you'll want to use int_least64_t or int_fast64_t.

>> No.9471780

>>9471770
Exactly so why are you taking scenrios where a silver ball could have been picked first into account? The question clearly says you pick gold. Any scenario where you pick silver is irrelevant and entirely ruled out. You cannot pick silver, period.

>> No.9471781

>>9471765
You have two coin sets. A GG coin + GS coin, and a GG coin + GG coin.
One GG coin was removed from the set.
The second coin is then placed Gold side up.
You are then tasked with finding the odds that bottom side of the coin is gold.

You don't make your own luck, that's not how this works.

>> No.9471783

>>9471737

Agree with most but there is nothing wrong with ternary operators

They are preferred, if anything

>> No.9471785
File: 119 KB, 1696x3923, sci shitpost meme 3.png [View same] [iqdb] [saucenao] [google]
9471785

I made a revision to help out the brainlets.
The red number is the probability of the next drawn ball being gold.

>> No.9471788

>>9471783
honestly, i like ternary operators too, but i feel like they're rare nowadays. and for a language that's aiming to become more readable "as is" they stand out as a trick to make things ultra concise in a time when file sizes no longer matter.

>> No.9471794

>>9471780
>why are you taking scenrios where a silver ball could have been picked first into account?

because of Probability
interpreting the phrase "it's a gold ball" requires it, it hints you are not dealing with all of the possibilities, but instead you are dealing with the subset where the gold was the first one taken.
Can't do any good calculations until you know how big that subset is.

>> No.9471796

>>9471777
>ever wonder what type you're using when you call operator[] on array, vector, etc.? the answer is size_t which is, you guessed it, an unsigned int type.

Go watch the c++ convention youtube videos (going native/cppcon). Everyone agrees using size_t over ptrdiif_t was a mistake. It's so much easier just to use signed number and checking for underflow by seeing if it's negative. Unsigned numbers are only for bags of bits.

>> No.9471799

>>9471794
The probability of events with zero probability don't matter... So why are you including them?

>> No.9471807

>>9471799
note that the SS box is ignored, that should comfort you

>> No.9471819

>>9471807
And yet you insist G'G is meaningfully distinct from GG'.
SG is meaningfully distinct from GS because SG is prohibited.

Explain without obfuscation how boxes with equal probability of being chosen, can have different odds of being chosen.

>> No.9471823

>>9471796
this one? https://www.youtube.com/watch?v=NOCElcMcFik
pay good attention to the "context" slide. google is dealing with tons of code from different generations among tons of programmers from different generations and they need some sort of guide to maintain order. in their case, avoiding unsigneds might be the best practice but that is not your case unless you work there.

if that's not the video you were talking about, you'll have to link it. there are a wealth of cppcon videos out for each year (i went to this most recent one btw, highly recommend if your employer will pay for it - lots of fun stuff planned for coroutines as well as a week's worth of free t-shirts). i can definitely believe that using size_t over ptrdiif_t is a mistake in any use case where you should use ptrdiff_t (it again comes down to semantic correctness), but that is not the original point you were trying to make.

>> No.9471828

p(b|a)
p(2nd is gold | 1st is gold) = p(1st is gold and 2nd is gold) / p(1st is gold)

p(1st and 2nd is gold), only one box out of 3 has this condition to be true, therefore p=1/3
p(1st is gold), 2 boxes have this true, so p=2/3
p(b|a) = (1/3) / (2/3) = 1/2

>> No.9471834

>>9471819
>And yet you insist G'G is meaningfully distinct from GG'.
yes indeed - this is what you have to learn to get it right.

Throw two dice - the probability of getting a 5+6 is 2/36, not 1/36. For the same reason.

>> No.9471841

>>9471834
Choosing a box at random and removing a gold ball makes their distinctness irrelevant.

>> No.9471846

>>9471828
>p(1st is gold), 2 boxes have this true, so p=2/3
Just because a box contains a gold ball doesn't guarantee the the first ball drawn from it will be gold. Half the balls are gold, so p(1st is gold) = 1/2.
Which means p(b|a) = (1/3) / (1/2) = 2/3

>> No.9471848

>>9471846
>Just because a box contains a gold ball doesn't guarantee the the first ball drawn from it will be gold
READ THE PROMPT

>> No.9471854

So you are basically going to place your hand (picking tool) on 1 of the 6 positions. 3 picks are irrelevant. Out of 3 relevant picks ... can you reach the banana guys?

>> No.9471855

>>9471848
>READ THE PROMPT
I did. What about it?

>> No.9471857

>>9471841
ok anon, have a great Las Vegas trip.
Buy the return flight ticket before gambling.

>> No.9471860

>>9471032
"It's a gold ball."

>> No.9471862

>>9471855
>>9471860
oops.

>> No.9471865

>>9471860
That doesn't mean you can ignore drawing the first ball. It matters for determining where that ball came from.

>> No.9471869

>>9471737
>>default_random_engine and not mt19937

It's an alias for it most of the time. If you actually cared about randomness you would use a seed_seq with calls to random_device, current time, process id, etc.... Or outright use a cryptographic PRNG.

>> No.9471872

>>9471819
>boxes with equal probability of being chosen
They haven't, see >>9471752
that "It's a gold ball." is where the equal probability breaks down.

>> No.9471874

>>9471865
>some sequence of events
>what is the probability of something independent of the prior sequence of events?
Your answer to that question is based on the prior sequence of events. That's wrong.

>> No.9471877
File: 6 KB, 200x195, 1516748954842.jpg [View same] [iqdb] [saucenao] [google]
9471877

>>9471183
>bind
When he doesn't realize std::bind is deprecated

>> No.9471879

>>9471183
>>9471320
You faggots and your STD's. Just use Python for these silly problems, retards.

>> No.9471881

>>9471721
>The probability that the first ball comes from the gg box is different from the probability the second ball comes from the gg box

You're drawing from the same box, you know. If there's a 2/3 chance the first ball comes from gg, then there is necessarily a 2/3 chance that the second ball drawn from the same box will be gold.

>> No.9471883

>>9471881
>If there's a 2/3 chance the first ball comes from gg, then there is necessarily a 2/3 chance that the second ball drawn from the same box will be gold.
2/3rds assumes that it is possible to draw silver first.
It isn't.

>> No.9471884

>>9471783
>Agree with most but there is nothing wrong with ternary operators

There is if you're writing x = x==1 ? 0 : 1; rather than x=1-x;

>> No.9471886

The people saying 1/2 need to take a probability course.

>> No.9471887

>>9471886
People saying 2/3rds need to read the prompt.

>> No.9471888

>>9471883
No it doesn't it comes from asking which box the first ball came from. Two of the gold balls come from the gg box, one of the balls comes from the gs box. Therefore, there's a 2/3 chance the ball your holding came from the gg box, and a 1/3 chance the ball you're holding came from the gs box.

>> No.9471889

>>9471883
No, it's literally just understanding the concept of conditional probability. You've never taken a class on prob&stats.

>> No.9471890

>>9471883
>It isn't.
that's why 25% of the tries are rejected
GG gets 25%+25% and GS gets 25%
out of the remaining 75%, GG is 2/3

>> No.9471891

>>9471865
>That doesn't mean you can ignore drawing the first ball
You can and should. The question specifically tells you to ignore drawing the first ball

>> No.9471892

>>9471888
That logic is only valid if it is possible to draw silver first. It is not possible to draw silver first.

>> No.9471893

>>9471887
>>9471646

>> No.9471896

>>9471893
Anon, you are mistaken. There are only three boxes, and only one of them is GG.

>> No.9471900

>>9471892
Imagine the silver ball doesn't exist. Box A contains 2 gold balls. Box B contains one gold ball, and nothing else.

You draw a ball at random, it is obviously gold. Which box did that ball come from? Two of the balls in existence come from box A. One of the balls in existence comes from box B. Therefore, there is a 2/3 chance the ball you drew at random comes from box B.

>> No.9471901

>>9471887
Define conditional probability.

>> No.9471903

Probability of picking GG in the GG box: 1
Probability of picking GG in the GS box: 0
Boxes are chosen at random, so chance of picking GG box and GS box are equal

(1+0)/2 = 1/2

>> No.9471905

>Pick a box at random. If that box has at least one gold ball what is the probability it has two gold balls?
This is essentially the question that is posed.

>> No.9471906

>>9471892
it's possible, but isn't part of the favourable cases.
You then move on to analyze the favourable cases, as the phrase "It's a gold ball" suggests.
But this is only 75% of the total cases.

>> No.9471907

>>9471846
fuck, you're right

>> No.9471909

>>9471877
http://www.sdowney.org/2017/06/why-stdbind-cant-be-formally-deprecated/

>> No.9471910

>>9471903
/thread

>> No.9471913

>>9471874
>what is the probability of something independent of the prior sequence of events?
It's not independent.
Whether there is another gold ball in the box clearly depends on how the first gold ball was picked.

As an analogy: Suppose you're driving through a suburb, and you park in front of a random house. The house is red. You're trying to claim that where we drove won't change who lives at that house, because we already know that the house is red. That's simply nonsense.

>>9471883
>2/3rds assumes that it is possible to draw silver first.
It is possible. You exclude the silver balls AFTER selection, not before.

>>9471903
>Boxes are chosen at random, so chance of picking GG box and GS box are equal
Stop.
The chance of picking GG and GS are equal, but the chance of (picking GG & gold first) and (picking GS & gold first) are NOT equal.

>> No.9471915

>>9471896
two ways to pick from the GG

>> No.9471916
File: 103 KB, 624x434, 1516859484841.png [View same] [iqdb] [saucenao] [google]
9471916

>>9471909
>Tries to back up his point
>Googles "is std::bind deprecated"
>Second result says it can't be formally deprecated
>Posts the link
>Doesn't realize that formal deprecation being impossible doesn't make informal deprecation impossible
>Doesn't realize that informal deprecation is to be treated as deprecation for the purposes of new code, and a lack of format deprecation only applies for backwards compatibility purposes

>> No.9471919

>>9471905
>Pr(GG|Draw gold) = Pr(GG|at least one gold)

Why? Would it help you if you drew more than once. What if you drew a ball, saw it was gold, and replaced it. Then you repeated this process 1,000 times. Each time it turns up gold. Would you still say that there was a 50-50 shot you had the GS box? All you know for sure is that the box you're drawing from contains at least one gold.

>> No.9471920

>>9471913
>The chance of picking GG and GS are equal, but the chance of (picking GG & gold first) and (picking GS & gold first) are NOT equal.
Flip a coin twice. What are the odds that the result is the same?
No one cares if it's HH or TT, only that they're the same.

No one cares which gold ball was picked first, only that the end result is GG.

>> No.9471921

>>9471903
No, I can see what you think, but it's not that simple. Think about it like this:

You chose a gold ball, but it could be any of three gold balls. Because the gold-gold box has two gold balls, there is more likelihood that a second gold ball would be chosen than a silver, twice to be exact. Therefore, choosing a second gold has 2/3 chance.

>> No.9471923

>>9471921
I was not handed a gold ball and then tasked to answer which box it came from.
I was given a box with a gold ball missing and tasked what the odds of it containing a gold ball are.

>> No.9471927

>>9471921
>You chose a gold ball, but it could be any of three gold balls
No, you choose a box from which a ball is drawn. Read the fucking question for gods sake. It's so tiresome dealing with idiots who don't understand the question posed.

YOU PICK A BOX THEN DRAW A BALL. YOU DO NOT PICK BETWEEN THE THREE GOLD BALLS, THE BALLS DRAWN ARE A CONSEQUENCE OF THE BOX YOU PICKED

>> No.9471929

If you think the answer is anything other than 2/3 you can't even do well in the Life Sciences.

>> No.9471930

>>9471927
/thread

>> No.9471932

>>9471920
>No one cares which gold ball was picked first, only that the end result is GG.
I think you're missing the point I was trying to make. One of the three boxes contains one silver ball. Picking that box, and then drawing the silver ball needs to be excluded. So after silver draws are excluded, it's twice as likely that the gold ball you're holding came from GG as from GS.

>> No.9471935

>>9471932
>it's twice as likely that the gold ball you're holding came from GG as from GS.
No it isn't. You have a 100% chance of drawing a gold from any box you pick. You're assuming there is a chance you can draw a silver. You cannot. Drawing a silver, from any box whether it be the box with two silvers or the box with one, is impossible. Thus the chances of drawing a gold are exactly the same because you can only draw gold by definition.

>> No.9471940

>>9471935
That's not what he's saying.

You have to consider that there are two possible ways to get GG (#1 then #2, or #2 then #1). There is one possible way to get GS.

>> No.9471944
File: 34 KB, 309x264, Screen Shot 2018-01-29 at 22.44.36.png [View same] [iqdb] [saucenao] [google]
9471944

>>9471927
Also, think about it from the perspective of if the reverse were true, that choosing a silver after a gold were 1/2 instead of 1/3. How can there possibly be a 1/2 chance of this?

The essence is that it is tempting to think that the silver-silver box can be simply ignored, because it contains no gold balls. However, this is not the case; it is very important to the problem. The fact is, there are three gold balls which can be selected. The gold-gold box has twice the chance of being chosen.
>but it's not a MAGIC box!!!1!
No, but because we know that the first ball chosen is gold, there are three possibilities for the second choice, a gold, a gold, and a silver. The probability for the second choice being gold IS 2/3.

I have also attached my Python program which simulates many trials of this exact experiment. The result was:

0.666634227027

If you don't bother to take a break from this and come back with a fresh perspective, then I am not sure how to help you. Try not to get emotional.

>> No.9471946

>>9471940
THERE IS ONLY ONE WAY TO DRAW THE GG BOX

>> No.9471949

>>9471946
This is like saying when you flip two coins the probability of getting heads and tails is 1/3 since there's only one way of getting heads and tails.

>> No.9471951

>>9471946
two ways, my dear Watson

>> No.9471952

>>9471946
draw a plus sign on one of them (it's still a gold ball)
still think there's only one way to draw?

>> No.9471954

>>9471946
The gold balls are all different objects. So, that's not true.

>> No.9471955

>>9471935
>No it isn't. You have a 100% chance of drawing a gold from any box you pick. You're assuming there is a chance you can draw a silver.
Let me try and explain this with an analogy. It's simpler and less abstract, and highlights the same ideas.

There are two restaurants on a street. Salad Palace and House of Meats. Salad Palace serves almost only vegetarian dishes, with a single meat option. House of Meats is the opposite, with only a single vegetarian meal on their menu.
You walk into a random restaurant.
You order a random item off the menu.
The waiter brings you steak and chips.
Which restaurant are you in?

>> No.9471956

>>9471946
I think this sums up precisely where the 1/2 fags are going wrong. They think that the FIRST ball must be chosen. However, there are indeed TWO ways of drawing the first box.

>> No.9471957

>>9471930
/dumb

>> No.9471958

>>9471946
You're right, a priori there is a 50-50 chance we have either box.

But then we draw a ball from the box and acquire information about it. Incorporating this new information then allows us to update our prior beliefs about the probability of each event.

>> No.9471959

>>9471955
I think it would be more clear if you used the same numerical values, like salad place serves one veg dish and one meat-containing dish, meat place serves two meats.

>> No.9471960

>>9471958
You assume that we don't know the color of ball we have.
Silver first is impossible.

>> No.9471963

>>9471903
/thread

>> No.9471964

>>9471960
>>9471906

>> No.9471965

>>9471964
read the prompt

>> No.9471967

>>9471960
>You replace the ball you drew, and draw another ball at random from the same box. It is also gold.

Given this new information about the second draw, is there still only a 50% chance you're in the GG box? Repeat until you're convinced.

>> No.9471968

>>9471963
>>9471957

>> No.9471969 [DELETED] 
File: 2 KB, 421x110, Dumbass.png [View same] [iqdb] [saucenao] [google]
9471969

Congrats /sci/, my first post in over a year

Suppose we have [math] M [/math] boxes and [math] N [/math] boxes contain golden balls. Label these [math] N_k [/math] and define [math] G(N_k) [/math] and [math] T(N_k) [/math] as the golden and total balls in [math] N_k [/math] respectively.

Note that
[eqn] \text{Probability of drawing a ball from} \ N_k = P(N_k) = \frac{1}{N}\frac{G(N_k)}{T(N_k)}[/eqn]

Now suppose we drew a golden ball. The probability it came from [math] N_k [/math] is the PERCENTAGE of the probability [math] N_k [/math] accounts for in the total possibility of drawing a golden ball. In other words
[eqn] \text{Probability ball came from} \ N_k = Q(N_k) = \frac{P(N_k)}{P(N_1)+P(N_2)+P(N_3)\cdots}[/eqn]

Finally the probability of drawing another golden ball would be

[eqn] \sum_k Q(N_k)\frac{G(N_k)-1}{T(N_k)-1} [/eqn]
as this is the summation of the probability we picked boxed [math] N_k [/math] multiplied by the probability of drawing another golden ball.

Congratulations, you just learned the basics of Bayesian probability.

>> No.9471973 [DELETED] 
File: 2 KB, 421x110, 1700.png [View same] [iqdb] [saucenao] [google]
9471973

Congrats /sci/, my first post in over a year

Suppose we have [math] M [/math] boxes and [math] N [/math] boxes contain golden balls. Label these [math] N_k [/math] and define [math] G(N_k) [/math] and [math] T(N_k) [/math] as the golden and total balls in [math] N_k [/math] respectively.

Note that
[eqn] \text{Probability of drawing a ball from} \ N_k = P(N_k) = \frac{1}{N}\frac{G(N_k)}{T(N_k)}[/eqn]

Now suppose we drew a golden ball. The probability it came from [math] N_k [/math] is the PERCENTAGE of the probability [math] N_k [/math] accounts for in the total possibility of drawing a golden ball. In other words
[eqn] \text{Probability ball came from} \ N_k = Q(N_k) = \frac{P(N_k)}{P(N_1)+P(N_2)+P(N_3)\cdots}[/eqn]

Finally the probability of drawing another golden ball would be

[eqn] \sum_k Q(N_k)\frac{G(N_k)-1}{T(N_k)-1} [/eqn]
as this is the summation of the probability we picked boxed [math] N_k [/math] multiplied by the probability of drawing another golden ball.

Congratulations, you just learned the basics of Bayesian probability.

>> No.9471975

>>9471965
prompt say to only analyze the cases where the gold was picked first. This is 75% of all cases.
25%+25% of the total time you got a gold from GG
25% of the time you got a gold from GS
(25%+25%)/75% = 2/3

>> No.9471978

>>9471975
"a gold ball is taken from a box" =/= "a gold ball is taken from the box you chose"

>> No.9471979

>>9471969
>>9471973
maybe you'll get your first post right the third time

>> No.9471980

>>9471978
That doesn't contradict anything.

>> No.9471981
File: 2 KB, 421x110, 1700.png [View same] [iqdb] [saucenao] [google]
9471981

Congrats /sci/, my first post in over a year

Suppose we have [math] M [/math] boxes and [math] N [/math] boxes contain golden balls. Label these [math] N_k [/math] and define [math] G(N_k) [/math] and [math] T(N_k) [/math] as the golden and total balls in [math] N_k [/math] respectively.

Note that
[eqn] \text{Probability of drawing a ball from} \ N_k = P(N_k) = \frac{1}{N}\frac{G(N_k)}{T(N_k)}[/eqn]

Now suppose we drew a golden ball. The probability it came from [math] N_k [/math] is the PERCENTAGE of the probability [math] N_k [/math] accounts for in the total possibility of drawing a golden ball. In other words
[eqn] \text{Probability ball came from} \ N_k = Q(N_k) = \frac{P(N_k)}{P(N_1)+P(N_2)+P(N_3)\cdots}[/eqn]

Finally the probability of drawing another golden ball would be

[eqn] \sum_k Q(N_k)\frac{G(N_k)-1}{T(N_k)-1} [/eqn]
as this is the summation of the probability we picked boxed [math] N_k [/math] multiplied by the probability of drawing another golden ball.

Congratulations, you just learned the basics of Bayesian probability.

>> No.9471982

>>9471980
One takes notice of the prompt, the other does not.

>> No.9471984

>>9471959
I tried to avoid that, because I wanted to appeal to intuition.

>> No.9471991
File: 137 KB, 466x492, 1505665674228.png [View same] [iqdb] [saucenao] [google]
9471991

>>9471879
This

>> No.9471993

>>9471982
prompt: pick ran box, pick rand ball

ok, say we do this 1500 times

500 times you pick from SS
500 times you pick from GS
500 times you pick from GG

SS: 0 favourable
GS 250 favourable
GG 500 favourable
--------------------------
total: 750 favourable (gold picked first)

500 of those 750 times you have locked into the GG box. 500/750 = 2/3

>> No.9471994

>>9471993
You're a double counting faggot who is illiterate.

>> No.9472000

>>9471981
In the case of OP >>9471032

[math] P(N_1) = 1 [/math] and [math] P(N_2) = \frac{1}{2} [/math]
Hence [math] Q(N_1) = \frac{1}{1+1/2} = \frac{2}{3} [/math] and [math] Q(N_2) = \frac{1/2}{1+1/2} = \frac{1}{3} [/math].

To find the probability of drawing another ball (neglecting the 0/0 term which should be redefined to just be 0) we would see

[math] Q(N_1)\frac{Q(N_1)-1}{T(N_1)-1} =\frac{2}{3}\frac{1}{1} = \frac{2}{3} [/math]
or .6666666666666666666666666666666666666666666666666

>> No.9472001

>>9471994
>double counting
huh?

>> No.9472002

>>9471994
>>9471993
And you are people more interested in arguing than actually understanding

>> No.9472003

>>9472002
enlight us oh shitpostguru then

>> No.9472004

>>9472001
He is considering an equal chosing of all boxes, and then taking into account times where GS comes up silver first.
The prompt explicitly says that the GS box always comes up G first.

Anon is an obfuscating faggot.

>> No.9472005

>>9471325
Dumbest response to this problem. It's 2/3 regardless of whether you have a third box.

>> No.9472006

>>9472003
See >>9471981 and >>9472000

>> No.9472009

>>9472004
>The prompt explicitly says that the GS box always comes up G first.
No, it says that after you picked, you are holding a gold ball. The two things aren't the same.

>> No.9472013

>>9472004
>taking into account
nope. if "silver firsts from SG" were taken into account the favourable number would be 1000.
750 means the silverFirstFromSG are rejected, ie. not double counted.

>> No.9472015

>>9472009
You can't pick gold first, and have silver come first.
The GS box always has Gold come out first.

>> No.9472018

>>9472015
>You can't pick gold first, and have silver come first.
What?

>> No.9472019

>>9472015
yes but that happens only half the time
only that favourable half is included in the calculations

>> No.9472020

>>9472019
You don't know which box you picked, and all you know is that the box contained a gold ball.
The answer is half.

>> No.9472023

>>9471785
Not only that, but the last 7 red numbers are also the probability that you've taken a stats class.

>> No.9472024

>>9471420
>And you always get a gold.
No, something happening does not mean it anyways happens. That's the entire point of a random variable.

>> No.9472026

>>9472023
What do you know, wrong about 2/3rds and wrong about that.

>> No.9472029

>>9472024
Prompt says it does, therefore it does. That's how a prompt works.

>> No.9472030

Let Xi be the ball picked on turn i. X belongs to {G, S}, i belongs to {1, 2}.
Looking for Pr(X2 = G | X1 = G) = Pr(X2 = G and X1 = G) / Pr(X1 = G)
Only way both balls are gold is if box 1 is picked (Pr(box 1) = 1/3).
By the law of total probability:
Pr(X1 = G) = Pr(X1= G | box 1)Pr(box 1)+ Pr(X1 = G | box 2)Pr(box 2) + Pr(X1 = G | box 3)Pr(box 3) = 1*(1/3) + (1/2)*(1/3) + 0 * 0 = 1/2
So Pr(X2 = G | X1 = G) = (1/3)/(1/2) = 2/3

>> No.9472034

>>9472029
>not one single occurrence of 'always' in prompt
kek

>> No.9472036

>>9472034
There is also a single event in the prompt, so for that event, SG always pulls a gold first.

When will brainlets learn?

>> No.9472042

>>9472036
Are you intentionally being this dense?

>> No.9472043

>>9472020
don't have to know
yet it still happens only half the time

>> No.9472044
File: 91 KB, 645x729, 1516990951448.png [View same] [iqdb] [saucenao] [google]
9472044

>IT"S NOT A MAGIC BOX!!!!1!!

>> No.9472047

>>9472030
0 * 0 should read 0 * (1/3), but it doesn't change anything.

>> No.9472049

>>9471460
>The probability of picking the box is outside the scope of the question since it's already been done. The probability of events that have already occurred is 1.
Completely, utterly false. The only events that have occurred that have probability 1 are events you *know* have occurred. You do not know whether you chose from the box with all gold or the mixed box, even though one of them had to occur. So what are the probabilities? Because choosing the all gold box Krebs you must find a gold ball, the probability that you chose from the all gold box knowing you found a gold ball is simply the ratio of the probabilities of choosing the gold box and finding a gold ball = (1/3)/(1/2) = 2/3.

>> No.9472051
File: 88 KB, 538x604, 1517021250732.jpg [View same] [iqdb] [saucenao] [google]
9472051

>THER"S ONLY ONE WAY TO CHOOSE GOLD
>THE OTHER GOLD CANT BE CHOSESN
>1/2

>> No.9472054

>>9472006
so?

>> No.9472060

>>9471460
>To demonstrate this, according to what the question asks how probable is it that you end with a silver in your hand? It's impossible, probability of 0 because the question states outright you get a gold.
The probability of finding a silver ball first knowing you found a gold ball first is 0.

>We repeat it 1000 times over and always pick a gold.
You are very confused. The only repeatable part is the setup, not the result. If you try to repeat you will eventually find a silver first. That has probability 0.5. Again, you are confusing a particular result with a necessity. It cannot be a necessity that a random choice results in only one outcome. So the only way to interpret the question is to ask what percentage of the times the setup is repeated and the result described is achieved do we find a second gold. And the answer is of course 2/3 of the time.

>> No.9472062

>>9472060
>It cannot be a necessity that a random choice results in only one outcome.
drawing the box, everything else is deterministic.

>> No.9472064

The prompt literally says:
>there are two possible options GS and GG
>You don't know which is in which box
>pick a box
>what are the odds you picked the GG box?
It's half.

>> No.9472067

>>9472064
The odds you picked the GG box are 2/3, my nigga

>> No.9472069

>>9472064
>The prompt literally says:
No it doesn't.

>> No.9472071

>>9472069
The prompt effectively says:
>>there are two possible options GS and GG
>>You don't know which is in which box
>>pick a box
>>what are the odds you picked the GG box?
It's half

>> No.9472072

>>9472071
>The prompt effectively says:
No it doesn't.

>> No.9472073

>>9472054
Good, now you understand the problem and why it's 2/3rds and also how to solve similar problems or the general case

>> No.9472074

>>9472072
The prompt effectively says:
>Provided you chose either GG or GS
>what are the odds of having chosen GG?

>> No.9472075

>>9472064
Yea, so now have two boxes: one box with 1 gold ball and one box with 999 silver balls and 1 gold ball.

Clearly, if I pick a gold ball there is an equal chance I chose the left box verse the right box.

>> No.9472078

>>9472029
You flip a coin and it lands on heads

>oi you filthy wanka you tryun use some trick coin on me wat always lands heads?

>> No.9472079

>>9472075
You most likely chose the one box with 999 balls, but that doesn't change the probability of the next ball being gold being half.

>> No.9472083

>>9472079
>Both boxes have 1 gold ball in them
>chance of drawing another gold ball is half
>Most likely picked the box with a 1/1000 chance of drawing a gold ball
Anon... I think you're retarded

>> No.9472084

>>9472062
Drawing the box and the coin in the box, which destroys your argument.

>> No.9472089

>>9472074
>Provided you chose either GG or GS
Yes, but after you discover you're holding gold it's more likely you drew from GG.

>> No.9472090

>>9472036
>There is also a single event in the prompt, so for that event, SG always pulls a gold first.
>single event
>always
The probability of that event happening is not 1, only the probability of it happening knowing it happened is 1. Only the former is relevant to the conditional probability.

>> No.9472091

>>9472084
You have two beaches
One beach has a single grain of sand on it and it is black

The other beach has one black grain of sand on it, but it's a white regular beach everywhere else

With a blindfold on, you bend down and pick up a grain of sand. You walk back to your car, remove your blindfold, and notice the grain of sand was black. Which beach were you at?

>> No.9472092
File: 130 KB, 760x760, whatsreallyhappening.jpg [View same] [iqdb] [saucenao] [google]
9472092

>> No.9472093

>>9472083
>>9472089
>Yes, but after you discover you're holding gold it's more likely you drew from GG.
Yes. But the fact that we can not draw silver means we default to the 50/50 of the box choice.
If we could choose silver first, then the odds would be 2/3.

>> No.9472094

>>9472089
To be most precise, the probability you are holding a gold ball from any given box is the percentage of probability that box takes up compared to the rest of the boxes in regards to how likely you are to draw a golden ball.

>> No.9472096

>>9472093
My friend, you are wrong. If you wish to continue on the path of the attainment of knowledge, I suggest you quickly solve your wrong thought process
A very, very famous mathematician named Baye solved this problem hundreds of years ago

>> No.9472098

>>9472091
Assuming which beach you started at is random, avid which grain of dabs you pick up from that beach is random, you were most likely at the first.

I have a known winning lottery ticket in one hand and a random lottery ticket in the other. You choose blindfolded ave find a winning ticket. What is the chance that it's the random ticket?

>> No.9472099

>>9472096
No, he solved it with the possibility of a silver coming first.
The prompt says gold comes first, not IF gold comes first.

>> No.9472100

>>9472099
That doesn't change anything, since it only happened randomly.

>> No.9472101
File: 25 KB, 602x170, main-qimg-003a7aaa0935215238a082f0412fb564.png [View same] [iqdb] [saucenao] [google]
9472101

>>9472099
You idiot, you have to consider the IF case in order to solve the problem

Back to HIGH SCHOOL PROBABILITY WITH KHAN ACADEMY WE GOOOOOOOO
https://www.khanacademy.org/partner-content/wi-phi/wiphi-critical-thinking/wiphi-fundamentals/v/bayes-theorem

>> No.9472102

>>9472100
>it only happened randomly.
not according to the prompt.

>> No.9472103

>>9472102
The prompt says you chose a box and a coin randomly. Time to go back to elementary school and learn how to read.

>> No.9472104

>>9472103
anon, I thought it refereed to the pulling of the first ball. You can't blame me for your choice of ambiguity.

>> No.9472126

>>9472104
"You pick box at random. ...take a ball from that box at random."

That has 'random' TWICE
lrn2read

>> No.9472131

>>9472126
How can the ball choice be random if it tells us the result without an if statement?

>> No.9472137

>>9472073
n1,n2 vague what the hell they even are
thus neatly eliminating any analysis if the formulas given make any sense

into the trash it goes

>> No.9472138

>>9472131
scream at the prompt, not me

it's not THE result, it's A result

>> No.9472139

>>9472131
>How can the ball choice be random if it tells us the result without an if statement?
https://en.wikipedia.org/wiki/Prior_probability

>> No.9472140

>>9472137
[math] N_k [/math] was defined as the label to the boxes
What did you think the k represented?

>> No.9472142

>>9472140
If you decide to be the stickler, so can anyone else.
It's staying in the trash.

>> No.9472144

>>9472142
Your choice my man
Feel free to go get a general method from another post in the thread

>> No.9472157
File: 114 KB, 988x958, ball.jpg [View same] [iqdb] [saucenao] [google]
9472157

explain this. for two different persons there is two different probabilities. how is that possible?

>> No.9472162
File: 36 KB, 996x480, file.png [View same] [iqdb] [saucenao] [google]
9472162

>>9471032
I thought it was 50-50 until I coded it up.


50%s BTFO

>> No.9472164

>>9472162
>you count the probability of picking the gold ball from the first box. but the question is different. try again.

>> No.9472165

>>9472164
No I really don't, check the code fucktard

>> No.9472168

>>9472165
>if ball is gold and box has two gold ball (1st box):
>goldPicked += 1

>> No.9472172

>>9472157
>"You pick box at random. ...take a ball from that box at random."

Alice has dealt with the cases when silver came first.
Silver comes first 100/3+(100/3)/2 percent of the time. That is, half of the time.
Only then does Bob get to start with the "First ball is gold" situation.
2/3 of the time the gold-first happened by picking either of the GG-box balls, and 1/3 of the time the gold-first happened by picking the single gold ball from the GS-box.

>> No.9472174
File: 54 KB, 995x659, file.png [View same] [iqdb] [saucenao] [google]
9472174

>>9472168
???


I commented code for you


If ball is gold and the box has two gold balls then you will draw another gold what is wrong with that?

>> No.9472177

>>9472172
>2/3 of the time the gold-first happened by picking either of the GG-box balls, and 1/3 of the time the gold-first happened by picking the single gold ball from the GS-box.
and yet silver can't come first, so the answer is half.

>> No.9472190
File: 703 KB, 1578x1202, 6fddb6d9ef3f7cc85b31b2dbb82287f492dbe46c8307567eb894ae4df4eddb72.png [View same] [iqdb] [saucenao] [google]
9472190

>>9472000

>> No.9472191

>>9472177
50% of the time the first ball picked is silver
50% of the time the first ball picked is gold

of the latter gold-was-first 50% case, 2/3 times it was from the GG box, giving a 2/3 favourable end result of a second gold.

>> No.9472193

>>9472191
>of the latter gold-was-first 50% case, 2/3 times it was from the GG box, giving a 2/3 favourable end result of a second gold.
and yet silver can't come first, so the answer is half.
If the prompt permitted the possibility of silver first, you would be correct.

>> No.9472194

>>9472193
see >>9471993

>> No.9472195 [DELETED] 

I'm going to settle this with two questions: what is the probability of drawing a golden ball from each of the boxes?
After you have that information, what is the probability you drew a ball from a certain box given you drew a golden ball?

>> No.9472200 [DELETED] 

>>9472195
1st question
gg 100%
gs 50%
ss 0%

2nd question
gg 2/3
gs 1/3
ss 0

>> No.9472205

>>9472194
His GS is half as much as GG because he lets silver happen. The prompt precludes silver first, it is not a possibility.

>> No.9472207

>>9472205
>lets silver happen
nope, those cases aren't in the 750 harvest

>> No.9472213

>>9472207
In which case, he double sampled the GG by picking the GG box twice as much as the GS box, thereby confirming the 1/2 nature of the probability.

>> No.9472215

>>9472213
huh?
it clearly states each box is sampled 500 times

>> No.9472216

>>9472213
You need to start arguing to prove yourself wrong
Any fool can argue to prove themselves right

>> No.9472218
File: 27 KB, 600x695, 23316492_10214224393584856_6084823036404880298_n.jpg [View same] [iqdb] [saucenao] [google]
9472218

>>9472162
>>9472174
Someone please refute this

>> No.9472223

>>9472215
But those 500 include 250 where silver is first.
The prompt does not allow this.

>> No.9472226

>>9472223
that's why the harvest is 750 and not 1000

>> No.9472228

>>9472218
he misread the prompt

>> No.9472230

>>9472157
when bob collects enough samples he will notice that function S distribution is not random.
how can we deal with this kind of situations in probability theory?

>> No.9472231

>>9472230
by recognizing that the only meaningful element of chance is the box chosen.

>> No.9472243

>>9472228
How?

>> No.9472245

>>9472231
the we must conclude that the question itself is meaningless
/thread

>> No.9472248

>>9472245
Not only the question is a chimera, but the problem also has the fallacy "you randomly pick the gold ball" which is nonsense.
This is a double bullshit problem. Anyone who thinks this problem has a solution is a fucking brainlet.

>> No.9472249
File: 117 KB, 1915x919, file.png [View same] [iqdb] [saucenao] [google]
9472249

>>9471032
>>9471078
>>9471096
>>9471144
>>9471174
>>9471183
>>9471287
>>9471317
>>9471320
>>9471322
>>9471334
>>9471335
>>9471357
>>9471380
>>9471408
>>9471424
>>9471444
>>9471460
>>9471519
>>9471615
>>9471646
>>9471668
>>9471696
>>9471723
>>9471733
>>9471744
>>9471913
>>9471916
>>9471946
>>9471981
>>9472000
>>9472157


It is 1/3 you fucking brainlets

>> No.9472252
File: 2.71 MB, 2048x1714, 1506713176336.png [View same] [iqdb] [saucenao] [google]
9472252

>>9472249
*1/2

>> No.9472254

>>9472248
>"you randomly pick the gold ball
1) means that getting the gold ball wasn't a sure thing
2) means that you got a gold ball first

it means that either one of the GG-box's gold balls could have come first, so its probability (X) is twice that of the GS-box's gold ball

X + X/2 = 1
3/2*x = 1
X = 2/3

>> No.9472259
File: 33 KB, 511x341, silver.jpg [View same] [iqdb] [saucenao] [google]
9472259

>>9472249
you have won reddit silver

>> No.9472269

Why is it not the same as the probability of taking box 1 or box 2?

>> No.9472270

>>9471032
It's 50%, not 2/3, because the problem clearly states that you reach into the same box for the 2nd ball, thus you do not have 2 gold balls and 1 grey to choose from, you have one grey or one gold ball left.

>> No.9472286

>>9472270
2/3 of the time you have chosen the GG box
1/3 of the time you have chosen the GS box

>> No.9472287

>>9472269
>Why is it not the same as the probability of taking box 1 or box 2?
it is. probability of taking box 1 is 2/3 >>9471144

>> No.9472289

>>9472287
Oh. I get it. Just reverse engineer it. If you got gold, then it's most likely you got from box 1.

>> No.9472291

>>9472254
either the action is random and you don't know the outcome or you know the outcome and the action is not random.

you can't randomly win the lottery

>> No.9472293

>>9471032
>proof by for loop
lmao

>> No.9472307

>>9472291
>you can't randomly win the lottery

so I played Power ball all these years for nothing?

>> No.9472314

>>9472291

>>9472138

>> No.9472315

>>9472293
https://en.wikipedia.org/wiki/Monte_Carlo_method

>> No.9472336

>>9472248
>there is a 2/3 probability to choose the 1st box that meet my conditions
>you choose the box at random and if that box doesn't meet my condition you discard that box and choose again.
>what is the probability that box you chooses is the 1st box?
that's how 2/3 brainlets read the problem.

>> No.9472340

>>9472336
>2/3 brainlets
aka correct answerers

>> No.9472352
File: 14 KB, 472x390, 111.png [View same] [iqdb] [saucenao] [google]
9472352

>>9471879
output is
0.664932778489

>> No.9472357

>>9471506
Why would you subtract it? does that box magically disappear?

>> No.9472372

Can someone explain to me why it is not 3/4?

If you pick out a gold ball, then it has to be in either first box or the second box.

3/4 are gold in those boxes.

>> No.9472373

>>9472291
>you can't randomly win the lottery
How... how do you do it?

>> No.9472374

>>9472372
But the question is what happens next. For two out of those three gold balls, you will pick another gold ball next. For one of them, you won't.

>> No.9472375

>>9471420
cannot occur =/= didn't occur

>> No.9472377

So, I kinda get having 50% if you think the fact that you got gold first means it's one of two boxes.

But what baffles me is the guy who admits that the odds of having taken the gold ball from the GG box is 2/3 but still insists that the answer to the problem is something else.

>> No.9472393

>>9472377
Probability = number of states we interested in / number of all available states.
If you already picked the gold ball, there is one state that we need = the box also contains the gold ball. and two possible states: either the box contains the gold or the silver ball. 1/2 = 50%.

>> No.9472396

>>9472393
>If you already picked the gold ball,
it is either G1 or G2 from the GG box,
or G3 from the GS box
after G1 you pick G2. good
after G2 you pick G1. good
after G3 you pick S. bad
P(good) = 2/3

>> No.9472400

>>9472393
Just because there are two possibilities that doesn't mean those possibilities are equally probable. This is probability 101 man. Monty Hall all over.

>> No.9472403

another version of the Monty Hall problem
https://en.wikipedia.org/wiki/Monty_Hall_problem

>> No.9472411

>>9472396
1/2 is the correct answer to the incorrect question
2/3 is the incorrect answer to the incorrect question

>>9472403
Monty Hall is the correct problem, but OP's problem isn't

>> No.9472417

>>9472411
So long as you're happy.

>> No.9472428

>>9472411
>and not a word of math was spoken

>> No.9472429

A question for all the half retards:
Suppose the boxes contain a billion coins each: one a billion gold coins, one full of silver and one with just one gold coin, and silver the remainder. You pick a box at random, then draw a coin at random. After seeing drawing the gold coin you want to calculate the odds that you'll draw another gold coin from that box.
Are the odds still 1/2? It should be, by your stillborn logic.

>> No.9472434

>>9472411
Do you even conditional probability.

>> No.9472441

>>9472434
>hey, pick a ball from a box with one ball
>conditional probability
>probability

>> No.9472450

you brainlets disgust me.

probability that you draw a gold ball first for:

box 1(two golds): 100%
box 2(one gold, one silver): 50%
box 3(two silver): 0%

E.g you having picked Box 1 is twice as likeable as having picked Box 2, e.g. the second ball being gold, too is 2/3.

>> No.9472457

>>9471197
what part about
>It is the gold ball.
do you not understand?

>> No.9472466

>>9472457
>It is the gold ball.
Uh oh, looks like someone misread the prompt ;^)

>> No.9472467
File: 35 KB, 254x299, Screen Shot 2018-01-30 at 13.20.37.png [View same] [iqdb] [saucenao] [google]
9472467

It's 0.5 you fucking brainlets.

>> No.9472469

>>9472467
>box1=("g","g,")
Took me a moment.

>> No.9472472

>>9471032
why don't you write this shit in assembly you fucking autist?

>> No.9472475

People who treat the problem as if it says "pick randomly between two boxes, also you have a gold ball in your hand" are making the same mistake that leads people to treat the Monty Hall problem as if it says "pick randomly between two doors, also there's a goat standing on the side". What you did before matters.

Crucially, the first ball wasn't guaranteed to be a gold one. It just happens to be one. But it was chosen randomly That tells you something about which box it is most likely to be from.

>> No.9472478

>>9471032
It's 2/3, but the wording makes it more confusing than it needs to be. In the second half instead of those three sentences, it could just be "You pick a gold ball at random from one of the boxes"

>> No.9472479

>You roll a six-sided die. It ends up six. What were the odds of that?
>Uh durr it's 100% because it already says it's a six

>> No.9472481
File: 57 KB, 600x600, 1517176889632.jpg [View same] [iqdb] [saucenao] [google]
9472481

>>9471524
>All countries except Ethiopia and China are eliminated
>You pick a random person from a random country
>It's a black man
>What is the probability the country you picked was Ethiopia
>durr 50/50

>> No.9472482

>>9472478
That would only cause more confusion because now it sounds as if you're only picking from among the gold balls.

>> No.9472483

>>9472481
Did you mean to quote me?

>> No.9472493

>>9472483
yes but it's just another example related to yours to show why it's not 50%

>> No.9472543

>>9472131
See >>9472078

>> No.9472545
File: 133 KB, 718x349, 1316923891001.jpg [View same] [iqdb] [saucenao] [google]
9472545

>2 threads
>still no conclusion
http://www.strawpoll.me/14963078

>> No.9472566

>>9471032
everyone who says 0.5 is memeing right?

>> No.9472580

It amazes me that there is a thread this long about something which should be obvious to anyone. Maybe its because people arent fucking READING the question.

You pick a box at random and pick a gold ball - check. This means that you have picked from either one of the two first boxes - check. You are now asked to pick another ball from the SAME box that you just picked from. From the first two boxes, what balls remain? Since they total 3 gold and 1 silver and you have already picked one gold, you are left with 2 gold and 1 silver and therefore the probability is OBVIOUSLY 2/3 of picking a gold one (since you pick from the same box).


JESUS fucking christ!!!!!!!!!

>> No.9472587

>>9472157
Different information can yield different measures of certainty. Learn probability theory.

But in this case Bob and Alice see the same probability since there are three possible outcomes, not two. Bob uses a flat prior and gets the same answer as Alice since Alice's random choice is the sane as a flat prior.

>> No.9472596

>>9472566
>everyone who says 0.5 is memeing right?
I hope so. They've had conditional probability explained at them enough times that they're either baiting or legitimately retarded.

>> No.9472617
File: 81 KB, 624x628, ALL_OF_SCI.png [View same] [iqdb] [saucenao] [google]
9472617

>> No.9472642

>>9472596
>conditional probability
>the probability of an event ( A ), given that another ( B ) has already occurred.
two events is when you roll a dice two times. but in this problem there is only one event

>> No.9472712

>>9472642
No. That's precisely it. Two dice rolls are independent events. But here, drawing the first golden ball determines the likelihood of drawing a second one.

>> No.9472715

>>9472712
>drawing the first golden ball determines the likelihood of drawing a second one.
it determines everything because it's the only one event

>> No.9472723

>>9472715
Right, yeah, technically, I suppose. I thought you were saying that the second drawing is the only one that counts, rather than the first one.

>> No.9472741

>>9472642
>but in this problem there is only one event
>You pick a box at random
>You take a ball from that box at random

>> No.9472764

the answer is 0.5
stop being retards

>> No.9472844

What are the odds I roll a 7 using 2d6?

>> No.9472847

>>9472245
"what are the odds that a coil with H and T sides lands H side up?"
Is not a meaningless question just because it is incredibly simple.

>> No.9472849

>>9472844
That depends, how many d6 are in each box?

>> No.9472850

>>9472849
I have over 20 in my box, but I only need 2 of them right now.

>> No.9472913

>>9472741
>you pick a gold ball
but that's the only one event, anon

>> No.9472973

>>9472913
That's an outcome, not an event.

>> No.9473129

>>9472973
event is picking the gold ball, outcome is one of the two boxes.

>> No.9473186

Stick a label on your balls like this: | G1 G2 | G3 S1 | S3 S4 |

Outcomes:
1. Took G1, next pick must be G2... success!
2. Took G2, next pick must be G1...success!
3. Took G3, next pick must be S1...fail!

>> No.9473518
File: 65 KB, 538x494, box_for_dummies_2.png [View same] [iqdb] [saucenao] [google]
9473518

The core of the dispute (pic)

>> No.9473840

>>9471183
>This is why people who have ever coded in java should be lifetime banned from /sci/
That is not Java.

>> No.9474523

>>9472467
>if box==box1:

are you retarded?

>> No.9474541

>>9474523
>box1=("g","g,")

YOU are retarded