If the occurence of a success is encoded as '''1''' and the occurence of a failure with '''0''', then a probability of a success of ''p'' (and therefore, of a failure as ''q=1-p'') leads to an expectation of
+
If the occurrence of a success is encoded as '''1''' and the occurrence of a failure with '''0''', then a probability of a success of ''p'' (and therefore, of a failure as ''q=1-p'') leads to an expectation of