constructed a class which is responsible for building the matlab script for conditional expectations