This document presents a novel statistical cost model and algorithm for efficiently offloading applications to clouds. The model constructs an execution dependency tree to represent execution relationships among application modules. In contrast to fixed average costs, each module's cost is modeled as a random variable described by its cumulative distribution function statistically estimated through profiling. Using this model, the paper generalizes cost optimization functions and proposes an efficient offloading algorithm based on dynamic programming. Performance results show the model can estimate application execution time with a mean absolute percentage error as low as 5% for applications with sequential and branching dependencies.