dimanche 23 septembre 2018

Bernoulli sampling in Excel with different row weights

This is probably both an excel question as well as a statistical question.

Say I have the following data:

enter image description here

What I need to do is generate a column 'Assigned' (column C) which is an indicator whether a customer has been assigned to a program or not. The probability of a customer being assigned to the program is, let's say, 0.4.

BUT the complication is that the customers in column A are a sample, based on different strata, and so each customer represents one or more customers, as identified in column B. So Customer A is worth a single customer in the population, while customer B is worth 4 customers in the population.

How do I randomly sample across this 'weighted' set of customers so that on the whole there is a 40% chance that a single customer in the population be assigned to the program?

Thanks all!




Aucun commentaire:

Enregistrer un commentaire