Estimating standard deviation of very coarsely binned data

You are getting shape issues not stability problems. Is the c1 returning less elements when N is 5? You should have as many c1 values as you have probs1