Something is about to happen, and you know the chance of each outcome. Write uncertainty(chances): one number for how uncertain the outcome is before you see it. 0 means you already know.
Tomorrow’s weather is already decided, but hidden from you. You know the chances: sun 70%, rain 20%, snow 10%. Your function turns those chances into one number for how uncertain you are.
how uncertain is that? that’s for you to decide
uncertainty(chances)| chances | one chance per outcome, adding up to 1 | e.g. [1, 0] |
| returns | how uncertain the outcome is (0 = you already know) | |