A stochastic process approach to multilayer neutron detectors