code: def cdf(self, x):
          
          t = 0
          N = float(self.n)
  
          if len(self) == 1:  # only one centroid
              return int(x >= self.C.min_key())
  
          for i, key in enumerate(self.C.keys()):
              c_i = self.C[key]
              if i == len(self) - 1:
                  delta = (c_i.mean - self.C.prev_item(key)[1].mean) / 2.
              else:
                  delta = (self.C.succ_item(key)[1].mean - c_i.mean) / 2.
              z = max(-1, (x - c_i.mean) / delta)
  
              if z < 1:
                  return t / N + c_i.count / N * (z + 1) / 2
  
              t += c_i.count
          return 1
docs: Computes the cdf of a specific value, ie. computes F(x) where F denotes
          the CDF of the distribution.