Stochastic model of the width function