Statistics: Simple pick from bag problem I am doing a personal project with neural networks and want to see how accurate the predictions are compared to just plain old guessing.
I'm sure this is a typical probability textbook problem, but I had trouble finding an example.
The results of my neural network are analogous to a simple problem:
There is a bag containing 340 marbles. 10% are black, 90% are white. You have 50 attempts to pick out 10 black marbles. The marbles do not go back into the bag. What is the probability of succeeding?
I reasoned that the probability should be the greatest if I were to pick out 40 white marbles first, and then the 10 black marbles.
Initially
340 * 0.9 = 306 white marbles
340 * 0.1 = 34 black marbles

After picking 40 white marbles out
34 / 300 = 11% are black marbles now

If I'm not accounting for the fact that the number of black marbles is being reduced once I pick them out, the probability becomes
0.11^10 = 2.6E-10

But that seems too low to be true.
 A: The probability of any particular pattern of black and white marbles is the same as the probability of any other pattern with the same number of black and white marbles.  There are ${50 \choose 10}=10272278170 \gt 10^{10}$ different patterns of $10$ blacks and $40$ whites and multiplying by this pushes the probability of a given count up. 
As @calculus has noted, you need to be clear whether you are sampling with or without replacement. 
With replacement after each marble is drawn: 


*

*the probability of exactly $10$ black and $40$ white is ${50\choose 10} 0.1^{10}0.9^{40} \approx 0.015$    

*the probability of at least $10$ black and no more than $40$ white is a sum of similar terms and is about $0.025$


Without replacement after each marble is drawn: 


*

*the probability of exactly $10$ black and $40$ white is $\dfrac{{340\times 0.1\choose 10} {340\times 0.9 \choose 40}}{{340 \choose 50}} \approx 0.011$    

*the probability of at least $10$ black and no more than $40$ white is a sum of similar terms  and is about $0.016$.


You should not be surprised about small probabilities as the expected number of black balls is $50\times 0.1=5$ and sampling without replacement is less likely to lead to extreme results. 
