Effective dynamics using conditional expectations