# R Studio Help

Budget $30-250 USD

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?

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

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

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

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

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

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

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

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

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

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

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

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

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

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