I have data in the following form , where x is an integer and r is 0 or 1.
I know that
- if $x < C$, then $r = 1$,
- if $x\geq C$, then $r= 0$.
How can I automatically estimate the value of $C$? Can I have any guarantees on the convergence?
There must be an easy way to solve this, I just cannot find out!