copilothow to calculate likelihood function - Search