final List<Ops.DoubleOp> functions = new ArrayList<Ops.DoubleOp>();
functions.add(new Square());
functions.add(new Bind2nd(new Minus(), target));
final Expression comp = new Expression(functions);
final Ops.DoublePredicate less = new Bind2ndPredicate(new LessThanPredicate(), target);
final Pair<Double, Integer> result = statistics.expectationValue(comp, less);
final double x = result.getFirst();
// TODO: code review :: please verify against QL/C++ code