datascience.tables.Table
Table.
ev
Finds expected value of distribution
Expected value
Examples
>>> dist = Table().values([1, 2, 4]).probability([0.5, 0.4, 0.1]) >>> dist.ev() 1.7 >>> 1 * 0.5 + 2 * 0.4 + 4 * 0.1 1.7