I have a dataset containing some approx. 11 million instances, all of which can be labelled as either class A or class B. I know a priori that approx. 1,000 of these instances belong to class A, and the rest are class B. However none of the instances are actually labelled. So, I would like to be able to sample these 11 million instances, and know the probability of my sample containing an instance from class A.
For instance:
If I take 30,000 random samples without replacement from the 11 million instances (which are i.i.d), what is the probability that my sample will contain an instance from class A (size 1,000 instances)? Is this even possible to calculate?
Also is it possible for me to approximately bound how many instances from class A would be in this sample (for varying sample sizes)? Is there a formula I can simply plug my values into?
Apologies if this problem seems simple, but stats has never been a strength of mine. This isn't a homework task, but a work problem. I'm trying to build a training set from a domain outside my own, whereby I need to minimise the prevalence of class A in my training set. Class A are positive examples which need to be removed - unfortunately when the data was first processed the data labels were discarded :-/ . It would take years to label them manually and even that process is prone to human error!
Thanks.
Update:
For those with a similar problem I found methods in the Apache Commons Mathematics Library for calculating binomials and more importantly the Hypergeometic Distribution which be of use.
The hyper() command available in R (suggested by @whuber) also proved very useful. Would certainly recommend. For instance to produce a plot you can use:
plot(dhyper(0:10,1000,11000000-1000,30000),type="b",xlab="x label",ylab="y label", main="Title")
Where 0:10 is the range. 1000 is the number of positive marbles in the urn. 11000000-1000 is the number of negative marbles in the urn. 30000 is the number of draws.
This will produce a plot with lines and points which is type "b". Other types are described online (I would post more links, but I can't with such low reputation).
Thanks again for the help everyone.