Bounds for the deviation of a function from a generalised chord generated by its extremities with applications