Question
Done using R Problem 4. A gotcha game (35 Points) Gotcha game is a popular game mode for mobile games. In this game, you need
Done using R
Problem 4. A gotcha game (35 Points) Gotcha game is a popular game mode for mobile games. In this game, you need to pay real money and draw some prizes from a pool. Assume that you are playing a gotcha game with the following settings Prize level Probability 20% 80% Based on the table, you have 20% to obtain a level A prize for each draw 1. How many draws in average you need to have one level A prize? To do this, please generate 1000 games and use a vector to record the number of draws. 2. What's the probability to obtain the a level A prize within 5 draws? Calculate the theoretical value. 3. Assuming you won't stop until you obtain 5 level A prizes. Every time when you draw from If you obtain a level A prize, the probability to obtain a level A prize goes down 3% for If you obtain a level B prize, the probability to obtain a level A prize goes up 1% for the Make a line chart to present the probability dynamic for level A prize (You only need to 4. (Bonus: 10 points) Repeat step 3 and write it as a function, the input of this function should this pool, the probability will be changed as following the next draw next draw simulate once) be the number of A prize. The output of this function should be a plot
Problem 4. A gotcha game (35 Points) Gotcha game is a popular game mode for mobile games. In this game, you need to pay real money and draw some prizes from a pool. Assume that you are playing a gotcha game with the following settings: Prize level Probability 20% 80% Based on the table, you have 20% to obtain a level A prize for each draw 1. How many draws in average you need to have one level A prize? To do this, please generate 1000 games and use a vector to record the number of draws 2. What's the probability to obtain the a level A prize within 5 draws? Calculate the theoretical value. 3. Assuming you won't stop until you obtain 5 level A prizes. Every time when you draw from If you obtain a level A prize, the probability to obtain a level A prize goes down 3% for If you obtain a level B prize, the probability to obtain a level A prize goes up 1% for the Make a line chart to present the probability dynamic for level A prize (You only need to 4. (Bonus: 10 points) Repeat step 3 and write it as a function, the input of this function should this pool, the probability will be changed as following the next draw next draw simulate once be the number of A prize. The output of this function should be a plot. Problem 4. A gotcha game (35 Points) Gotcha game is a popular game mode for mobile games. In this game, you need to pay real money and draw some prizes from a pool. Assume that you are playing a gotcha game with the following settings: Prize level Probability 20% 80% Based on the table, you have 20% to obtain a level A prize for each draw 1. How many draws in average you need to have one level A prize? To do this, please generate 1000 games and use a vector to record the number of draws 2. What's the probability to obtain the a level A prize within 5 draws? Calculate the theoretical value. 3. Assuming you won't stop until you obtain 5 level A prizes. Every time when you draw from If you obtain a level A prize, the probability to obtain a level A prize goes down 3% for If you obtain a level B prize, the probability to obtain a level A prize goes up 1% for the Make a line chart to present the probability dynamic for level A prize (You only need to 4. (Bonus: 10 points) Repeat step 3 and write it as a function, the input of this function should this pool, the probability will be changed as following the next draw next draw simulate once be the number of A prize. The output of this function should be a plot
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started