首页 >
> 详细

STAT 2011 Probability and Estimation Theory – Semester 1, 2023

Computer Assignment – Due by 23:59pm 21 May

Instructions: Complete this computer assignment, prepare a report including your code, and

any output, plots or comments required by the questions and submit it on the Assignment item

on Canvas. The file upload format is limited to pdf and html. We highly encourage you to knit

your report using R Markdown, but the report can be created any way that is convenient as

long as it includes all the required content.

1. In a gambling game, a player wins the game if they roll 10 fair, six-sided dice, and get a

sum of at least 40.

(a) Approximate the probability of winning by simulating the game 104 times. Use

set.seed(200) for this question. Output your approximate probability, but do not

print your simulated rolls.

(b) Compute the Central Limit Theorem approximation P (Y ≥ 40), where Y is the sum

of 10 dice, and compare it to the Monte Carlo approximation obtained above. You

can use the fact that E(Y ) = 35, Var(Y ) = 175/6.

2. The frequency table below summarises 320 counts,

Value 0 1 2 3 4

Freq 130 133 49 7 1

modelled as values taken by i.i.d. random variables with common Bin(4, p) distribution,

i.e.

for some unknown p.

(a) Recall E(X) = np, estimate p using the method of moments.

(b) Using (a), find expected frequencies (E) for each of the classes “0”, “1”, “2”, “3”

and “4”. Round to the nearest integer.

(c) Compute standardised residuals (SR) given by SR = O?E√

E

for each of the classes

“0”, “1”, “2”, “3” and “4’, where O represents the observed frequencies. If |SR| < 2,

then the fitted binomial model is said to be a good model for the data. Comment

on the goodness of fit.

3. Use set.seed(100) to answer this question.

(a) Generate a random sample of size 25 from a normal distribution with mean μ = 3

and standard deviation σ = 1.5. Assume σ is known and we want to estimate μ.

Using the sample generated, find a 95% confidence interval (CI) for μ.

(b) Repeat the process in (a) 20 times. Using your 20 samples, calculate 20 CIs for μ.

How many of these 20 intervals contain the true mean μ = 3? Output this number

from your code, but no need to print the 20 CIs themselves.

1

4. Use set.seed(100) to answer this question.

(a) Generate a random sample of size 30 from the exponential distribution with param-

eter λ = 2 and find the mean of your sample. Repeat this process 1000 times and

draw a histogram of these 1000 means (use prob=T in hist). (Do not print the 1000

means.)

(b) Next we check whether the Central Limit Theorem gives a good approximation for

the distribution of the means. Overlay the histogram with a normal density curve

with appropriate mean and variance. (You will need to use the mean and variance

of exponential distributions from lectures. No need to derive). Comment on the fit.

联系我们

- QQ：99515681
- 邮箱：99515681@qq.com
- 工作时间：8:00-21:00
- 微信：codinghelp

- omp4650代做、辅导python设计程... 2023-08-15
- math3301代做、辅导python，ja... 2023-08-15
- 代写cisc181、辅导java程序语言 2023-08-15
- 代写mat334、辅导r程序语言 2023-07-24
- 代做comp9319 2023t2 assignme... 2023-07-23
- implement a machine learning... 2023-06-27
- comp9021 assignment 2 term 3 2023-06-27
- cse 12 programming assignmen... 2023-06-27
- csc3002 assignment 2 2023-06-27
- comp335代写、辅导sql程序语言 2023-06-26
- 代写cs 490 three-tier client... 2023-06-25
- cs 452 operating systems ph... 2023-06-13
- cs 452 operating systems pha... 2023-06-13
- math7502 final project 2023-06-13
- stat3006 assignment 3 class... 2023-06-13
- stat3006 assignment 3 class... 2023-06-13
- assignment 2 you are require... 2023-06-13
- csci 1100 — computer scienc... 2023-06-13
- mast30028 numerical methods ... 2023-06-13
- eng1005 s2 2022 assignment 3... 2023-06-13