Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer the following question by using R and creating an R script. Thanks. Q2. (15%) The face value X from throwing a loaded die

Please answer the following question by using R and creating an R script. Thanks.

image text in transcribed
Q2. (15%) The face value X from throwing a loaded die has the following probability distribution: X 2 3 4 5 6 P (X = x) 1/6 1/6 1/6 0 1/2 a) Please compute the mean and variance of X (Le. E(X) & Var(X)) using R code. b) Write a piece of R function LLN_Die with an argument n to show that as n becomes larger the sample average converges to E(X) in a graph, where n is the number of throws. LL.N.Die = function(n) { #LLN.Dice: Law of Large Number for Throwing a Die #Body of code [ You need to present your function in both word and R script file] c) Show your figure and present the sample average when n reaches 150 [Le., print out the last average number when you apply the function: LLN.Die(n = 150)]

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

Precalculus, Enhanced

Authors: Cynthia Y Young

3rd Edition

1119339510, 9781119339519

More Books

Students also viewed these Mathematics questions