Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Exploring R and RStudio environment You played a game of chance. The first game you start with certain number of points and you play certain
Exploring R and RStudio environment
You played a game of chance. The first game you start with certain number of points and you play certain number of rounds. After that you will end up with final total points. Suppose you played the game in the first week and you started with 100 points. After that you ended up each day either with extra points or you lost points. Then you changed to game 2 that have the same logic. You started again with 100 points but the probability of winning or losing is not the same as game 1. Which game is better to play?!
a) Define the variable My_Luck and assign to it the value Go!
b) Define a numeric vector My_numbers with the values (1,10,49).
c) Define a character vector My_char with the values (a, b, c).
d) Define a boolean vector My_Logic with the values (TRUE, FALSE, TRUE).
e) Define the variable My_Game1_Win with the values (140, -50, 20, -120, 240).
f) Define the variable My_Game2_Win with the values (-24, -50, 100, -350, 10).
g) Assign days as names of My_Game1_Win vector.
h) Assign days as names of My_Game2_Win vector.
i) Assign days of week names (Sunday, "Monday", "Tuesday", "Wednesday", "Thursday") to a vector called days_names.
j) Assign to total_daily how much you won/lost on each day.
k) Assign total_game1 to your total win/loss in your game 1.
l) Assign total_game 2 to your total win.loss in your game 2.
m) Find your overall winnings/losses and assign it to total_weeks.
n) Check if you realized higher total gains in game 1 than in game 2.
o) Assign the third element of the vector My_Game2_win to the variable Game2_Tuesday.
p) Assign the Game1 results of Monday, Tuesday, and Wednesday to the variable Game1_midweek.
q) Assign to Game2_selection_vector game2 results from Monday up to Thursday; make use of :
r) Fine the mean to Game2_selection_vector.
s) Which days you made positive gains (winnings) in game1? Assign the results to selection_vector. Then use selction_vector as to find winning days names and assign the results to Game1_winning_days.
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