# R Studio Help

Consider a game where you roll a single die, and if it comes up 1, you score 100 points, if it comes up 5, you score 50 points, and if it comes up any other number, you score 0 points. Create a dataframe to represent this as a random variable, with a column prob representing the probability of rolling each number from 1 through 6, and a column score representing the score you get for rolling each number.

Use the sample function and the dataframe you just created to roll the die 10,000 times, keeping track of how many points you scored on each roll. Plot a histogram of the scores from the sample, and describe the shape of the resulting distribution: what are the possible scores, and how often do they happen?

Calculate the mean of your sample. Then calculate the expected value of the random variable using the standard formula:

∑i=1kxiP(X=xi)

Does your sample mean differ from the expected value? Why or why not?

Calculate the standard deviation of your sample. Then calculate the standard deviation of the random variable using the standard formula:

∑i=1k(xi−E[x])2P(X=xi)−−−−−−−−−−−−−−−−−−−−−⎷

Does your sample standard deviation differ from the random variable's standard deviation? Why or why not?

Now, assume you are playing the same game as in step 1, but assume you are using a loaded die that has an increased chance of rolling 5s. In particular, the die will roll a 5 half the time, and one of the other values the rest of the time (each with equal probability). Create a dataframe to represent this random variable, again with a prob column and a score column. (Make sure the numbers in the prob column sum to 1!)

Use the sample function and the dataframe you just created to roll the die 10,000 times, keeping track of how many points you scored on each roll. Plot a histogram of the scores from the sample, and describe the shape of the resulting distribution: what are the possible scores, and how often do they happen?

Calculate both the sample mean and the expected value of the new random variable. Compare these to the values you got for the regular die (from step 3). How much more would you expect to score, on average, by using the loaded die instead of the regular die?

Now, assume that instead of rolling a single die, you will roll both the regular die (from step 1) and the loaded die (from step 5), and your score will be the sum of the scores resulting from the two dice. Use replicate to simulate playing this game 10,000 times. Plot a histogram of the scores from the sample. Are there the same number of modes in this distribution as in steps 2 and 6? Why or why not?

Calculate the mean of your sample. Then calculate the expected value of the random variable using the standard formula for linear combinations of random variables:

E[aX+bY]=aE[X]+bE[Y]

Why are the sample mean and the expected value of this game so much higher than the previous games?

Now, assume that you roll 2 regular dice (from step 1) and 3 loaded dice (from step 5), and your score is the sum of the scores resulting from the five dice, divided by 5. Use replicate to calculate the mean score from playing this game 10,000 times. Calculate the expected value of this game using the standard formula for linear combinations of random variables.

If it costs 5 points to play the game with the single fair die, 15 points to play the game with the single loaded die, and 10 points to play this game with 5 dice, which game should you play to end up with the most (net) points? Why?

( 7 reviews ) Tucson, United States

Project ID: #15408074

## 22 freelancers are bidding on average \$159 for this job

liveexperts123

please ignore the bid amount we will discuss the price later in the chat after we have discussed the project thoroughly Relevant Skills and Experience: . Proposed Milestones: 190 - . Hi wtfdoq! please inbox me to discu More

\$190 USD in 2 days
(51 Reviews)
6.7
ognjen011

Hi! This is an interesting project, and I would love to help you with it. I am not sure why the other guys are pricing it that much, this is a simple thing for anyone proficient in R and probability Relevant Skills an More

\$64 USD in 2 days
(80 Reviews)
6.2
suyashdhoot

Hi I am a very experienced statistician and academic writer. I have completed several PhD level thesis projects involving advanced statistical analysis of data. I have worked with data from several companies and have d More

\$250 USD in 3 days
(65 Reviews)
6.1
shivampanchal

I have a good hand on working with Advanced Excel, R and Python. I have quite a good knowledge of deep learning Algorithm , have also developed dashboards and Shiny Web Application in R. Relevant Skills and Experience More

\$155 USD in 3 days
(40 Reviews)
5.9

I have a strong background of theoretical statistics and probability theory.I graduated from Indian Institute of Technology, Kharagpur in 2016. I am currently enrolled in integrated PhD in mathematics. I have experien More

\$138 USD in 2 days
(108 Reviews)
5.9
proffesor1

Hi. I can do this project with code and full answers on all questions. Relevant Skills and Experience I have experience in R and solved many problems for students. Proposed Milestones \$200 USD - final payment ( More

\$190 USD in 6 days
(31 Reviews)
6.0
JonnaNueros121

I'm a PhD student in Engineering with a Master's in Statistics. Expert in Matlab, Minitab Econometric and statistical modeling of pretty much everything you can think of. These include expertise on protocol development More

\$250 USD in 3 days
(15 Reviews)
5.2
enggworks

Hello, I am very good at R and probability. I can do both the simulation and analytical calculation part of the dice rolling problem given in the description. Kindly assign me the project. Relevant Skills and Experi More

\$200 USD in 5 days
(8 Reviews)
5.2
MasimovAnar

Hi! I'm experienced R programmer and I have completed many statistical assignments like that. I guarantee delivery of the script (or R Markdown document if needed) in 24 hours. Relevant Skills and Experience I have ex More

\$77 USD in 0 days
(12 Reviews)
4.6
utkarshkatiyar19

i have good experience working on R studio. also have knowledge of mathematics. so i can do it Relevant Skills and Experience mathematics, R pogramming Proposed Milestones \$250 USD - all

\$250 USD in 5 days
(8 Reviews)
3.9
cyash61

Hello there, i am an analytics consultant with more 6 years of expertise in statistical analysis for 2 major consulting firms. Can take up this job and do it smoothly. Relevant Skills and Experience More than 50 pr More

\$250 USD in 7 days
(4 Reviews)
3.4
sushanthpakki

Hi. I have good command over R programming language. I also have good knowledge of probability and random variables. Relevant Skills and Experience R Proposed Milestones \$100 USD - On Completion

\$60 USD in 3 days
(8 Reviews)
3.2
johnnyfreak

I can complete the task in 2 hours and give you results together with the script Competenze ed esperienze rilevanti PhD in Statistics, I work everyday with R software in the field of Epidemiological research Pietre M More

\$55 USD in 0 days
(11 Reviews)
3.2
Zarinaali

check profile Relevant Skills and Experience check profile Proposed Milestones \$155 USD - check profile check profile

\$155 USD in 3 days
(3 Reviews)
2.7
roshansanthoshh

Have already started working on code. Will be able to provide the complete code in 4-5 days, maybe less. Relevant Skills and Experience 6 years using R. Check experience at "[login to view URL] More

\$55 USD in 3 days
(4 Reviews)
2.4
kanyekicharles

able to do this task.

\$155 USD in 3 days
(0 Reviews)
0.0
maneeshsharmaec

Greetings I am working as Data Scientist and have experience of R programming. Quiet recently I hv solved a similar problem that of yours. Kindly PM 4 past solution to c if it matches to ur need. Relevant Skills More

\$150 USD in 5 days
(1 Review)
0.0
miodragstajic

Dear Sir, We did many similar projects to your Dice project, some of them very complex. We are international game development company with HQ in London and we did over 160 games. Relevant Skills and Experience We hav More

\$155 USD in 3 days
(0 Reviews)
0.0
huazhou2

A proposal has not yet been provided

\$222 USD in 3 days
(0 Reviews)
0.0
alizaasmat

i can do that plz gime the description u will not be disappointed God bless u

\$200 USD in 3 days
(0 Reviews)
0.0