Combining random samples

I have a set of U elements (initially unknown size) and I would like to create a random selection from n <| U | elements. Sampling the stream is great for this.

The problem arises when I divided U into several subsets and took a random sample of each subset (each sample contains k <= n elements, but usually k = n). I also know how many elements are in each subset. I would like to know how to combine these samples (preferably combining two samples at a time) into one size n of the sample.

Or in another way, given the different sets A and B , as well as the random samples a and b, I would like to make cab so that c is a random pattern AB , and I can specify the size of c (usually | c | will be about the same size as a |).

+5
source share
2 answers

, U. , S_i, . S_i. , S_1 20% U, S_1 20%. , , , , . , k n, k = n, , , .

A B, c : A strong > |/| AB | a; | B |/| AB | = 1 - (| A |/| AB |) b. ( , , | a | n * (| A |/| AB |) ( | b |), , , , .) .

+3

| A | == | B | | a | == | b |, . aUb.

0

All Articles