To find outlier based on N points on sine curve

15 Views Asked by At

Suppose N points ((x1,y1),(x2,y2),...(xN,yN)) are given from a curve y=sin(ax+b) where a,b values are unknown. Before giving these N points to you, y coordinate of one point is randomly tampered so that it does not lie on the curve. Write a program to determine which point among N points is NOT on the sinusoidal curve, whose a, b values are unknown