statistical inference solution