Open statistical ensemble