vectorized likelyhood function defined