If a variable takes values 0,1,2,3,....,n with frequencies qn, nC1qn−1p, nC2qn−2p2,..., nCnpn where p+q=1, then the mean is: