I started building this Manipulate
and am certain I can do so on my own, but thought it was fun enough that others might want to try. (If this is some abuse of the SE, I'm happy to take this question down.) Nevertheless....
The TV game show Deal or No Deal involves 26 closed briefcases, each containing a card indicating a different dollar amount (randomly chosen from the list below and assignments known to nobody). The player randomly chooses one case, which becomes "hers" and remains closed throughout the game and is "out of play." (Of course she hopes it holds \$1,000,000.)
The player then selects other available cases which are then opened, one-by-one, revealing their value. It is entirely a matter of chance but the player hopes that the cases she chooses bear small dollar values, thereby increasing the evidence that hers bears a high value.
After specified numbers of cases have been opened, the "banker" offers to buy the player's case from her; if the player accepts the deal, the game is over. His offer is based on the expected value of the unopened briefcases. If many of the low-value cases have been opened (and removed), then the banker's offer will be high. If instead many of the high-value cases have been opened (and removed), then the banker's offer will be low. Upon giving this offer, the host asks the player: "Deal, or No Deal?"
Most of the time the player rejects the deal and must open more cases. (It is quite obvious that the early bank offers are very low, thereby encouraging the player to continue... making dramatic television.) Such play continues until the player finds an offer so attractive she takes it, thereby ending the game.
I'd like to build a Manipulate
for playing along with the game. It should show TogglerBar
s with the 26 dollar amounts. We click on the values of the cases opened. (I started the TogglerBar
, with $26$ cash values, below.)
I'd like a Manipulate to "play along," or at least present the game in a statistically helpful way. As such:
- The TogglerBars should lie to the left of the central window, in the column form in this started code, below. The observer will click on the corresponding cell whenever a briefcase is opened.
- The main panel in the Manipulate should be BoxWhiskerChart, with 26 ticks along the horizontal axis, corresponding to the opening of each successive briefcase. The plot should show the classic BarWhisker representation of the dollar amounts still in play (closed briefcases).
- A red line should connect the means as the play proceeds, tracking the expected value in the closed suitcases... marching to the right during the game.
- The title or other label of the graph should state the current average value of the closed briefcases. (This is the current expected winning of the player.)
- After the 6th, 11th, 15th, 18th, 20th, 21st, ... 25th the banker gives his offer. The Manipulate should have a text window in which we can type in the banker's current offer. I'd like a blue line connecting these bank offers on the BarWhiskerPlot to thus reveal when an offer is attractive or not.
- Extra credit for the statistically savvy: Include a red/green indicator light to tell the player whether she "should" accept the banker's offer.
Here's a start that gets the controls on the left.
Manipulate[
full = {0.01, 1, 5, 10, 25, 50, 75, 100, 200, 300, 400, 500, 750,
1000, 5000, 10000, 25000, 50000, 75000, 100000, 200000, 300000,
400000, 500000, 750000, 1000000};
lst = Complement[full, Union[x1, x2]];
BoxWhiskerChart[{full, {100, 200, 300, 400, 500, 750, 200000,
1000000}, {100000, 200000, 300000, 400000, 500000,
750000}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, \
{}, {}, {}, {}, {}, {}, {}, {}, {}},
PlotLabel ->
Text[Style["Expected win $" <> ToString[Round[Mean[lst]]]]],
ChartLabels -> Range[26]],
Row[{
TogglerBar[
Dynamic[x1], {0.01, 1, 5, 10, 25, 50, 75, 100, 200, 300, 400, 500,
750}, Appearance -> "Vertical"],
TogglerBar[
Dynamic[x2], {1000, 5000, 10000, 25000, 50000, 75000, 100000,
200000, 300000, 400000, 500000, 750000, 1000000},
Appearance -> "Vertical"]}], ControlPlacement -> Left,
FrameLabel -> Style["DEAL OR NO DEAL", Blue, Large]]
Next will come the BoxWhisker graphs based on the number of suitcases still closed and their values.
Still work to be done!