Economic Activities and the Resilience of Ecological Systems: A Stochastic Approach