Compute an expectation for a discrete reward
Keep the numerator and denominator in the stated order. · 172 words
A library assistant chooses which of two display tables to refill before each event. To study one choice, the librarian models the number of empty spots at the children's table as zero with probability one half, two with probability one quarter, and four with probability one quarter. Assign one point of reward for each spot filled. If the cart always brings enough books, possible rewards for this table are zero, two and four points. The probabilities sum to one, as they must for these exhaustive alternatives.
Multiply each reward by the chance of that outcome and add the products. Zero contributes nothing. Two times one quarter contributes one half, and four times one quarter contributes one. The expected reward is therefore one and a half points per visit. A single visit cannot earn one and a half points under this model. The result summarizes what the distribution implies over repeated visits. If table use changes after a new event starts, the probabilities used in the calculation may need to change as well.
Check your recall
What is the expected reward of refilling the children's table in this model?
Check your answer
The expected reward is one and a half points per visit.
Sources and credits
Original KeyTouch lesson. Background reading · UC Berkeley · Introduction to Artificial Intelligence.