Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HOW TO DO THIS IN R Q1. Play the dice game 1000 times Each time, if we get an even number, we will get 2

HOW TO DO THIS IN R

Q1. Play the dice game 1000 times

Each time, if we get an even number, we will get 2 dollars. If we get an odd number, we will lose

dollars.

Calculate the final payoff of this game.

Q2. Add more codes to finish the following task:

Within each round, print on the screen (the current round number = and the round number)

Within each round, print on the screen whether the dice number is even or odd

Within each round, print on the screen the payoff value

Q3. Calculate the variance of the payoff

hint: create a vector to store the payoff of each round, then calculate the variance of the

vector.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions