implement fano function that computes the Fano factor