Distributed stochastic resource allocation in teams