Question: Diceroll simulation in Python with tkinter. You can skip the details about law of probability in Description. Exercise 3: At the end of the year

Diceroll simulation in Python with tkinter.

Diceroll simulation in Python with tkinter. You can skip the details aboutlaw of probability in Description. Exercise 3: At the end of theYou can skip the details about law of probability in Description.

Exercise 3: At the end of the year an insurance company decides to reward its most loyal customers. In order to select the payout he decides to roll a supposedly balanced die. If the result is even, we win 2000$. If the result is 1, you win 3000$. If the result is 3 or 5, we lose 4000$! Let X be the random variable that gives the player's winnings. Calculate the expectation of X and indicate whether the game is favourable for the player. Calculate the variance. . Let X be the random variable that gives the player's winnings. X is defined on the set {1,2,3,4,5,6). X(1)=3, X(2)=2, X(3)=-4, X(4)=2, X(5)=-4, X(6)= 2 We obtain the law of probability Xi -4 2 3 P(X = x;) 1 1 2 1 6 3 The goal of this exercise is to create a graphical interface to facilitate the company's work. In order to do so : - Create a welcome interface with a welcome message and two buttons containing the texts 'Description' and 'Simulation'. - Clicking on the Description button should open a new interface (and close the home one) that presents details such as the law of probability, expectation, variance and standard deviation. - Clicking on the Simulation button should also open another interface. On this interface, a Roll Dice button allows to simulate the throwing of the dice. Clicking on this button will hide the Roll Dice button, then show the result of the roll (the computer will choose a random number between 1 and 6; you can use the randrange function of the random library). The result should show details such as the payout and whether or not the roll is favorable or unfavorable to the client. NB: You will need to create a Description class (with appropriate methods to calculate the expectation, variance, standard deviation and value of the probability P(X=xi) knowing xi ) and a Simulation class that has a value property (value obtained after the throw) and methods to return the payoff and favorability

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!