Guess beer brands. You are presented n glasses of beer, each containing a different brand. You are informed that there are m ≥ n possible brands in total, and the names of all brands are given. For...


Guess beer brands.


You are presented n glasses of beer, each containing a different brand. You are informed that there are m ≥ n possible brands in total, and the names of all brands are given. For each glass, you can pay p euros to taste the beer, and if you guess the right brand, you get q ≥ p euros back. Suppose you have done this before and experienced that you typically manage to guess the right brand T times out of 100, so that your probability of guessing the right brand is b = T /100.


Make a function simulate(m, n, p, q, b) for simulating the beer tasting process. Let the function return the amount of money earned and how many correct guesses (≤ n) you made. Call simulate a large number of times and compute the average earnings and the probability of getting full score in the case m = n = 4, p = 3, q = 6, and b = 1/m (i.e., four glasses with four brands, completely random guessing, and a payback of twice as much as the cost). How much more can you earn from this game if your ability to guess the right brand is better, say b = 1/2? Name of program file: simulate_beer_tasting.py.



Dec 04, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here