Given a random variable X {\displaystyle X} , with possible outcomes x i {\displaystyle x_{i}} , each with probability P X ( x i ) {\displaystyle P_{X}(x_{i})} , the entropy H ( X ) {\displaystyle H(X)} of X {\displaystyle X} is as follows: