A weather forecaster gives a chance of rain every day. Write penalty(chance): the forecaster gave chance to what actually happened; how much do they lose? 0 means nothing to lose; bigger means a worse forecast.
Every day a forecaster gives rain a chance. On Monday they said 70%, on Tuesday only 20%, and it rained both days. Your function says how much each forecast loses.
how much should Tuesday’s 20% cost? that’s for you to decide
penalty(chance)| chance | what the forecaster gave to what actually happened (0 to 1) | e.g. 1 |
| returns | how much they lose (0 = perfect) | |