The above table are a set of items and its ownership value amongst households in the UK.
I'm using EnumeratedDistribution to generate a list of items based on a set of probability values which works fine.
String[] applianceNames = new String[] {"Refrigeration", "Dishwasher", "Lights", "Television", "WashingMachine", "ElectricOven", "MicrowaveOven", "VacuumCleaner"};
//note that I haven't used the values from the table here
Double[] applianceProbability = new Double[] {96.1, 79.7, 62.1, 74.4, 81.4, 8.3, 19.2, 97.0};
List<Pair<String, Double>> list = new ArrayList<>();
for (int i=0; i<applianceProbability.length; i++) {
list.add(new Pair(applianceNames[i], applianceProbability[i]));
}
EnumeratedDistribution enumeratedDistribution = new EnumeratedDistribution(list);
Object[] objectsList = enumeratedDistribution.sample(100);
I am intending to use the probability values from the table. However, for items like Refrigeration and Television having the values of 1.77 and 1.6 respectively, (the study explains that having more than 1 of these items in the household results in values > 1), how should I go about handling these? How does EnumeratedDistribution handle values greater than 1?