We study the problem of fairly allocating a set of indivisible goods to a set of agents having additive preferences. More precisely, we consider the problem in which each object can be in two possible states: good or bad. We further assume that the actual object state is not known at the allocation time, but that the decision-maker knows the probability for each object to be in each state. We propose a formal model of this problem, based on the notions of ex-ante and ex-post fairness, and we propose some algorithms aiming at computing optimal allocations in the sense of ex-post egalitarianism, the efficiency of these algorithms being tested on random instances.