Arnold F. answered 02/03/16
Tutor
5
(53)
College Professor & Expert Tutor In Statistics and Calculus
If searches are random and items are allowed to be reselected then you are looking at a binomial distribution with p=1/3000, q=2999/3000, n=18 and r=4.
P = 18C4(1/3000)4(2999/3000)14
If you don't want the same item being "selected" then your code needs to "save" the list of items already selected so when an another selection is made the new selection is checked to see if it is already on the list. If it is, it is discarded and a new selection is made until you have the desired number of unique files.
Arnold F.
Your welcome Greg. I teach statistics and probability and I've done quite a bit of programming (old school) as well. Need anything else in the future feel free to send me a direct message.
Report
02/03/16
Greg F.
02/03/16