Why do you faggots keep coming to /sci/ and shitting up the board with your poo...

Why do you faggots keep coming to /sci/ and shitting up the board with your poo? Just look at this horrific enterprise java coder pretending to know c++ code.

2/3

Wut

Why would you code something to solve such a basic probability problem lol

No

Code terrible, should be this
#include
#include
#include
using namespace std;

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

Box boxes[3] { {silver, silver}, {silver, gold}, {gold, gold} };
auto distrib3 = bind(uniform_int_distribution(0,2), default_random_engine(random_device()()));
auto distrib2 = bind(uniform_int_distribution(0,1), default_random_engine(random_device()()));
int possible_outcomes{};
int event{};

for(int i = 0; i

the answer is 1/3 right because it all comes down to whether or not you picked the double gold box?

or is it 1/2 because it's either the silver ball or the other gold ball?

Your program is wrong.

Why would you write code to solve what isn't a programming challenge?

No wonder Sup Forums is 90% NEET. Not only did the average Sup Forumsentooman fail out of intro stats in the first week, but anything that isn't fizzbuzz comes out as spaghetti.

it's 2/3 mate
picking a box with gold means more likely you picked the 1st box. and that one has 2 gold.

how did i do?

>literally being such brainlets
Cant believe Sup Forums is so fucking stupid. The answer is obviously 2/5

It's 1/2. If you drew a gold ball then youve got an equal chance of being in the gold/gold box or the gold silver box and your next draw will either be gold or silver.

but this is the case where you're GUARANTEED to have picked up a gold ball. This question boils down to "Did i initially pick the box with 1 gold ball or the one with 2 gold balls."

>youve got an equal chance of being in the gold/gold box or the gold silver box
ya blew it

Heh, that's not even enterprise kiddo

exactly. and since there's two gold balls in the 1st box that event happens twice as often, so you have double the chance of it being gold.

troll/10

1/2.

You already have a good ball. That means you disregard the double silver.

Now you can either pick up a silver or a gold. 50/50 chance.

Only thing wrong with that is the array of Ball::colors instead of array of Ball and having the Ball hold onto the color

>non-shit boards
>on Sup Forums
/sci/ is shit like every other board, no exceptions.

Yeah but it's not curry shit. Encapsulation design patterns should be nowhere on /sci/.

>The next ball you take from the SAME box
Implies that your next draw is from the same box. If it had said "what is the probability that the next ball you draw would be gold" then you have to factor in the silver/silver box. Tard.