Stochastic approaches to the study of synaptic function