Fernando Crema
You need to throw a coin.
I first set the ui.R in which I put only 2 slider inputs.
sliderInput("n_bank", "How much the Casino is charging to play",
value = 500,
min = 10,
max = 10000)
The slider for the input is similar
The paradox has 2 points of view:
- The player (how much you'll pay to play)
- The Casino (how much you'll charge to let them play)
The app has a plot in which:
The plot is in the server.R section in the line
output$plot <- renderPlot({
plot(tabla())
})
```
Using 10.000 experiments this is the output
This is the fun part:
You'll need to change the sliders in order to have a “winnable” setup.
Example with 25$ charge of bank and 10000 time played (don't play if the bank charge 25$ ;))
[1] "You won 128776 and you paid 250000 final money -121224"
In this part I only show the table of the current game.
outcome Freq
1 2 4962
2 4 2499
3 8 1293
4 16 661
5 32 304
6 64 148
7 128 69
8 256 24
9 512 23
10 1024 7
11 2048 5
12 4096 4
13 8192 1