Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

= Lt. However. Recall that the mean of a Discrete Uniform(k,1) random variable is EX] if we did not know this, one way to estimate

image text in transcribed

= Lt. However. Recall that the mean of a Discrete Uniform(k,1) random variable is EX] if we did not know this, one way to estimate the mean would be to just average the trials. Specifically, for realizations Xi, X2,... , Xm, the sample mean is Ax-Xi The code framework below generates numtrials realizations of a Discrete Uniform(k, e) random variable, calculates the sample mean up to the mth realization for m from 1 to numtrials, and plots the resulting sequence of sample means. Your job is to ill in the code needed to calculate the sample mean. Parameters numtrials 1000 ; IX = +5 ; 1Y +50; %Generate Discrete Uniform random variables %(MATLAB only generates Discrete Uniform random variables from 1:n for some %parameter n so we need to adjust it a bit.) X = random("Discrete Uniform ,,IX- lex + 1,numtrials, 1) + kX- 1; Y random("Discrete Uniform ,,LY-kY + 1,numtrials, 1) + kY- 1; %Calculate sample mean for an increasing number of trials samplemeanx zeros (1,numtrials) samplemeanY = zeros(1,numtrials); for m = 1 : nuntrials samplemeanX(m) samplemeanY(m) %%Your %%Your code for code for calculating 1/m calculating 1/m (X-1 (Y-1 X-m) Y-m) - * + + . * + + end %Plot plot (1:numtrials, samplemeanX) xlabel('Number of Trials') ylabel ('Sample Mean')

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

New Trends In Databases And Information Systems Adbis 2019 Short Papers Workshops Bbigap Qauca Sembdm Simpda M2p Madeisd And Doctoral Consortium Bled Slovenia September 8 11 2019 Proceedings

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Robert Wrembel ,Mirjana Ivanovic ,Johann Gamper ,Mikolaj Morzy ,Theodoros Tzouramanis ,Jerome Darmont

1st Edition

3030302776, 978-3030302771

More Books

Students also viewed these Databases questions